(61d00a474) v0.9.7.1
This commit is contained in:
@@ -0,0 +1,443 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamApps : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMAPPS_INTERFACE_VERSION008";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_BIsSubscribed = Marshal.GetDelegateForFunctionPointer<FBIsSubscribed>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_BIsLowViolence = Marshal.GetDelegateForFunctionPointer<FBIsLowViolence>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_BIsCybercafe = Marshal.GetDelegateForFunctionPointer<FBIsCybercafe>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_BIsVACBanned = Marshal.GetDelegateForFunctionPointer<FBIsVACBanned>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_GetCurrentGameLanguage = Marshal.GetDelegateForFunctionPointer<FGetCurrentGameLanguage>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_GetAvailableGameLanguages = Marshal.GetDelegateForFunctionPointer<FGetAvailableGameLanguages>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_BIsSubscribedApp = Marshal.GetDelegateForFunctionPointer<FBIsSubscribedApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_BIsDlcInstalled = Marshal.GetDelegateForFunctionPointer<FBIsDlcInstalled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_GetEarliestPurchaseUnixTime = Marshal.GetDelegateForFunctionPointer<FGetEarliestPurchaseUnixTime>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_BIsSubscribedFromFreeWeekend = Marshal.GetDelegateForFunctionPointer<FBIsSubscribedFromFreeWeekend>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetDLCCount = Marshal.GetDelegateForFunctionPointer<FGetDLCCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_BGetDLCDataByIndex = Marshal.GetDelegateForFunctionPointer<FBGetDLCDataByIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_InstallDLC = Marshal.GetDelegateForFunctionPointer<FInstallDLC>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_UninstallDLC = Marshal.GetDelegateForFunctionPointer<FUninstallDLC>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_RequestAppProofOfPurchaseKey = Marshal.GetDelegateForFunctionPointer<FRequestAppProofOfPurchaseKey>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetCurrentBetaName = Marshal.GetDelegateForFunctionPointer<FGetCurrentBetaName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_MarkContentCorrupt = Marshal.GetDelegateForFunctionPointer<FMarkContentCorrupt>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetInstalledDepots = Marshal.GetDelegateForFunctionPointer<FGetInstalledDepots>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetAppInstallDir = Marshal.GetDelegateForFunctionPointer<FGetAppInstallDir>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_BIsAppInstalled = Marshal.GetDelegateForFunctionPointer<FBIsAppInstalled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetAppOwner = Marshal.GetDelegateForFunctionPointer<FGetAppOwner>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetLaunchQueryParam = Marshal.GetDelegateForFunctionPointer<FGetLaunchQueryParam>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_GetDlcDownloadProgress = Marshal.GetDelegateForFunctionPointer<FGetDlcDownloadProgress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_GetAppBuildId = Marshal.GetDelegateForFunctionPointer<FGetAppBuildId>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_RequestAllProofOfPurchaseKeys = Marshal.GetDelegateForFunctionPointer<FRequestAllProofOfPurchaseKeys>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_GetFileDetails = Marshal.GetDelegateForFunctionPointer<FGetFileDetails>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_GetLaunchCommandLine = Marshal.GetDelegateForFunctionPointer<FGetLaunchCommandLine>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_BIsSubscribedFromFamilySharing = Marshal.GetDelegateForFunctionPointer<FBIsSubscribedFromFamilySharing>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsSubscribed( IntPtr self );
|
||||
private FBIsSubscribed _BIsSubscribed;
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribed()
|
||||
{
|
||||
var returnValue = _BIsSubscribed( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsLowViolence( IntPtr self );
|
||||
private FBIsLowViolence _BIsLowViolence;
|
||||
|
||||
#endregion
|
||||
internal bool BIsLowViolence()
|
||||
{
|
||||
var returnValue = _BIsLowViolence( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsCybercafe( IntPtr self );
|
||||
private FBIsCybercafe _BIsCybercafe;
|
||||
|
||||
#endregion
|
||||
internal bool BIsCybercafe()
|
||||
{
|
||||
var returnValue = _BIsCybercafe( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsVACBanned( IntPtr self );
|
||||
private FBIsVACBanned _BIsVACBanned;
|
||||
|
||||
#endregion
|
||||
internal bool BIsVACBanned()
|
||||
{
|
||||
var returnValue = _BIsVACBanned( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetCurrentGameLanguage( IntPtr self );
|
||||
private FGetCurrentGameLanguage _GetCurrentGameLanguage;
|
||||
|
||||
#endregion
|
||||
internal string GetCurrentGameLanguage()
|
||||
{
|
||||
var returnValue = _GetCurrentGameLanguage( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetAvailableGameLanguages( IntPtr self );
|
||||
private FGetAvailableGameLanguages _GetAvailableGameLanguages;
|
||||
|
||||
#endregion
|
||||
internal string GetAvailableGameLanguages()
|
||||
{
|
||||
var returnValue = _GetAvailableGameLanguages( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsSubscribedApp( IntPtr self, AppId appID );
|
||||
private FBIsSubscribedApp _BIsSubscribedApp;
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribedApp( AppId appID )
|
||||
{
|
||||
var returnValue = _BIsSubscribedApp( Self, appID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsDlcInstalled( IntPtr self, AppId appID );
|
||||
private FBIsDlcInstalled _BIsDlcInstalled;
|
||||
|
||||
#endregion
|
||||
internal bool BIsDlcInstalled( AppId appID )
|
||||
{
|
||||
var returnValue = _BIsDlcInstalled( Self, appID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetEarliestPurchaseUnixTime( IntPtr self, AppId nAppID );
|
||||
private FGetEarliestPurchaseUnixTime _GetEarliestPurchaseUnixTime;
|
||||
|
||||
#endregion
|
||||
internal uint GetEarliestPurchaseUnixTime( AppId nAppID )
|
||||
{
|
||||
var returnValue = _GetEarliestPurchaseUnixTime( Self, nAppID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsSubscribedFromFreeWeekend( IntPtr self );
|
||||
private FBIsSubscribedFromFreeWeekend _BIsSubscribedFromFreeWeekend;
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribedFromFreeWeekend()
|
||||
{
|
||||
var returnValue = _BIsSubscribedFromFreeWeekend( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetDLCCount( IntPtr self );
|
||||
private FGetDLCCount _GetDLCCount;
|
||||
|
||||
#endregion
|
||||
internal int GetDLCCount()
|
||||
{
|
||||
var returnValue = _GetDLCCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool BGetDLCDataByIndex( int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, out string pchName )
|
||||
{
|
||||
IntPtr mempchName = Helpers.TakeMemory();
|
||||
var returnValue = _BGetDLCDataByIndex( Self, iDLC, ref pAppID, ref pbAvailable, mempchName, (1024 * 32) );
|
||||
pchName = Helpers.MemoryToString( mempchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FInstallDLC( IntPtr self, AppId nAppID );
|
||||
private FInstallDLC _InstallDLC;
|
||||
|
||||
#endregion
|
||||
internal void InstallDLC( AppId nAppID )
|
||||
{
|
||||
_InstallDLC( Self, nAppID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FUninstallDLC( IntPtr self, AppId nAppID );
|
||||
private FUninstallDLC _UninstallDLC;
|
||||
|
||||
#endregion
|
||||
internal void UninstallDLC( AppId nAppID )
|
||||
{
|
||||
_UninstallDLC( Self, nAppID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRequestAppProofOfPurchaseKey( IntPtr self, AppId nAppID );
|
||||
private FRequestAppProofOfPurchaseKey _RequestAppProofOfPurchaseKey;
|
||||
|
||||
#endregion
|
||||
internal void RequestAppProofOfPurchaseKey( AppId nAppID )
|
||||
{
|
||||
_RequestAppProofOfPurchaseKey( Self, nAppID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetCurrentBetaName( IntPtr self, IntPtr pchName, int cchNameBufferSize );
|
||||
private FGetCurrentBetaName _GetCurrentBetaName;
|
||||
|
||||
#endregion
|
||||
internal bool GetCurrentBetaName( out string pchName )
|
||||
{
|
||||
IntPtr mempchName = Helpers.TakeMemory();
|
||||
var returnValue = _GetCurrentBetaName( Self, mempchName, (1024 * 32) );
|
||||
pchName = Helpers.MemoryToString( mempchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FMarkContentCorrupt( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly );
|
||||
private FMarkContentCorrupt _MarkContentCorrupt;
|
||||
|
||||
#endregion
|
||||
internal bool MarkContentCorrupt( [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly )
|
||||
{
|
||||
var returnValue = _MarkContentCorrupt( Self, bMissingFilesOnly );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetInstalledDepots( IntPtr self, AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots );
|
||||
private FGetInstalledDepots _GetInstalledDepots;
|
||||
|
||||
#endregion
|
||||
internal uint GetInstalledDepots( AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots )
|
||||
{
|
||||
var returnValue = _GetInstalledDepots( Self, appID, pvecDepots, cMaxDepots );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetAppInstallDir( IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize );
|
||||
private FGetAppInstallDir _GetAppInstallDir;
|
||||
|
||||
#endregion
|
||||
internal uint GetAppInstallDir( AppId appID, out string pchFolder )
|
||||
{
|
||||
IntPtr mempchFolder = Helpers.TakeMemory();
|
||||
var returnValue = _GetAppInstallDir( Self, appID, mempchFolder, (1024 * 32) );
|
||||
pchFolder = Helpers.MemoryToString( mempchFolder );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsAppInstalled( IntPtr self, AppId appID );
|
||||
private FBIsAppInstalled _BIsAppInstalled;
|
||||
|
||||
#endregion
|
||||
internal bool BIsAppInstalled( AppId appID )
|
||||
{
|
||||
var returnValue = _BIsAppInstalled( Self, appID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal string GetLaunchQueryParam( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
var returnValue = _GetLaunchQueryParam( Self, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetDlcDownloadProgress( IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal );
|
||||
private FGetDlcDownloadProgress _GetDlcDownloadProgress;
|
||||
|
||||
#endregion
|
||||
internal bool GetDlcDownloadProgress( AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal )
|
||||
{
|
||||
var returnValue = _GetDlcDownloadProgress( Self, nAppID, ref punBytesDownloaded, ref punBytesTotal );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetAppBuildId( IntPtr self );
|
||||
private FGetAppBuildId _GetAppBuildId;
|
||||
|
||||
#endregion
|
||||
internal int GetAppBuildId()
|
||||
{
|
||||
var returnValue = _GetAppBuildId( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRequestAllProofOfPurchaseKeys( IntPtr self );
|
||||
private FRequestAllProofOfPurchaseKeys _RequestAllProofOfPurchaseKeys;
|
||||
|
||||
#endregion
|
||||
internal void RequestAllProofOfPurchaseKeys()
|
||||
{
|
||||
_RequestAllProofOfPurchaseKeys( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FGetFileDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName );
|
||||
private FGetFileDetails _GetFileDetails;
|
||||
|
||||
#endregion
|
||||
internal async Task<FileDetailsResult_t?> GetFileDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName )
|
||||
{
|
||||
var returnValue = _GetFileDetails( Self, pszFileName );
|
||||
return await FileDetailsResult_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetLaunchCommandLine( IntPtr self, IntPtr pszCommandLine, int cubCommandLine );
|
||||
private FGetLaunchCommandLine _GetLaunchCommandLine;
|
||||
|
||||
#endregion
|
||||
internal int GetLaunchCommandLine( out string pszCommandLine )
|
||||
{
|
||||
IntPtr mempszCommandLine = Helpers.TakeMemory();
|
||||
var returnValue = _GetLaunchCommandLine( Self, mempszCommandLine, (1024 * 32) );
|
||||
pszCommandLine = Helpers.MemoryToString( mempszCommandLine );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsSubscribedFromFamilySharing( IntPtr self );
|
||||
private FBIsSubscribedFromFamilySharing _BIsSubscribedFromFamilySharing;
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribedFromFamilySharing()
|
||||
{
|
||||
var returnValue = _BIsSubscribedFromFamilySharing( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,642 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamGameServer : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamGameServer012";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_InitGameServer = Marshal.GetDelegateForFunctionPointer<FInitGameServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_SetProduct = Marshal.GetDelegateForFunctionPointer<FSetProduct>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_SetGameDescription = Marshal.GetDelegateForFunctionPointer<FSetGameDescription>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_SetModDir = Marshal.GetDelegateForFunctionPointer<FSetModDir>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_SetDedicatedServer = Marshal.GetDelegateForFunctionPointer<FSetDedicatedServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_LogOn = Marshal.GetDelegateForFunctionPointer<FLogOn>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_LogOnAnonymous = Marshal.GetDelegateForFunctionPointer<FLogOnAnonymous>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_LogOff = Marshal.GetDelegateForFunctionPointer<FLogOff>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_BLoggedOn = Marshal.GetDelegateForFunctionPointer<FBLoggedOn>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_BSecure = Marshal.GetDelegateForFunctionPointer<FBSecure>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetSteamID = Marshal.GetDelegateForFunctionPointer<FGetSteamID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_WasRestartRequested = Marshal.GetDelegateForFunctionPointer<FWasRestartRequested>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_SetMaxPlayerCount = Marshal.GetDelegateForFunctionPointer<FSetMaxPlayerCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_SetBotPlayerCount = Marshal.GetDelegateForFunctionPointer<FSetBotPlayerCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_SetServerName = Marshal.GetDelegateForFunctionPointer<FSetServerName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_SetMapName = Marshal.GetDelegateForFunctionPointer<FSetMapName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_SetPasswordProtected = Marshal.GetDelegateForFunctionPointer<FSetPasswordProtected>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_SetSpectatorPort = Marshal.GetDelegateForFunctionPointer<FSetSpectatorPort>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_SetSpectatorServerName = Marshal.GetDelegateForFunctionPointer<FSetSpectatorServerName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_ClearAllKeyValues = Marshal.GetDelegateForFunctionPointer<FClearAllKeyValues>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_SetKeyValue = Marshal.GetDelegateForFunctionPointer<FSetKeyValue>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_SetGameTags = Marshal.GetDelegateForFunctionPointer<FSetGameTags>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_SetGameData = Marshal.GetDelegateForFunctionPointer<FSetGameData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_SetRegion = Marshal.GetDelegateForFunctionPointer<FSetRegion>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_SendUserConnectAndAuthenticate = Marshal.GetDelegateForFunctionPointer<FSendUserConnectAndAuthenticate>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_CreateUnauthenticatedUserConnection = Marshal.GetDelegateForFunctionPointer<FCreateUnauthenticatedUserConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_SendUserDisconnect = Marshal.GetDelegateForFunctionPointer<FSendUserDisconnect>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_BUpdateUserData = Marshal.GetDelegateForFunctionPointer<FBUpdateUserData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_GetAuthSessionTicket = Marshal.GetDelegateForFunctionPointer<FGetAuthSessionTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_BeginAuthSession = Marshal.GetDelegateForFunctionPointer<FBeginAuthSession>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
_EndAuthSession = Marshal.GetDelegateForFunctionPointer<FEndAuthSession>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
|
||||
_CancelAuthTicket = Marshal.GetDelegateForFunctionPointer<FCancelAuthTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
|
||||
_UserHasLicenseForApp = Marshal.GetDelegateForFunctionPointer<FUserHasLicenseForApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
|
||||
_RequestUserGroupStatus = Marshal.GetDelegateForFunctionPointer<FRequestUserGroupStatus>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) );
|
||||
_GetGameplayStats = Marshal.GetDelegateForFunctionPointer<FGetGameplayStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) );
|
||||
_GetServerReputation = Marshal.GetDelegateForFunctionPointer<FGetServerReputation>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) );
|
||||
_GetPublicIP = Marshal.GetDelegateForFunctionPointer<FGetPublicIP>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) );
|
||||
_HandleIncomingPacket = Marshal.GetDelegateForFunctionPointer<FHandleIncomingPacket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) );
|
||||
_GetNextOutgoingPacket = Marshal.GetDelegateForFunctionPointer<FGetNextOutgoingPacket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 304 ) ) );
|
||||
_EnableHeartbeats = Marshal.GetDelegateForFunctionPointer<FEnableHeartbeats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) );
|
||||
_SetHeartbeatInterval = Marshal.GetDelegateForFunctionPointer<FSetHeartbeatInterval>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) );
|
||||
_ForceHeartbeat = Marshal.GetDelegateForFunctionPointer<FForceHeartbeat>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) );
|
||||
_AssociateWithClan = Marshal.GetDelegateForFunctionPointer<FAssociateWithClan>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) );
|
||||
_ComputeNewPlayerCompatibility = Marshal.GetDelegateForFunctionPointer<FComputeNewPlayerCompatibility>( 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;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal void SetProduct( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct )
|
||||
{
|
||||
_SetProduct( Self, pszProduct );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription );
|
||||
private FSetGameDescription _SetGameDescription;
|
||||
|
||||
#endregion
|
||||
internal void SetGameDescription( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription )
|
||||
{
|
||||
_SetGameDescription( Self, pszGameDescription );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir );
|
||||
private FSetModDir _SetModDir;
|
||||
|
||||
#endregion
|
||||
internal void SetModDir( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir )
|
||||
{
|
||||
_SetModDir( Self, pszModDir );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated );
|
||||
private FSetDedicatedServer _SetDedicatedServer;
|
||||
|
||||
#endregion
|
||||
internal void SetDedicatedServer( [MarshalAs( UnmanagedType.U1 )] bool bDedicated )
|
||||
{
|
||||
_SetDedicatedServer( Self, bDedicated );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FLogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken );
|
||||
private FLogOn _LogOn;
|
||||
|
||||
#endregion
|
||||
internal void LogOn( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken )
|
||||
{
|
||||
_LogOn( Self, pszToken );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FLogOnAnonymous( IntPtr self );
|
||||
private FLogOnAnonymous _LogOnAnonymous;
|
||||
|
||||
#endregion
|
||||
internal void LogOnAnonymous()
|
||||
{
|
||||
_LogOnAnonymous( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FLogOff( IntPtr self );
|
||||
private FLogOff _LogOff;
|
||||
|
||||
#endregion
|
||||
internal void LogOff()
|
||||
{
|
||||
_LogOff( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBLoggedOn( IntPtr self );
|
||||
private FBLoggedOn _BLoggedOn;
|
||||
|
||||
#endregion
|
||||
internal bool BLoggedOn()
|
||||
{
|
||||
var returnValue = _BLoggedOn( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBSecure( IntPtr self );
|
||||
private FBSecure _BSecure;
|
||||
|
||||
#endregion
|
||||
internal bool BSecure()
|
||||
{
|
||||
var returnValue = _BSecure( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#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 )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FWasRestartRequested( IntPtr self );
|
||||
private FWasRestartRequested _WasRestartRequested;
|
||||
|
||||
#endregion
|
||||
internal bool WasRestartRequested()
|
||||
{
|
||||
var returnValue = _WasRestartRequested( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetMaxPlayerCount( IntPtr self, int cPlayersMax );
|
||||
private FSetMaxPlayerCount _SetMaxPlayerCount;
|
||||
|
||||
#endregion
|
||||
internal void SetMaxPlayerCount( int cPlayersMax )
|
||||
{
|
||||
_SetMaxPlayerCount( Self, cPlayersMax );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetBotPlayerCount( IntPtr self, int cBotplayers );
|
||||
private FSetBotPlayerCount _SetBotPlayerCount;
|
||||
|
||||
#endregion
|
||||
internal void SetBotPlayerCount( int cBotplayers )
|
||||
{
|
||||
_SetBotPlayerCount( Self, cBotplayers );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName );
|
||||
private FSetServerName _SetServerName;
|
||||
|
||||
#endregion
|
||||
internal void SetServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName )
|
||||
{
|
||||
_SetServerName( Self, pszServerName );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName );
|
||||
private FSetMapName _SetMapName;
|
||||
|
||||
#endregion
|
||||
internal void SetMapName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName )
|
||||
{
|
||||
_SetMapName( Self, pszMapName );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected );
|
||||
private FSetPasswordProtected _SetPasswordProtected;
|
||||
|
||||
#endregion
|
||||
internal void SetPasswordProtected( [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected )
|
||||
{
|
||||
_SetPasswordProtected( Self, bPasswordProtected );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetSpectatorPort( IntPtr self, ushort unSpectatorPort );
|
||||
private FSetSpectatorPort _SetSpectatorPort;
|
||||
|
||||
#endregion
|
||||
internal void SetSpectatorPort( ushort unSpectatorPort )
|
||||
{
|
||||
_SetSpectatorPort( Self, unSpectatorPort );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName );
|
||||
private FSetSpectatorServerName _SetSpectatorServerName;
|
||||
|
||||
#endregion
|
||||
internal void SetSpectatorServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName )
|
||||
{
|
||||
_SetSpectatorServerName( Self, pszSpectatorServerName );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FClearAllKeyValues( IntPtr self );
|
||||
private FClearAllKeyValues _ClearAllKeyValues;
|
||||
|
||||
#endregion
|
||||
internal void ClearAllKeyValues()
|
||||
{
|
||||
_ClearAllKeyValues( Self );
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal void SetKeyValue( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue )
|
||||
{
|
||||
_SetKeyValue( Self, pKey, pValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags );
|
||||
private FSetGameTags _SetGameTags;
|
||||
|
||||
#endregion
|
||||
internal void SetGameTags( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags )
|
||||
{
|
||||
_SetGameTags( Self, pchGameTags );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData );
|
||||
private FSetGameData _SetGameData;
|
||||
|
||||
#endregion
|
||||
internal void SetGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData )
|
||||
{
|
||||
_SetGameData( Self, pchGameData );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion );
|
||||
private FSetRegion _SetRegion;
|
||||
|
||||
#endregion
|
||||
internal void SetRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion )
|
||||
{
|
||||
_SetRegion( Self, pszRegion );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSendUserConnectAndAuthenticate( IntPtr self, uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser );
|
||||
private FSendUserConnectAndAuthenticate _SendUserConnectAndAuthenticate;
|
||||
|
||||
#endregion
|
||||
internal bool SendUserConnectAndAuthenticate( uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser )
|
||||
{
|
||||
var returnValue = _SendUserConnectAndAuthenticate( Self, unIPClient, pvAuthBlob, cubAuthBlobSize, ref pSteamIDUser );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FCreateUnauthenticatedUserConnection( IntPtr self, ref SteamId retVal );
|
||||
#else
|
||||
private delegate SteamId FCreateUnauthenticatedUserConnection( IntPtr self );
|
||||
#endif
|
||||
private FCreateUnauthenticatedUserConnection _CreateUnauthenticatedUserConnection;
|
||||
|
||||
#endregion
|
||||
internal SteamId CreateUnauthenticatedUserConnection()
|
||||
{
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_CreateUnauthenticatedUserConnection( Self, ref retVal );
|
||||
return retVal;
|
||||
#else
|
||||
var returnValue = _CreateUnauthenticatedUserConnection( Self );
|
||||
return returnValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSendUserDisconnect( IntPtr self, SteamId steamIDUser );
|
||||
private FSendUserDisconnect _SendUserDisconnect;
|
||||
|
||||
#endregion
|
||||
internal void SendUserDisconnect( SteamId steamIDUser )
|
||||
{
|
||||
_SendUserDisconnect( Self, steamIDUser );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBUpdateUserData( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore );
|
||||
private FBUpdateUserData _BUpdateUserData;
|
||||
|
||||
#endregion
|
||||
internal bool BUpdateUserData( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore )
|
||||
{
|
||||
var returnValue = _BUpdateUserData( Self, steamIDUser, pchPlayerName, uScore );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
|
||||
private FGetAuthSessionTicket _GetAuthSessionTicket;
|
||||
|
||||
#endregion
|
||||
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
|
||||
{
|
||||
var returnValue = _GetAuthSessionTicket( Self, pTicket, cbMaxTicket, ref pcbTicket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate BeginAuthResult FBeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
|
||||
private FBeginAuthSession _BeginAuthSession;
|
||||
|
||||
#endregion
|
||||
internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID )
|
||||
{
|
||||
var returnValue = _BeginAuthSession( Self, pAuthTicket, cbAuthTicket, steamID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FEndAuthSession( IntPtr self, SteamId steamID );
|
||||
private FEndAuthSession _EndAuthSession;
|
||||
|
||||
#endregion
|
||||
internal void EndAuthSession( SteamId steamID )
|
||||
{
|
||||
_EndAuthSession( Self, steamID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FCancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
|
||||
private FCancelAuthTicket _CancelAuthTicket;
|
||||
|
||||
#endregion
|
||||
internal void CancelAuthTicket( HAuthTicket hAuthTicket )
|
||||
{
|
||||
_CancelAuthTicket( Self, hAuthTicket );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate UserHasLicenseForAppResult FUserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
|
||||
private FUserHasLicenseForApp _UserHasLicenseForApp;
|
||||
|
||||
#endregion
|
||||
internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID )
|
||||
{
|
||||
var returnValue = _UserHasLicenseForApp( Self, steamID, appID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FRequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup );
|
||||
private FRequestUserGroupStatus _RequestUserGroupStatus;
|
||||
|
||||
#endregion
|
||||
internal bool RequestUserGroupStatus( SteamId steamIDUser, SteamId steamIDGroup )
|
||||
{
|
||||
var returnValue = _RequestUserGroupStatus( Self, steamIDUser, steamIDGroup );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FGetGameplayStats( IntPtr self );
|
||||
private FGetGameplayStats _GetGameplayStats;
|
||||
|
||||
#endregion
|
||||
internal void GetGameplayStats()
|
||||
{
|
||||
_GetGameplayStats( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FGetServerReputation( IntPtr self );
|
||||
private FGetServerReputation _GetServerReputation;
|
||||
|
||||
#endregion
|
||||
internal async Task<GSReputation_t?> GetServerReputation()
|
||||
{
|
||||
var returnValue = _GetServerReputation( Self );
|
||||
return await GSReputation_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetPublicIP( IntPtr self );
|
||||
private FGetPublicIP _GetPublicIP;
|
||||
|
||||
#endregion
|
||||
internal uint GetPublicIP()
|
||||
{
|
||||
var returnValue = _GetPublicIP( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FHandleIncomingPacket( IntPtr self, IntPtr pData, int cbData, uint srcIP, ushort srcPort );
|
||||
private FHandleIncomingPacket _HandleIncomingPacket;
|
||||
|
||||
#endregion
|
||||
internal bool HandleIncomingPacket( IntPtr pData, int cbData, uint srcIP, ushort srcPort )
|
||||
{
|
||||
var returnValue = _HandleIncomingPacket( Self, pData, cbData, srcIP, srcPort );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort );
|
||||
private FGetNextOutgoingPacket _GetNextOutgoingPacket;
|
||||
|
||||
#endregion
|
||||
internal int GetNextOutgoingPacket( IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort )
|
||||
{
|
||||
var returnValue = _GetNextOutgoingPacket( Self, pOut, cbMaxOut, ref pNetAdr, ref pPort );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FEnableHeartbeats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive );
|
||||
private FEnableHeartbeats _EnableHeartbeats;
|
||||
|
||||
#endregion
|
||||
internal void EnableHeartbeats( [MarshalAs( UnmanagedType.U1 )] bool bActive )
|
||||
{
|
||||
_EnableHeartbeats( Self, bActive );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetHeartbeatInterval( IntPtr self, int iHeartbeatInterval );
|
||||
private FSetHeartbeatInterval _SetHeartbeatInterval;
|
||||
|
||||
#endregion
|
||||
internal void SetHeartbeatInterval( int iHeartbeatInterval )
|
||||
{
|
||||
_SetHeartbeatInterval( Self, iHeartbeatInterval );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FForceHeartbeat( IntPtr self );
|
||||
private FForceHeartbeat _ForceHeartbeat;
|
||||
|
||||
#endregion
|
||||
internal void ForceHeartbeat()
|
||||
{
|
||||
_ForceHeartbeat( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FAssociateWithClan( IntPtr self, SteamId steamIDClan );
|
||||
private FAssociateWithClan _AssociateWithClan;
|
||||
|
||||
#endregion
|
||||
internal async Task<AssociateWithClanResult_t?> AssociateWithClan( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _AssociateWithClan( Self, steamIDClan );
|
||||
return await AssociateWithClanResult_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer );
|
||||
private FComputeNewPlayerCompatibility _ComputeNewPlayerCompatibility;
|
||||
|
||||
#endregion
|
||||
internal async Task<ComputeNewPlayerCompatibilityResult_t?> ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer )
|
||||
{
|
||||
var returnValue = _ComputeNewPlayerCompatibility( Self, steamIDNewPlayer );
|
||||
return await ComputeNewPlayerCompatibilityResult_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamGameServerStats : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamGameServerStats001";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_RequestUserStats = Marshal.GetDelegateForFunctionPointer<FRequestUserStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_GetUserAchievement = Marshal.GetDelegateForFunctionPointer<FGetUserAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_UpdateUserAvgRateStat = Marshal.GetDelegateForFunctionPointer<FUpdateUserAvgRateStat>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_SetUserAchievement = Marshal.GetDelegateForFunctionPointer<FSetUserAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_ClearUserAchievement = Marshal.GetDelegateForFunctionPointer<FClearUserAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_StoreUserStats = Marshal.GetDelegateForFunctionPointer<FStoreUserStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
|
||||
#if PLATFORM_WIN
|
||||
_GetUserStat1 = Marshal.GetDelegateForFunctionPointer<FGetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetUserStat2 = Marshal.GetDelegateForFunctionPointer<FGetUserStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_SetUserStat1 = Marshal.GetDelegateForFunctionPointer<FSetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_SetUserStat2 = Marshal.GetDelegateForFunctionPointer<FSetUserStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
#else
|
||||
_GetUserStat1 = Marshal.GetDelegateForFunctionPointer<FGetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetUserStat2 = Marshal.GetDelegateForFunctionPointer<FGetUserStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_SetUserStat1 = Marshal.GetDelegateForFunctionPointer<FSetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_SetUserStat2 = Marshal.GetDelegateForFunctionPointer<FSetUserStat2>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestUserStats( IntPtr self, SteamId steamIDUser );
|
||||
private FRequestUserStats _RequestUserStats;
|
||||
|
||||
#endregion
|
||||
internal async Task<GSStatsReceived_t?> RequestUserStats( SteamId steamIDUser )
|
||||
{
|
||||
var returnValue = _RequestUserStats( Self, steamIDUser );
|
||||
return await GSStatsReceived_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
{
|
||||
var returnValue = _GetUserStat1( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
{
|
||||
var returnValue = _GetUserStat2( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
{
|
||||
var returnValue = _GetUserAchievement( Self, steamIDUser, pchName, ref pbAchieved );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool SetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
|
||||
{
|
||||
var returnValue = _SetUserStat1( Self, steamIDUser, pchName, nData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool SetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
|
||||
{
|
||||
var returnValue = _SetUserStat2( Self, steamIDUser, pchName, fData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool UpdateUserAvgRateStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength )
|
||||
{
|
||||
var returnValue = _UpdateUserAvgRateStat( Self, steamIDUser, pchName, flCountThisSession, dSessionLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
private FSetUserAchievement _SetUserAchievement;
|
||||
|
||||
#endregion
|
||||
internal bool SetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
{
|
||||
var returnValue = _SetUserAchievement( Self, steamIDUser, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
private FClearUserAchievement _ClearUserAchievement;
|
||||
|
||||
#endregion
|
||||
internal bool ClearUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
{
|
||||
var returnValue = _ClearUserAchievement( Self, steamIDUser, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FStoreUserStats( IntPtr self, SteamId steamIDUser );
|
||||
private FStoreUserStats _StoreUserStats;
|
||||
|
||||
#endregion
|
||||
internal async Task<GSStatsStored_t?> StoreUserStats( SteamId steamIDUser )
|
||||
{
|
||||
var returnValue = _StoreUserStats( Self, steamIDUser );
|
||||
return await GSStatsStored_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,509 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamInput : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamInput001";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_DoInit = Marshal.GetDelegateForFunctionPointer<FDoInit>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_DoShutdown = Marshal.GetDelegateForFunctionPointer<FDoShutdown>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_RunFrame = Marshal.GetDelegateForFunctionPointer<FRunFrame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetConnectedControllers = Marshal.GetDelegateForFunctionPointer<FGetConnectedControllers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_GetActionSetHandle = Marshal.GetDelegateForFunctionPointer<FGetActionSetHandle>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_ActivateActionSet = Marshal.GetDelegateForFunctionPointer<FActivateActionSet>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetCurrentActionSet = Marshal.GetDelegateForFunctionPointer<FGetCurrentActionSet>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_ActivateActionSetLayer = Marshal.GetDelegateForFunctionPointer<FActivateActionSetLayer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_DeactivateActionSetLayer = Marshal.GetDelegateForFunctionPointer<FDeactivateActionSetLayer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_DeactivateAllActionSetLayers = Marshal.GetDelegateForFunctionPointer<FDeactivateAllActionSetLayers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetActiveActionSetLayers = Marshal.GetDelegateForFunctionPointer<FGetActiveActionSetLayers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GetDigitalActionHandle = Marshal.GetDelegateForFunctionPointer<FGetDigitalActionHandle>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_GetDigitalActionData = Marshal.GetDelegateForFunctionPointer<FGetDigitalActionData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_GetDigitalActionOrigins = Marshal.GetDelegateForFunctionPointer<FGetDigitalActionOrigins>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_GetAnalogActionHandle = Marshal.GetDelegateForFunctionPointer<FGetAnalogActionHandle>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetAnalogActionData = Marshal.GetDelegateForFunctionPointer<FGetAnalogActionData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_GetAnalogActionOrigins = Marshal.GetDelegateForFunctionPointer<FGetAnalogActionOrigins>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetGlyphForActionOrigin = Marshal.GetDelegateForFunctionPointer<FGetGlyphForActionOrigin>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetStringForActionOrigin = Marshal.GetDelegateForFunctionPointer<FGetStringForActionOrigin>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_StopAnalogActionMomentum = Marshal.GetDelegateForFunctionPointer<FStopAnalogActionMomentum>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetMotionData = Marshal.GetDelegateForFunctionPointer<FGetMotionData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_TriggerVibration = Marshal.GetDelegateForFunctionPointer<FTriggerVibration>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_SetLEDColor = Marshal.GetDelegateForFunctionPointer<FSetLEDColor>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_TriggerHapticPulse = Marshal.GetDelegateForFunctionPointer<FTriggerHapticPulse>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_TriggerRepeatedHapticPulse = Marshal.GetDelegateForFunctionPointer<FTriggerRepeatedHapticPulse>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_ShowBindingPanel = Marshal.GetDelegateForFunctionPointer<FShowBindingPanel>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_GetInputTypeForHandle = Marshal.GetDelegateForFunctionPointer<FGetInputTypeForHandle>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_GetControllerForGamepadIndex = Marshal.GetDelegateForFunctionPointer<FGetControllerForGamepadIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_GetGamepadIndexForController = Marshal.GetDelegateForFunctionPointer<FGetGamepadIndexForController>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_GetStringForXboxOrigin = Marshal.GetDelegateForFunctionPointer<FGetStringForXboxOrigin>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
_GetGlyphForXboxOrigin = Marshal.GetDelegateForFunctionPointer<FGetGlyphForXboxOrigin>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
|
||||
_GetActionOriginFromXboxOrigin = Marshal.GetDelegateForFunctionPointer<FGetActionOriginFromXboxOrigin>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
|
||||
_TranslateActionOrigin = Marshal.GetDelegateForFunctionPointer<FTranslateActionOrigin>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDoInit( IntPtr self );
|
||||
private FDoInit _DoInit;
|
||||
|
||||
#endregion
|
||||
internal bool DoInit()
|
||||
{
|
||||
var returnValue = _DoInit( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDoShutdown( IntPtr self );
|
||||
private FDoShutdown _DoShutdown;
|
||||
|
||||
#endregion
|
||||
internal bool DoShutdown()
|
||||
{
|
||||
var returnValue = _DoShutdown( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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 int FGetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut );
|
||||
private FGetConnectedControllers _GetConnectedControllers;
|
||||
|
||||
#endregion
|
||||
internal int GetConnectedControllers( [In,Out] InputHandle_t[] handlesOut )
|
||||
{
|
||||
var returnValue = _GetConnectedControllers( Self, handlesOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputActionSetHandle_t FGetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
|
||||
private FGetActionSetHandle _GetActionSetHandle;
|
||||
|
||||
#endregion
|
||||
internal InputActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName )
|
||||
{
|
||||
var returnValue = _GetActionSetHandle( Self, pszActionSetName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
|
||||
private FActivateActionSet _ActivateActionSet;
|
||||
|
||||
#endregion
|
||||
internal void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle )
|
||||
{
|
||||
_ActivateActionSet( Self, inputHandle, actionSetHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputActionSetHandle_t FGetCurrentActionSet( IntPtr self, InputHandle_t inputHandle );
|
||||
private FGetCurrentActionSet _GetCurrentActionSet;
|
||||
|
||||
#endregion
|
||||
internal InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle )
|
||||
{
|
||||
var returnValue = _GetCurrentActionSet( Self, inputHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
|
||||
private FActivateActionSetLayer _ActivateActionSetLayer;
|
||||
|
||||
#endregion
|
||||
internal void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
|
||||
{
|
||||
_ActivateActionSetLayer( Self, inputHandle, actionSetLayerHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FDeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
|
||||
private FDeactivateActionSetLayer _DeactivateActionSetLayer;
|
||||
|
||||
#endregion
|
||||
internal void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
|
||||
{
|
||||
_DeactivateActionSetLayer( Self, inputHandle, actionSetLayerHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FDeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle );
|
||||
private FDeactivateAllActionSetLayers _DeactivateAllActionSetLayers;
|
||||
|
||||
#endregion
|
||||
internal void DeactivateAllActionSetLayers( InputHandle_t inputHandle )
|
||||
{
|
||||
_DeactivateAllActionSetLayers( Self, inputHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut );
|
||||
private FGetActiveActionSetLayers _GetActiveActionSetLayers;
|
||||
|
||||
#endregion
|
||||
internal int GetActiveActionSetLayers( InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut )
|
||||
{
|
||||
var returnValue = _GetActiveActionSetLayers( Self, inputHandle, handlesOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputDigitalActionHandle_t FGetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
private FGetDigitalActionHandle _GetDigitalActionHandle;
|
||||
|
||||
#endregion
|
||||
internal InputDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
|
||||
{
|
||||
var returnValue = _GetDigitalActionHandle( Self, pszActionName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut )
|
||||
{
|
||||
var returnValue = _GetDigitalActionOrigins( Self, inputHandle, actionSetHandle, digitalActionHandle, ref originsOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputAnalogActionHandle_t FGetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
private FGetAnalogActionHandle _GetAnalogActionHandle;
|
||||
|
||||
#endregion
|
||||
internal InputAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
|
||||
{
|
||||
var returnValue = _GetAnalogActionHandle( Self, pszActionName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut )
|
||||
{
|
||||
var returnValue = _GetAnalogActionOrigins( Self, inputHandle, actionSetHandle, analogActionHandle, ref originsOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetGlyphForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
|
||||
private FGetGlyphForActionOrigin _GetGlyphForActionOrigin;
|
||||
|
||||
#endregion
|
||||
internal string GetGlyphForActionOrigin( InputActionOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetGlyphForActionOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
|
||||
private FGetStringForActionOrigin _GetStringForActionOrigin;
|
||||
|
||||
#endregion
|
||||
internal string GetStringForActionOrigin( InputActionOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetStringForActionOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FStopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
|
||||
private FStopAnalogActionMomentum _StopAnalogActionMomentum;
|
||||
|
||||
#endregion
|
||||
internal void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction )
|
||||
{
|
||||
_StopAnalogActionMomentum( Self, inputHandle, eAction );
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal void TriggerVibration( InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed )
|
||||
{
|
||||
_TriggerVibration( Self, inputHandle, usLeftSpeed, usRightSpeed );
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal void SetLEDColor( InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags )
|
||||
{
|
||||
_SetLEDColor( Self, inputHandle, nColorR, nColorG, nColorB, nFlags );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FTriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
|
||||
private FTriggerHapticPulse _TriggerHapticPulse;
|
||||
|
||||
#endregion
|
||||
internal void TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec )
|
||||
{
|
||||
_TriggerHapticPulse( Self, inputHandle, eTargetPad, usDurationMicroSec );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FTriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
|
||||
private FTriggerRepeatedHapticPulse _TriggerRepeatedHapticPulse;
|
||||
|
||||
#endregion
|
||||
internal void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags )
|
||||
{
|
||||
_TriggerRepeatedHapticPulse( Self, inputHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FShowBindingPanel( IntPtr self, InputHandle_t inputHandle );
|
||||
private FShowBindingPanel _ShowBindingPanel;
|
||||
|
||||
#endregion
|
||||
internal bool ShowBindingPanel( InputHandle_t inputHandle )
|
||||
{
|
||||
var returnValue = _ShowBindingPanel( Self, inputHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputType FGetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle );
|
||||
private FGetInputTypeForHandle _GetInputTypeForHandle;
|
||||
|
||||
#endregion
|
||||
internal InputType GetInputTypeForHandle( InputHandle_t inputHandle )
|
||||
{
|
||||
var returnValue = _GetInputTypeForHandle( Self, inputHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputHandle_t FGetControllerForGamepadIndex( IntPtr self, int nIndex );
|
||||
private FGetControllerForGamepadIndex _GetControllerForGamepadIndex;
|
||||
|
||||
#endregion
|
||||
internal InputHandle_t GetControllerForGamepadIndex( int nIndex )
|
||||
{
|
||||
var returnValue = _GetControllerForGamepadIndex( Self, nIndex );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle );
|
||||
private FGetGamepadIndexForController _GetGamepadIndexForController;
|
||||
|
||||
#endregion
|
||||
internal int GetGamepadIndexForController( InputHandle_t ulinputHandle )
|
||||
{
|
||||
var returnValue = _GetGamepadIndexForController( Self, ulinputHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
private FGetStringForXboxOrigin _GetStringForXboxOrigin;
|
||||
|
||||
#endregion
|
||||
internal string GetStringForXboxOrigin( XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetStringForXboxOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
private FGetGlyphForXboxOrigin _GetGlyphForXboxOrigin;
|
||||
|
||||
#endregion
|
||||
internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetGlyphForXboxOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputActionOrigin FGetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin );
|
||||
private FGetActionOriginFromXboxOrigin _GetActionOriginFromXboxOrigin;
|
||||
|
||||
#endregion
|
||||
internal InputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetActionOriginFromXboxOrigin( Self, inputHandle, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputActionOrigin FTranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin );
|
||||
private FTranslateActionOrigin _TranslateActionOrigin;
|
||||
|
||||
#endregion
|
||||
internal InputActionOrigin TranslateActionOrigin( InputType eDestinationInputType, InputActionOrigin eSourceOrigin )
|
||||
{
|
||||
var returnValue = _TranslateActionOrigin( Self, eDestinationInputType, eSourceOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,572 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamInventory : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMINVENTORY_INTERFACE_V003";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_GetResultStatus = Marshal.GetDelegateForFunctionPointer<FGetResultStatus>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_GetResultItems = Marshal.GetDelegateForFunctionPointer<FGetResultItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetResultItemProperty = Marshal.GetDelegateForFunctionPointer<FGetResultItemProperty>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetResultTimestamp = Marshal.GetDelegateForFunctionPointer<FGetResultTimestamp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_CheckResultSteamID = Marshal.GetDelegateForFunctionPointer<FCheckResultSteamID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_DestroyResult = Marshal.GetDelegateForFunctionPointer<FDestroyResult>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetAllItems = Marshal.GetDelegateForFunctionPointer<FGetAllItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_GetItemsByID = Marshal.GetDelegateForFunctionPointer<FGetItemsByID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_SerializeResult = Marshal.GetDelegateForFunctionPointer<FSerializeResult>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_DeserializeResult = Marshal.GetDelegateForFunctionPointer<FDeserializeResult>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GenerateItems = Marshal.GetDelegateForFunctionPointer<FGenerateItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GrantPromoItems = Marshal.GetDelegateForFunctionPointer<FGrantPromoItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_AddPromoItem = Marshal.GetDelegateForFunctionPointer<FAddPromoItem>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_AddPromoItems = Marshal.GetDelegateForFunctionPointer<FAddPromoItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_ConsumeItem = Marshal.GetDelegateForFunctionPointer<FConsumeItem>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_ExchangeItems = Marshal.GetDelegateForFunctionPointer<FExchangeItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_TransferItemQuantity = Marshal.GetDelegateForFunctionPointer<FTransferItemQuantity>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_SendItemDropHeartbeat = Marshal.GetDelegateForFunctionPointer<FSendItemDropHeartbeat>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_TriggerItemDrop = Marshal.GetDelegateForFunctionPointer<FTriggerItemDrop>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_TradeItems = Marshal.GetDelegateForFunctionPointer<FTradeItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_LoadItemDefinitions = Marshal.GetDelegateForFunctionPointer<FLoadItemDefinitions>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetItemDefinitionIDs = Marshal.GetDelegateForFunctionPointer<FGetItemDefinitionIDs>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_GetItemDefinitionProperty = Marshal.GetDelegateForFunctionPointer<FGetItemDefinitionProperty>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_RequestEligiblePromoItemDefinitionsIDs = Marshal.GetDelegateForFunctionPointer<FRequestEligiblePromoItemDefinitionsIDs>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_GetEligiblePromoItemDefinitionIDs = Marshal.GetDelegateForFunctionPointer<FGetEligiblePromoItemDefinitionIDs>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_StartPurchase = Marshal.GetDelegateForFunctionPointer<FStartPurchase>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_RequestPrices = Marshal.GetDelegateForFunctionPointer<FRequestPrices>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_GetNumItemsWithPrices = Marshal.GetDelegateForFunctionPointer<FGetNumItemsWithPrices>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_GetItemsWithPrices = Marshal.GetDelegateForFunctionPointer<FGetItemsWithPrices>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_GetItemPrice = Marshal.GetDelegateForFunctionPointer<FGetItemPrice>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
_StartUpdateProperties = Marshal.GetDelegateForFunctionPointer<FStartUpdateProperties>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
|
||||
_RemoveProperty = Marshal.GetDelegateForFunctionPointer<FRemoveProperty>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
|
||||
_SetProperty1 = Marshal.GetDelegateForFunctionPointer<FSetProperty1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
|
||||
_SetProperty2 = Marshal.GetDelegateForFunctionPointer<FSetProperty2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) );
|
||||
_SetProperty3 = Marshal.GetDelegateForFunctionPointer<FSetProperty3>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) );
|
||||
_SetProperty4 = Marshal.GetDelegateForFunctionPointer<FSetProperty4>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) );
|
||||
_SubmitUpdateProperties = Marshal.GetDelegateForFunctionPointer<FSubmitUpdateProperties>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Result FGetResultStatus( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
private FGetResultStatus _GetResultStatus;
|
||||
|
||||
#endregion
|
||||
internal Result GetResultStatus( SteamInventoryResult_t resultHandle )
|
||||
{
|
||||
var returnValue = _GetResultStatus( Self, resultHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetResultItems( IntPtr self, SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize );
|
||||
private FGetResultItems _GetResultItems;
|
||||
|
||||
#endregion
|
||||
internal bool GetResultItems( SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize )
|
||||
{
|
||||
var returnValue = _GetResultItems( Self, resultHandle, pOutItemsArray, ref punOutItemsArraySize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetResultItemProperty( SteamInventoryResult_t resultHandle, uint unItemIndex, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut )
|
||||
{
|
||||
IntPtr mempchValueBuffer = Helpers.TakeMemory();
|
||||
var returnValue = _GetResultItemProperty( Self, resultHandle, unItemIndex, pchPropertyName, mempchValueBuffer, ref punValueBufferSizeOut );
|
||||
pchValueBuffer = Helpers.MemoryToString( mempchValueBuffer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetResultTimestamp( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
private FGetResultTimestamp _GetResultTimestamp;
|
||||
|
||||
#endregion
|
||||
internal uint GetResultTimestamp( SteamInventoryResult_t resultHandle )
|
||||
{
|
||||
var returnValue = _GetResultTimestamp( Self, resultHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCheckResultSteamID( IntPtr self, SteamInventoryResult_t resultHandle, SteamId steamIDExpected );
|
||||
private FCheckResultSteamID _CheckResultSteamID;
|
||||
|
||||
#endregion
|
||||
internal bool CheckResultSteamID( SteamInventoryResult_t resultHandle, SteamId steamIDExpected )
|
||||
{
|
||||
var returnValue = _CheckResultSteamID( Self, resultHandle, steamIDExpected );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FDestroyResult( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
private FDestroyResult _DestroyResult;
|
||||
|
||||
#endregion
|
||||
internal void DestroyResult( SteamInventoryResult_t resultHandle )
|
||||
{
|
||||
_DestroyResult( Self, resultHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetAllItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
|
||||
private FGetAllItems _GetAllItems;
|
||||
|
||||
#endregion
|
||||
internal bool GetAllItems( ref SteamInventoryResult_t pResultHandle )
|
||||
{
|
||||
var returnValue = _GetAllItems( Self, ref pResultHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetItemsByID( IntPtr self, ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs );
|
||||
private FGetItemsByID _GetItemsByID;
|
||||
|
||||
#endregion
|
||||
internal bool GetItemsByID( ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs )
|
||||
{
|
||||
var returnValue = _GetItemsByID( Self, ref pResultHandle, ref pInstanceIDs, unCountInstanceIDs );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSerializeResult( IntPtr self, SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize );
|
||||
private FSerializeResult _SerializeResult;
|
||||
|
||||
#endregion
|
||||
internal bool SerializeResult( SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize )
|
||||
{
|
||||
var returnValue = _SerializeResult( Self, resultHandle, pOutBuffer, ref punOutBufferSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool DeserializeResult( ref SteamInventoryResult_t pOutResultHandle, IntPtr pBuffer, uint unBufferSize, [MarshalAs( UnmanagedType.U1 )] bool bRESERVED_MUST_BE_FALSE )
|
||||
{
|
||||
var returnValue = _DeserializeResult( Self, ref pOutResultHandle, pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GenerateItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength )
|
||||
{
|
||||
var returnValue = _GenerateItems( Self, ref pResultHandle, pArrayItemDefs, punArrayQuantity, unArrayLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGrantPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
|
||||
private FGrantPromoItems _GrantPromoItems;
|
||||
|
||||
#endregion
|
||||
internal bool GrantPromoItems( ref SteamInventoryResult_t pResultHandle )
|
||||
{
|
||||
var returnValue = _GrantPromoItems( Self, ref pResultHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FAddPromoItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef );
|
||||
private FAddPromoItem _AddPromoItem;
|
||||
|
||||
#endregion
|
||||
internal bool AddPromoItem( ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef )
|
||||
{
|
||||
var returnValue = _AddPromoItem( Self, ref pResultHandle, itemDef );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FAddPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength );
|
||||
private FAddPromoItems _AddPromoItems;
|
||||
|
||||
#endregion
|
||||
internal bool AddPromoItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength )
|
||||
{
|
||||
var returnValue = _AddPromoItems( Self, ref pResultHandle, pArrayItemDefs, unArrayLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FConsumeItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity );
|
||||
private FConsumeItem _ConsumeItem;
|
||||
|
||||
#endregion
|
||||
internal bool ConsumeItem( ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity )
|
||||
{
|
||||
var returnValue = _ConsumeItem( Self, ref pResultHandle, itemConsume, unQuantity );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#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 )
|
||||
{
|
||||
var returnValue = _ExchangeItems( Self, ref pResultHandle, pArrayGenerate, punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy, punArrayDestroyQuantity, unArrayDestroyLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FTransferItemQuantity( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest );
|
||||
private FTransferItemQuantity _TransferItemQuantity;
|
||||
|
||||
#endregion
|
||||
internal bool TransferItemQuantity( ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest )
|
||||
{
|
||||
var returnValue = _TransferItemQuantity( Self, ref pResultHandle, itemIdSource, unQuantity, itemIdDest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSendItemDropHeartbeat( IntPtr self );
|
||||
private FSendItemDropHeartbeat _SendItemDropHeartbeat;
|
||||
|
||||
#endregion
|
||||
internal void SendItemDropHeartbeat()
|
||||
{
|
||||
_SendItemDropHeartbeat( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FTriggerItemDrop( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition );
|
||||
private FTriggerItemDrop _TriggerItemDrop;
|
||||
|
||||
#endregion
|
||||
internal bool TriggerItemDrop( ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition )
|
||||
{
|
||||
var returnValue = _TriggerItemDrop( Self, ref pResultHandle, dropListDefinition );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#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 )
|
||||
{
|
||||
var returnValue = _TradeItems( Self, ref pResultHandle, steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FLoadItemDefinitions( IntPtr self );
|
||||
private FLoadItemDefinitions _LoadItemDefinitions;
|
||||
|
||||
#endregion
|
||||
internal bool LoadItemDefinitions()
|
||||
{
|
||||
var returnValue = _LoadItemDefinitions( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetItemDefinitionIDs( IntPtr self, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
|
||||
private FGetItemDefinitionIDs _GetItemDefinitionIDs;
|
||||
|
||||
#endregion
|
||||
internal bool GetItemDefinitionIDs( [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize )
|
||||
{
|
||||
var returnValue = _GetItemDefinitionIDs( Self, pItemDefIDs, ref punItemDefIDsArraySize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetItemDefinitionProperty( InventoryDefId iDefinition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut )
|
||||
{
|
||||
IntPtr mempchValueBuffer = Helpers.TakeMemory();
|
||||
var returnValue = _GetItemDefinitionProperty( Self, iDefinition, pchPropertyName, mempchValueBuffer, ref punValueBufferSizeOut );
|
||||
pchValueBuffer = Helpers.MemoryToString( mempchValueBuffer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestEligiblePromoItemDefinitionsIDs( IntPtr self, SteamId steamID );
|
||||
private FRequestEligiblePromoItemDefinitionsIDs _RequestEligiblePromoItemDefinitionsIDs;
|
||||
|
||||
#endregion
|
||||
internal async Task<SteamInventoryEligiblePromoItemDefIDs_t?> RequestEligiblePromoItemDefinitionsIDs( SteamId steamID )
|
||||
{
|
||||
var returnValue = _RequestEligiblePromoItemDefinitionsIDs( Self, steamID );
|
||||
return await SteamInventoryEligiblePromoItemDefIDs_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetEligiblePromoItemDefinitionIDs( IntPtr self, SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
|
||||
private FGetEligiblePromoItemDefinitionIDs _GetEligiblePromoItemDefinitionIDs;
|
||||
|
||||
#endregion
|
||||
internal bool GetEligiblePromoItemDefinitionIDs( SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize )
|
||||
{
|
||||
var returnValue = _GetEligiblePromoItemDefinitionIDs( Self, steamID, pItemDefIDs, ref punItemDefIDsArraySize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal async Task<SteamInventoryStartPurchaseResult_t?> StartPurchase( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength )
|
||||
{
|
||||
var returnValue = _StartPurchase( Self, pArrayItemDefs, punArrayQuantity, unArrayLength );
|
||||
return await SteamInventoryStartPurchaseResult_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestPrices( IntPtr self );
|
||||
private FRequestPrices _RequestPrices;
|
||||
|
||||
#endregion
|
||||
internal async Task<SteamInventoryRequestPricesResult_t?> RequestPrices()
|
||||
{
|
||||
var returnValue = _RequestPrices( Self );
|
||||
return await SteamInventoryRequestPricesResult_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetNumItemsWithPrices( IntPtr self );
|
||||
private FGetNumItemsWithPrices _GetNumItemsWithPrices;
|
||||
|
||||
#endregion
|
||||
internal uint GetNumItemsWithPrices()
|
||||
{
|
||||
var returnValue = _GetNumItemsWithPrices( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetItemsWithPrices( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] ulong[] pCurrentPrices, [In,Out] ulong[] pBasePrices, uint unArrayLength )
|
||||
{
|
||||
var returnValue = _GetItemsWithPrices( Self, pArrayItemDefs, pCurrentPrices, pBasePrices, unArrayLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetItemPrice( IntPtr self, InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice );
|
||||
private FGetItemPrice _GetItemPrice;
|
||||
|
||||
#endregion
|
||||
internal bool GetItemPrice( InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice )
|
||||
{
|
||||
var returnValue = _GetItemPrice( Self, iDefinition, ref pCurrentPrice, ref pBasePrice );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamInventoryUpdateHandle_t FStartUpdateProperties( IntPtr self );
|
||||
private FStartUpdateProperties _StartUpdateProperties;
|
||||
|
||||
#endregion
|
||||
internal SteamInventoryUpdateHandle_t StartUpdateProperties()
|
||||
{
|
||||
var returnValue = _StartUpdateProperties( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool RemoveProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName )
|
||||
{
|
||||
var returnValue = _RemoveProperty( Self, handle, nItemID, pchPropertyName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#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 )
|
||||
{
|
||||
var returnValue = _SetProperty1( Self, handle, nItemID, pchPropertyName, pchPropertyValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool SetProperty2( 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 );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool SetProperty3( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue )
|
||||
{
|
||||
var returnValue = _SetProperty3( Self, handle, nItemID, pchPropertyName, nValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool SetProperty4( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue )
|
||||
{
|
||||
var returnValue = _SetProperty4( Self, handle, nItemID, pchPropertyName, flValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSubmitUpdateProperties( IntPtr self, SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle );
|
||||
private FSubmitUpdateProperties _SubmitUpdateProperties;
|
||||
|
||||
#endregion
|
||||
internal bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle )
|
||||
{
|
||||
var returnValue = _SubmitUpdateProperties( Self, handle, ref pResultHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,594 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamMatchmaking : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamMatchMaking009";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_GetFavoriteGameCount = Marshal.GetDelegateForFunctionPointer<FGetFavoriteGameCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_GetFavoriteGame = Marshal.GetDelegateForFunctionPointer<FGetFavoriteGame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_AddFavoriteGame = Marshal.GetDelegateForFunctionPointer<FAddFavoriteGame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_RemoveFavoriteGame = Marshal.GetDelegateForFunctionPointer<FRemoveFavoriteGame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_RequestLobbyList = Marshal.GetDelegateForFunctionPointer<FRequestLobbyList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_AddRequestLobbyListStringFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListStringFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_AddRequestLobbyListNumericalFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListNumericalFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_AddRequestLobbyListNearValueFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListNearValueFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_AddRequestLobbyListFilterSlotsAvailable = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListFilterSlotsAvailable>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_AddRequestLobbyListDistanceFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListDistanceFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_AddRequestLobbyListResultCountFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListResultCountFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_AddRequestLobbyListCompatibleMembersFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListCompatibleMembersFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_GetLobbyByIndex = Marshal.GetDelegateForFunctionPointer<FGetLobbyByIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_CreateLobby = Marshal.GetDelegateForFunctionPointer<FCreateLobby>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_JoinLobby = Marshal.GetDelegateForFunctionPointer<FJoinLobby>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_LeaveLobby = Marshal.GetDelegateForFunctionPointer<FLeaveLobby>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_InviteUserToLobby = Marshal.GetDelegateForFunctionPointer<FInviteUserToLobby>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetNumLobbyMembers = Marshal.GetDelegateForFunctionPointer<FGetNumLobbyMembers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetLobbyMemberByIndex = Marshal.GetDelegateForFunctionPointer<FGetLobbyMemberByIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_GetLobbyData = Marshal.GetDelegateForFunctionPointer<FGetLobbyData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_SetLobbyData = Marshal.GetDelegateForFunctionPointer<FSetLobbyData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetLobbyDataCount = Marshal.GetDelegateForFunctionPointer<FGetLobbyDataCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_GetLobbyDataByIndex = Marshal.GetDelegateForFunctionPointer<FGetLobbyDataByIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_DeleteLobbyData = Marshal.GetDelegateForFunctionPointer<FDeleteLobbyData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_GetLobbyMemberData = Marshal.GetDelegateForFunctionPointer<FGetLobbyMemberData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_SetLobbyMemberData = Marshal.GetDelegateForFunctionPointer<FSetLobbyMemberData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_SendLobbyChatMsg = Marshal.GetDelegateForFunctionPointer<FSendLobbyChatMsg>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_GetLobbyChatEntry = Marshal.GetDelegateForFunctionPointer<FGetLobbyChatEntry>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_RequestLobbyData = Marshal.GetDelegateForFunctionPointer<FRequestLobbyData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_SetLobbyGameServer = Marshal.GetDelegateForFunctionPointer<FSetLobbyGameServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
_GetLobbyGameServer = Marshal.GetDelegateForFunctionPointer<FGetLobbyGameServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
|
||||
_SetLobbyMemberLimit = Marshal.GetDelegateForFunctionPointer<FSetLobbyMemberLimit>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
|
||||
_GetLobbyMemberLimit = Marshal.GetDelegateForFunctionPointer<FGetLobbyMemberLimit>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
|
||||
_SetLobbyType = Marshal.GetDelegateForFunctionPointer<FSetLobbyType>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) );
|
||||
_SetLobbyJoinable = Marshal.GetDelegateForFunctionPointer<FSetLobbyJoinable>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) );
|
||||
_GetLobbyOwner = Marshal.GetDelegateForFunctionPointer<FGetLobbyOwner>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) );
|
||||
_SetLobbyOwner = Marshal.GetDelegateForFunctionPointer<FSetLobbyOwner>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) );
|
||||
_SetLinkedLobby = Marshal.GetDelegateForFunctionPointer<FSetLinkedLobby>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetFavoriteGameCount( IntPtr self );
|
||||
private FGetFavoriteGameCount _GetFavoriteGameCount;
|
||||
|
||||
#endregion
|
||||
internal int GetFavoriteGameCount()
|
||||
{
|
||||
var returnValue = _GetFavoriteGameCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetFavoriteGame( int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer )
|
||||
{
|
||||
var returnValue = _GetFavoriteGame( Self, iGame, ref pnAppID, ref pnIP, ref pnConnPort, ref pnQueryPort, ref punFlags, ref pRTime32LastPlayedOnServer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FAddFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer );
|
||||
private FAddFavoriteGame _AddFavoriteGame;
|
||||
|
||||
#endregion
|
||||
internal int AddFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer )
|
||||
{
|
||||
var returnValue = _AddFavoriteGame( Self, nAppID, nIP, nConnPort, nQueryPort, unFlags, rTime32LastPlayedOnServer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FRemoveFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags );
|
||||
private FRemoveFavoriteGame _RemoveFavoriteGame;
|
||||
|
||||
#endregion
|
||||
internal bool RemoveFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags )
|
||||
{
|
||||
var returnValue = _RemoveFavoriteGame( Self, nAppID, nIP, nConnPort, nQueryPort, unFlags );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestLobbyList( IntPtr self );
|
||||
private FRequestLobbyList _RequestLobbyList;
|
||||
|
||||
#endregion
|
||||
internal async Task<LobbyMatchList_t?> RequestLobbyList()
|
||||
{
|
||||
var returnValue = _RequestLobbyList( Self );
|
||||
return await LobbyMatchList_t.GetResultAsync( 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;
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListStringFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValueToMatch, LobbyComparison eComparisonType )
|
||||
{
|
||||
_AddRequestLobbyListStringFilter( Self, pchKeyToMatch, pchValueToMatch, eComparisonType );
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListNumericalFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType )
|
||||
{
|
||||
_AddRequestLobbyListNumericalFilter( Self, pchKeyToMatch, nValueToMatch, eComparisonType );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListNearValueFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo );
|
||||
private FAddRequestLobbyListNearValueFilter _AddRequestLobbyListNearValueFilter;
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListNearValueFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo )
|
||||
{
|
||||
_AddRequestLobbyListNearValueFilter( Self, pchKeyToMatch, nValueToBeCloseTo );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListFilterSlotsAvailable( IntPtr self, int nSlotsAvailable );
|
||||
private FAddRequestLobbyListFilterSlotsAvailable _AddRequestLobbyListFilterSlotsAvailable;
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable )
|
||||
{
|
||||
_AddRequestLobbyListFilterSlotsAvailable( Self, nSlotsAvailable );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListDistanceFilter( IntPtr self, LobbyDistanceFilter eLobbyDistanceFilter );
|
||||
private FAddRequestLobbyListDistanceFilter _AddRequestLobbyListDistanceFilter;
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListDistanceFilter( LobbyDistanceFilter eLobbyDistanceFilter )
|
||||
{
|
||||
_AddRequestLobbyListDistanceFilter( Self, eLobbyDistanceFilter );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListResultCountFilter( IntPtr self, int cMaxResults );
|
||||
private FAddRequestLobbyListResultCountFilter _AddRequestLobbyListResultCountFilter;
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListResultCountFilter( int cMaxResults )
|
||||
{
|
||||
_AddRequestLobbyListResultCountFilter( Self, cMaxResults );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListCompatibleMembersFilter( IntPtr self, SteamId steamIDLobby );
|
||||
private FAddRequestLobbyListCompatibleMembersFilter _AddRequestLobbyListCompatibleMembersFilter;
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListCompatibleMembersFilter( SteamId steamIDLobby )
|
||||
{
|
||||
_AddRequestLobbyListCompatibleMembersFilter( Self, steamIDLobby );
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal async Task<LobbyCreated_t?> CreateLobby( LobbyType eLobbyType, int cMaxMembers )
|
||||
{
|
||||
var returnValue = _CreateLobby( Self, eLobbyType, cMaxMembers );
|
||||
return await LobbyCreated_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FJoinLobby( IntPtr self, SteamId steamIDLobby );
|
||||
private FJoinLobby _JoinLobby;
|
||||
|
||||
#endregion
|
||||
internal async Task<LobbyEnter_t?> JoinLobby( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _JoinLobby( Self, steamIDLobby );
|
||||
return await LobbyEnter_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FLeaveLobby( IntPtr self, SteamId steamIDLobby );
|
||||
private FLeaveLobby _LeaveLobby;
|
||||
|
||||
#endregion
|
||||
internal void LeaveLobby( SteamId steamIDLobby )
|
||||
{
|
||||
_LeaveLobby( Self, steamIDLobby );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FInviteUserToLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDInvitee );
|
||||
private FInviteUserToLobby _InviteUserToLobby;
|
||||
|
||||
#endregion
|
||||
internal bool InviteUserToLobby( SteamId steamIDLobby, SteamId steamIDInvitee )
|
||||
{
|
||||
var returnValue = _InviteUserToLobby( Self, steamIDLobby, steamIDInvitee );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetNumLobbyMembers( IntPtr self, SteamId steamIDLobby );
|
||||
private FGetNumLobbyMembers _GetNumLobbyMembers;
|
||||
|
||||
#endregion
|
||||
internal int GetNumLobbyMembers( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _GetNumLobbyMembers( Self, steamIDLobby );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal string GetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
var returnValue = _GetLobbyData( Self, steamIDLobby, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
{
|
||||
var returnValue = _SetLobbyData( Self, steamIDLobby, pchKey, pchValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetLobbyDataCount( IntPtr self, SteamId steamIDLobby );
|
||||
private FGetLobbyDataCount _GetLobbyDataCount;
|
||||
|
||||
#endregion
|
||||
internal int GetLobbyDataCount( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _GetLobbyDataCount( Self, steamIDLobby );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetLobbyDataByIndex( SteamId steamIDLobby, int iLobbyData, out string pchKey, out string pchValue )
|
||||
{
|
||||
IntPtr mempchKey = Helpers.TakeMemory();
|
||||
IntPtr mempchValue = Helpers.TakeMemory();
|
||||
var returnValue = _GetLobbyDataByIndex( Self, steamIDLobby, iLobbyData, mempchKey, (1024 * 32), mempchValue, (1024 * 32) );
|
||||
pchKey = Helpers.MemoryToString( mempchKey );
|
||||
pchValue = Helpers.MemoryToString( mempchValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDeleteLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
private FDeleteLobbyData _DeleteLobbyData;
|
||||
|
||||
#endregion
|
||||
internal bool DeleteLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
var returnValue = _DeleteLobbyData( Self, steamIDLobby, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal string GetLobbyMemberData( SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
var returnValue = _GetLobbyMemberData( Self, steamIDLobby, steamIDUser, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal void SetLobbyMemberData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
{
|
||||
_SetLobbyMemberData( Self, steamIDLobby, pchKey, pchValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSendLobbyChatMsg( IntPtr self, SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody );
|
||||
private FSendLobbyChatMsg _SendLobbyChatMsg;
|
||||
|
||||
#endregion
|
||||
internal bool SendLobbyChatMsg( SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody )
|
||||
{
|
||||
var returnValue = _SendLobbyChatMsg( Self, steamIDLobby, pvMsgBody, cubMsgBody );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal int GetLobbyChatEntry( SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType )
|
||||
{
|
||||
var returnValue = _GetLobbyChatEntry( Self, steamIDLobby, iChatID, ref pSteamIDUser, pvData, cubData, ref peChatEntryType );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FRequestLobbyData( IntPtr self, SteamId steamIDLobby );
|
||||
private FRequestLobbyData _RequestLobbyData;
|
||||
|
||||
#endregion
|
||||
internal bool RequestLobbyData( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _RequestLobbyData( Self, steamIDLobby );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetLobbyGameServer( IntPtr self, SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer );
|
||||
private FSetLobbyGameServer _SetLobbyGameServer;
|
||||
|
||||
#endregion
|
||||
internal void SetLobbyGameServer( SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer )
|
||||
{
|
||||
_SetLobbyGameServer( Self, steamIDLobby, unGameServerIP, unGameServerPort, steamIDGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetLobbyGameServer( IntPtr self, SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer );
|
||||
private FGetLobbyGameServer _GetLobbyGameServer;
|
||||
|
||||
#endregion
|
||||
internal bool GetLobbyGameServer( SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer )
|
||||
{
|
||||
var returnValue = _GetLobbyGameServer( Self, steamIDLobby, ref punGameServerIP, ref punGameServerPort, ref psteamIDGameServer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby, int cMaxMembers );
|
||||
private FSetLobbyMemberLimit _SetLobbyMemberLimit;
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyMemberLimit( SteamId steamIDLobby, int cMaxMembers )
|
||||
{
|
||||
var returnValue = _SetLobbyMemberLimit( Self, steamIDLobby, cMaxMembers );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby );
|
||||
private FGetLobbyMemberLimit _GetLobbyMemberLimit;
|
||||
|
||||
#endregion
|
||||
internal int GetLobbyMemberLimit( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _GetLobbyMemberLimit( Self, steamIDLobby );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLobbyType( IntPtr self, SteamId steamIDLobby, LobbyType eLobbyType );
|
||||
private FSetLobbyType _SetLobbyType;
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyType( SteamId steamIDLobby, LobbyType eLobbyType )
|
||||
{
|
||||
var returnValue = _SetLobbyType( Self, steamIDLobby, eLobbyType );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLobbyJoinable( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable );
|
||||
private FSetLobbyJoinable _SetLobbyJoinable;
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyJoinable( SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable )
|
||||
{
|
||||
var returnValue = _SetLobbyJoinable( Self, steamIDLobby, bLobbyJoinable );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#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 )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLobbyOwner( IntPtr self, SteamId steamIDLobby, SteamId steamIDNewOwner );
|
||||
private FSetLobbyOwner _SetLobbyOwner;
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyOwner( SteamId steamIDLobby, SteamId steamIDNewOwner )
|
||||
{
|
||||
var returnValue = _SetLobbyOwner( Self, steamIDLobby, steamIDNewOwner );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLinkedLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDLobbyDependent );
|
||||
private FSetLinkedLobby _SetLinkedLobby;
|
||||
|
||||
#endregion
|
||||
internal bool SetLinkedLobby( SteamId steamIDLobby, SteamId steamIDLobbyDependent )
|
||||
{
|
||||
var returnValue = _SetLinkedLobby( Self, steamIDLobby, steamIDLobbyDependent );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,286 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamMatchmakingServers : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamMatchMakingServers002";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_RequestInternetServerList = Marshal.GetDelegateForFunctionPointer<FRequestInternetServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_RequestLANServerList = Marshal.GetDelegateForFunctionPointer<FRequestLANServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_RequestFriendsServerList = Marshal.GetDelegateForFunctionPointer<FRequestFriendsServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_RequestFavoritesServerList = Marshal.GetDelegateForFunctionPointer<FRequestFavoritesServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_RequestHistoryServerList = Marshal.GetDelegateForFunctionPointer<FRequestHistoryServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_RequestSpectatorServerList = Marshal.GetDelegateForFunctionPointer<FRequestSpectatorServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_ReleaseRequest = Marshal.GetDelegateForFunctionPointer<FReleaseRequest>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_GetServerDetails = Marshal.GetDelegateForFunctionPointer<FGetServerDetails>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_CancelQuery = Marshal.GetDelegateForFunctionPointer<FCancelQuery>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_RefreshQuery = Marshal.GetDelegateForFunctionPointer<FRefreshQuery>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_IsRefreshing = Marshal.GetDelegateForFunctionPointer<FIsRefreshing>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GetServerCount = Marshal.GetDelegateForFunctionPointer<FGetServerCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_RefreshServer = Marshal.GetDelegateForFunctionPointer<FRefreshServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_PingServer = Marshal.GetDelegateForFunctionPointer<FPingServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_PlayerDetails = Marshal.GetDelegateForFunctionPointer<FPlayerDetails>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_ServerRules = Marshal.GetDelegateForFunctionPointer<FServerRules>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_CancelServerQuery = Marshal.GetDelegateForFunctionPointer<FCancelServerQuery>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerListRequest FRequestInternetServerList( IntPtr self, AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
private FRequestInternetServerList _RequestInternetServerList;
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestInternetServerList( AppId iApp, MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
int numPtrs = ppchFilters.Length;
|
||||
if (numPtrs <= 0) { numPtrs = 1; }
|
||||
|
||||
IntPtr[] filterPtrs = new IntPtr[numPtrs];
|
||||
GCHandle?[] filterHandles = new GCHandle?[numPtrs];
|
||||
for (int i=0;i<numPtrs; i++)
|
||||
{
|
||||
if (i < ppchFilters.Length)
|
||||
{
|
||||
filterHandles[i] = GCHandle.Alloc(ppchFilters[i], GCHandleType.Pinned);
|
||||
filterPtrs[i] = filterHandles[i]?.AddrOfPinnedObject() ?? IntPtr.Zero;
|
||||
}
|
||||
else
|
||||
{
|
||||
filterHandles[i] = null;
|
||||
filterPtrs[i] = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
GCHandle arrHandle = GCHandle.Alloc(filterPtrs, GCHandleType.Pinned);
|
||||
|
||||
var returnValue = _RequestInternetServerList( Self, iApp, arrHandle.AddrOfPinnedObject(), nFilters, pRequestServersResponse );
|
||||
|
||||
arrHandle.Free();
|
||||
for (int i = 0; i < numPtrs; i++)
|
||||
{
|
||||
filterHandles[i]?.Free();
|
||||
}
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerListRequest FRequestLANServerList( IntPtr self, AppId iApp, IntPtr pRequestServersResponse );
|
||||
private FRequestLANServerList _RequestLANServerList;
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestLANServerList( AppId iApp, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _RequestLANServerList( Self, iApp, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestFriendsServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _RequestFriendsServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestFavoritesServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _RequestFavoritesServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestHistoryServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _RequestHistoryServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestSpectatorServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _RequestSpectatorServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FReleaseRequest( IntPtr self, HServerListRequest hServerListRequest );
|
||||
private FReleaseRequest _ReleaseRequest;
|
||||
|
||||
#endregion
|
||||
internal void ReleaseRequest( HServerListRequest hServerListRequest )
|
||||
{
|
||||
_ReleaseRequest( Self, hServerListRequest );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate IntPtr FGetServerDetails( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
private FGetServerDetails _GetServerDetails;
|
||||
|
||||
#endregion
|
||||
internal gameserveritem_t GetServerDetails( HServerListRequest hRequest, int iServer )
|
||||
{
|
||||
var returnValue = _GetServerDetails( Self, hRequest, iServer );
|
||||
return gameserveritem_t.Fill( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FCancelQuery( IntPtr self, HServerListRequest hRequest );
|
||||
private FCancelQuery _CancelQuery;
|
||||
|
||||
#endregion
|
||||
internal void CancelQuery( HServerListRequest hRequest )
|
||||
{
|
||||
_CancelQuery( Self, hRequest );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRefreshQuery( IntPtr self, HServerListRequest hRequest );
|
||||
private FRefreshQuery _RefreshQuery;
|
||||
|
||||
#endregion
|
||||
internal void RefreshQuery( HServerListRequest hRequest )
|
||||
{
|
||||
_RefreshQuery( Self, hRequest );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsRefreshing( IntPtr self, HServerListRequest hRequest );
|
||||
private FIsRefreshing _IsRefreshing;
|
||||
|
||||
#endregion
|
||||
internal bool IsRefreshing( HServerListRequest hRequest )
|
||||
{
|
||||
var returnValue = _IsRefreshing( Self, hRequest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetServerCount( IntPtr self, HServerListRequest hRequest );
|
||||
private FGetServerCount _GetServerCount;
|
||||
|
||||
#endregion
|
||||
internal int GetServerCount( HServerListRequest hRequest )
|
||||
{
|
||||
var returnValue = _GetServerCount( Self, hRequest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRefreshServer( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
private FRefreshServer _RefreshServer;
|
||||
|
||||
#endregion
|
||||
internal void RefreshServer( HServerListRequest hRequest, int iServer )
|
||||
{
|
||||
_RefreshServer( Self, hRequest, iServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerQuery FPingServer( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
private FPingServer _PingServer;
|
||||
|
||||
#endregion
|
||||
internal HServerQuery PingServer( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _PingServer( Self, unIP, usPort, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerQuery FPlayerDetails( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
private FPlayerDetails _PlayerDetails;
|
||||
|
||||
#endregion
|
||||
internal HServerQuery PlayerDetails( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _PlayerDetails( Self, unIP, usPort, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerQuery FServerRules( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
private FServerRules _ServerRules;
|
||||
|
||||
#endregion
|
||||
internal HServerQuery ServerRules( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _ServerRules( Self, unIP, usPort, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FCancelServerQuery( IntPtr self, HServerQuery hServerQuery );
|
||||
private FCancelServerQuery _CancelServerQuery;
|
||||
|
||||
#endregion
|
||||
internal void CancelServerQuery( HServerQuery hServerQuery )
|
||||
{
|
||||
_CancelServerQuery( Self, hServerQuery );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,147 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamMusic : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMMUSIC_INTERFACE_VERSION001";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_BIsEnabled = Marshal.GetDelegateForFunctionPointer<FBIsEnabled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_BIsPlaying = Marshal.GetDelegateForFunctionPointer<FBIsPlaying>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetPlaybackStatus = Marshal.GetDelegateForFunctionPointer<FGetPlaybackStatus>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_Play = Marshal.GetDelegateForFunctionPointer<FPlay>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_Pause = Marshal.GetDelegateForFunctionPointer<FPause>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_PlayPrevious = Marshal.GetDelegateForFunctionPointer<FPlayPrevious>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_PlayNext = Marshal.GetDelegateForFunctionPointer<FPlayNext>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_SetVolume = Marshal.GetDelegateForFunctionPointer<FSetVolume>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_GetVolume = Marshal.GetDelegateForFunctionPointer<FGetVolume>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsEnabled( IntPtr self );
|
||||
private FBIsEnabled _BIsEnabled;
|
||||
|
||||
#endregion
|
||||
internal bool BIsEnabled()
|
||||
{
|
||||
var returnValue = _BIsEnabled( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsPlaying( IntPtr self );
|
||||
private FBIsPlaying _BIsPlaying;
|
||||
|
||||
#endregion
|
||||
internal bool BIsPlaying()
|
||||
{
|
||||
var returnValue = _BIsPlaying( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate MusicStatus FGetPlaybackStatus( IntPtr self );
|
||||
private FGetPlaybackStatus _GetPlaybackStatus;
|
||||
|
||||
#endregion
|
||||
internal MusicStatus GetPlaybackStatus()
|
||||
{
|
||||
var returnValue = _GetPlaybackStatus( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FPlay( IntPtr self );
|
||||
private FPlay _Play;
|
||||
|
||||
#endregion
|
||||
internal void Play()
|
||||
{
|
||||
_Play( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FPause( IntPtr self );
|
||||
private FPause _Pause;
|
||||
|
||||
#endregion
|
||||
internal void Pause()
|
||||
{
|
||||
_Pause( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FPlayPrevious( IntPtr self );
|
||||
private FPlayPrevious _PlayPrevious;
|
||||
|
||||
#endregion
|
||||
internal void PlayPrevious()
|
||||
{
|
||||
_PlayPrevious( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FPlayNext( IntPtr self );
|
||||
private FPlayNext _PlayNext;
|
||||
|
||||
#endregion
|
||||
internal void PlayNext()
|
||||
{
|
||||
_PlayNext( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetVolume( IntPtr self, float flVolume );
|
||||
private FSetVolume _SetVolume;
|
||||
|
||||
#endregion
|
||||
internal void SetVolume( float flVolume )
|
||||
{
|
||||
_SetVolume( Self, flVolume );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate float FGetVolume( IntPtr self );
|
||||
private FGetVolume _GetVolume;
|
||||
|
||||
#endregion
|
||||
internal float GetVolume()
|
||||
{
|
||||
var returnValue = _GetVolume( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,349 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamNetworking : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamNetworking005";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_SendP2PPacket = Marshal.GetDelegateForFunctionPointer<FSendP2PPacket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_IsP2PPacketAvailable = Marshal.GetDelegateForFunctionPointer<FIsP2PPacketAvailable>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_ReadP2PPacket = Marshal.GetDelegateForFunctionPointer<FReadP2PPacket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_AcceptP2PSessionWithUser = Marshal.GetDelegateForFunctionPointer<FAcceptP2PSessionWithUser>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_CloseP2PSessionWithUser = Marshal.GetDelegateForFunctionPointer<FCloseP2PSessionWithUser>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_CloseP2PChannelWithUser = Marshal.GetDelegateForFunctionPointer<FCloseP2PChannelWithUser>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetP2PSessionState = Marshal.GetDelegateForFunctionPointer<FGetP2PSessionState>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_AllowP2PPacketRelay = Marshal.GetDelegateForFunctionPointer<FAllowP2PPacketRelay>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_CreateListenSocket = Marshal.GetDelegateForFunctionPointer<FCreateListenSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_CreateP2PConnectionSocket = Marshal.GetDelegateForFunctionPointer<FCreateP2PConnectionSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_CreateConnectionSocket = Marshal.GetDelegateForFunctionPointer<FCreateConnectionSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_DestroySocket = Marshal.GetDelegateForFunctionPointer<FDestroySocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_DestroyListenSocket = Marshal.GetDelegateForFunctionPointer<FDestroyListenSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_SendDataOnSocket = Marshal.GetDelegateForFunctionPointer<FSendDataOnSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_IsDataAvailableOnSocket = Marshal.GetDelegateForFunctionPointer<FIsDataAvailableOnSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_RetrieveDataFromSocket = Marshal.GetDelegateForFunctionPointer<FRetrieveDataFromSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_IsDataAvailable = Marshal.GetDelegateForFunctionPointer<FIsDataAvailable>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_RetrieveData = Marshal.GetDelegateForFunctionPointer<FRetrieveData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetSocketInfo = Marshal.GetDelegateForFunctionPointer<FGetSocketInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_GetListenSocketInfo = Marshal.GetDelegateForFunctionPointer<FGetListenSocketInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetSocketConnectionType = Marshal.GetDelegateForFunctionPointer<FGetSocketConnectionType>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetMaxPacketSize = Marshal.GetDelegateForFunctionPointer<FGetMaxPacketSize>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSendP2PPacket( IntPtr self, SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel );
|
||||
private FSendP2PPacket _SendP2PPacket;
|
||||
|
||||
#endregion
|
||||
internal bool SendP2PPacket( SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel )
|
||||
{
|
||||
var returnValue = _SendP2PPacket( Self, steamIDRemote, pubData, cubData, eP2PSendType, nChannel );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsP2PPacketAvailable( IntPtr self, ref uint pcubMsgSize, int nChannel );
|
||||
private FIsP2PPacketAvailable _IsP2PPacketAvailable;
|
||||
|
||||
#endregion
|
||||
internal bool IsP2PPacketAvailable( ref uint pcubMsgSize, int nChannel )
|
||||
{
|
||||
var returnValue = _IsP2PPacketAvailable( Self, ref pcubMsgSize, nChannel );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool ReadP2PPacket( IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref SteamId psteamIDRemote, int nChannel )
|
||||
{
|
||||
var returnValue = _ReadP2PPacket( Self, pubDest, cubDest, ref pcubMsgSize, ref psteamIDRemote, nChannel );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FAcceptP2PSessionWithUser( IntPtr self, SteamId steamIDRemote );
|
||||
private FAcceptP2PSessionWithUser _AcceptP2PSessionWithUser;
|
||||
|
||||
#endregion
|
||||
internal bool AcceptP2PSessionWithUser( SteamId steamIDRemote )
|
||||
{
|
||||
var returnValue = _AcceptP2PSessionWithUser( Self, steamIDRemote );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCloseP2PSessionWithUser( IntPtr self, SteamId steamIDRemote );
|
||||
private FCloseP2PSessionWithUser _CloseP2PSessionWithUser;
|
||||
|
||||
#endregion
|
||||
internal bool CloseP2PSessionWithUser( SteamId steamIDRemote )
|
||||
{
|
||||
var returnValue = _CloseP2PSessionWithUser( Self, steamIDRemote );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCloseP2PChannelWithUser( IntPtr self, SteamId steamIDRemote, int nChannel );
|
||||
private FCloseP2PChannelWithUser _CloseP2PChannelWithUser;
|
||||
|
||||
#endregion
|
||||
internal bool CloseP2PChannelWithUser( SteamId steamIDRemote, int nChannel )
|
||||
{
|
||||
var returnValue = _CloseP2PChannelWithUser( Self, steamIDRemote, nChannel );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetP2PSessionState( IntPtr self, SteamId steamIDRemote, ref P2PSessionState_t pConnectionState );
|
||||
private FGetP2PSessionState _GetP2PSessionState;
|
||||
|
||||
#endregion
|
||||
internal bool GetP2PSessionState( SteamId steamIDRemote, ref P2PSessionState_t pConnectionState )
|
||||
{
|
||||
var returnValue = _GetP2PSessionState( Self, steamIDRemote, ref pConnectionState );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FAllowP2PPacketRelay( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllow );
|
||||
private FAllowP2PPacketRelay _AllowP2PPacketRelay;
|
||||
|
||||
#endregion
|
||||
internal bool AllowP2PPacketRelay( [MarshalAs( UnmanagedType.U1 )] bool bAllow )
|
||||
{
|
||||
var returnValue = _AllowP2PPacketRelay( Self, bAllow );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint 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;
|
||||
|
||||
#endregion
|
||||
internal SNetSocket_t CreateP2PConnectionSocket( SteamId steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay )
|
||||
{
|
||||
var returnValue = _CreateP2PConnectionSocket( Self, steamIDTarget, nVirtualPort, nTimeoutSec, bAllowUseOfPacketRelay );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SNetSocket_t FCreateConnectionSocket( IntPtr self, uint nIP, ushort nPort, int nTimeoutSec );
|
||||
private FCreateConnectionSocket _CreateConnectionSocket;
|
||||
|
||||
#endregion
|
||||
internal SNetSocket_t CreateConnectionSocket( uint nIP, ushort nPort, int nTimeoutSec )
|
||||
{
|
||||
var returnValue = _CreateConnectionSocket( Self, nIP, nPort, nTimeoutSec );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDestroySocket( IntPtr self, SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd );
|
||||
private FDestroySocket _DestroySocket;
|
||||
|
||||
#endregion
|
||||
internal bool DestroySocket( SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd )
|
||||
{
|
||||
var returnValue = _DestroySocket( Self, hSocket, bNotifyRemoteEnd );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDestroyListenSocket( IntPtr self, SNetListenSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd );
|
||||
private FDestroyListenSocket _DestroyListenSocket;
|
||||
|
||||
#endregion
|
||||
internal bool DestroyListenSocket( SNetListenSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd )
|
||||
{
|
||||
var returnValue = _DestroyListenSocket( Self, hSocket, bNotifyRemoteEnd );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool SendDataOnSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] pubData, uint cubData, [MarshalAs( UnmanagedType.U1 )] bool bReliable )
|
||||
{
|
||||
var returnValue = _SendDataOnSocket( Self, hSocket, pubData, cubData, bReliable );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsDataAvailableOnSocket( IntPtr self, SNetSocket_t hSocket, ref uint pcubMsgSize );
|
||||
private FIsDataAvailableOnSocket _IsDataAvailableOnSocket;
|
||||
|
||||
#endregion
|
||||
internal bool IsDataAvailableOnSocket( SNetSocket_t hSocket, ref uint pcubMsgSize )
|
||||
{
|
||||
var returnValue = _IsDataAvailableOnSocket( Self, hSocket, ref pcubMsgSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool RetrieveDataFromSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize )
|
||||
{
|
||||
var returnValue = _RetrieveDataFromSocket( Self, hSocket, pubDest, cubDest, ref pcubMsgSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsDataAvailable( IntPtr self, SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket );
|
||||
private FIsDataAvailable _IsDataAvailable;
|
||||
|
||||
#endregion
|
||||
internal bool IsDataAvailable( SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket )
|
||||
{
|
||||
var returnValue = _IsDataAvailable( Self, hListenSocket, ref pcubMsgSize, ref phSocket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool RetrieveData( SNetListenSocket_t hListenSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize, ref SNetSocket_t phSocket )
|
||||
{
|
||||
var returnValue = _RetrieveData( Self, hListenSocket, pubDest, cubDest, ref pcubMsgSize, ref phSocket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetSocketInfo( SNetSocket_t hSocket, ref SteamId pSteamIDRemote, ref int peSocketStatus, ref uint punIPRemote, ref ushort punPortRemote )
|
||||
{
|
||||
var returnValue = _GetSocketInfo( Self, hSocket, ref pSteamIDRemote, ref peSocketStatus, ref punIPRemote, ref punPortRemote );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetListenSocketInfo( IntPtr self, SNetListenSocket_t hListenSocket, ref uint pnIP, ref ushort pnPort );
|
||||
private FGetListenSocketInfo _GetListenSocketInfo;
|
||||
|
||||
#endregion
|
||||
internal bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, ref uint 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;
|
||||
|
||||
#endregion
|
||||
internal SNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket )
|
||||
{
|
||||
var returnValue = _GetSocketConnectionType( Self, hSocket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetMaxPacketSize( IntPtr self, SNetSocket_t hSocket );
|
||||
private FGetMaxPacketSize _GetMaxPacketSize;
|
||||
|
||||
#endregion
|
||||
internal int GetMaxPacketSize( SNetSocket_t hSocket )
|
||||
{
|
||||
var returnValue = _GetMaxPacketSize( Self, hSocket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,443 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamNetworkingSockets : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamNetworkingSockets002";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_CreateListenSocketIP = Marshal.GetDelegateForFunctionPointer<FCreateListenSocketIP>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_ConnectByIPAddress = Marshal.GetDelegateForFunctionPointer<FConnectByIPAddress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_CreateListenSocketP2P = Marshal.GetDelegateForFunctionPointer<FCreateListenSocketP2P>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_ConnectP2P = Marshal.GetDelegateForFunctionPointer<FConnectP2P>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_AcceptConnection = Marshal.GetDelegateForFunctionPointer<FAcceptConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_CloseConnection = Marshal.GetDelegateForFunctionPointer<FCloseConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_CloseListenSocket = Marshal.GetDelegateForFunctionPointer<FCloseListenSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_SetConnectionUserData = Marshal.GetDelegateForFunctionPointer<FSetConnectionUserData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_GetConnectionUserData = Marshal.GetDelegateForFunctionPointer<FGetConnectionUserData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_SetConnectionName = Marshal.GetDelegateForFunctionPointer<FSetConnectionName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetConnectionName = Marshal.GetDelegateForFunctionPointer<FGetConnectionName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_SendMessageToConnection = Marshal.GetDelegateForFunctionPointer<FSendMessageToConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_FlushMessagesOnConnection = Marshal.GetDelegateForFunctionPointer<FFlushMessagesOnConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_ReceiveMessagesOnConnection = Marshal.GetDelegateForFunctionPointer<FReceiveMessagesOnConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_ReceiveMessagesOnListenSocket = Marshal.GetDelegateForFunctionPointer<FReceiveMessagesOnListenSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetConnectionInfo = Marshal.GetDelegateForFunctionPointer<FGetConnectionInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_GetQuickConnectionStatus = Marshal.GetDelegateForFunctionPointer<FGetQuickConnectionStatus>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetDetailedConnectionStatus = Marshal.GetDelegateForFunctionPointer<FGetDetailedConnectionStatus>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetListenSocketAddress = Marshal.GetDelegateForFunctionPointer<FGetListenSocketAddress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_CreateSocketPair = Marshal.GetDelegateForFunctionPointer<FCreateSocketPair>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetIdentity = Marshal.GetDelegateForFunctionPointer<FGetIdentity>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_ReceivedRelayAuthTicket = Marshal.GetDelegateForFunctionPointer<FReceivedRelayAuthTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_FindRelayAuthTicketForServer = Marshal.GetDelegateForFunctionPointer<FFindRelayAuthTicketForServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_ConnectToHostedDedicatedServer = Marshal.GetDelegateForFunctionPointer<FConnectToHostedDedicatedServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_GetHostedDedicatedServerPort = Marshal.GetDelegateForFunctionPointer<FGetHostedDedicatedServerPort>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_GetHostedDedicatedServerPOPID = Marshal.GetDelegateForFunctionPointer<FGetHostedDedicatedServerPOPID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_GetHostedDedicatedServerAddress = Marshal.GetDelegateForFunctionPointer<FGetHostedDedicatedServerAddress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_CreateHostedDedicatedServerListenSocket = Marshal.GetDelegateForFunctionPointer<FCreateHostedDedicatedServerListenSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_RunCallbacks = Marshal.GetDelegateForFunctionPointer<FRunCallbacks>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Socket FCreateListenSocketIP( IntPtr self, ref NetAddress localAddress );
|
||||
private FCreateListenSocketIP _CreateListenSocketIP;
|
||||
|
||||
#endregion
|
||||
internal Socket CreateListenSocketIP( ref NetAddress localAddress )
|
||||
{
|
||||
var returnValue = _CreateListenSocketIP( Self, ref localAddress );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Connection FConnectByIPAddress( IntPtr self, ref NetAddress address );
|
||||
private FConnectByIPAddress _ConnectByIPAddress;
|
||||
|
||||
#endregion
|
||||
internal Connection ConnectByIPAddress( ref NetAddress address )
|
||||
{
|
||||
var returnValue = _ConnectByIPAddress( Self, ref address );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Socket FCreateListenSocketP2P( IntPtr self, int nVirtualPort );
|
||||
private FCreateListenSocketP2P _CreateListenSocketP2P;
|
||||
|
||||
#endregion
|
||||
internal Socket CreateListenSocketP2P( int nVirtualPort )
|
||||
{
|
||||
var returnValue = _CreateListenSocketP2P( Self, nVirtualPort );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Connection FConnectP2P( IntPtr self, ref NetIdentity identityRemote, int nVirtualPort );
|
||||
private FConnectP2P _ConnectP2P;
|
||||
|
||||
#endregion
|
||||
internal Connection ConnectP2P( ref NetIdentity identityRemote, int nVirtualPort )
|
||||
{
|
||||
var returnValue = _ConnectP2P( Self, ref identityRemote, nVirtualPort );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Result FAcceptConnection( IntPtr self, Connection hConn );
|
||||
private FAcceptConnection _AcceptConnection;
|
||||
|
||||
#endregion
|
||||
internal Result AcceptConnection( Connection hConn )
|
||||
{
|
||||
var returnValue = _AcceptConnection( Self, hConn );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool CloseConnection( Connection hPeer, int nReason, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszDebug, [MarshalAs( UnmanagedType.U1 )] bool bEnableLinger )
|
||||
{
|
||||
var returnValue = _CloseConnection( Self, hPeer, nReason, pszDebug, bEnableLinger );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCloseListenSocket( IntPtr self, Socket hSocket );
|
||||
private FCloseListenSocket _CloseListenSocket;
|
||||
|
||||
#endregion
|
||||
internal bool CloseListenSocket( Socket hSocket )
|
||||
{
|
||||
var returnValue = _CloseListenSocket( Self, hSocket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetConnectionUserData( IntPtr self, Connection hPeer, long nUserData );
|
||||
private FSetConnectionUserData _SetConnectionUserData;
|
||||
|
||||
#endregion
|
||||
internal bool SetConnectionUserData( Connection hPeer, long nUserData )
|
||||
{
|
||||
var returnValue = _SetConnectionUserData( Self, hPeer, nUserData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate long FGetConnectionUserData( IntPtr self, Connection hPeer );
|
||||
private FGetConnectionUserData _GetConnectionUserData;
|
||||
|
||||
#endregion
|
||||
internal long GetConnectionUserData( Connection hPeer )
|
||||
{
|
||||
var returnValue = _GetConnectionUserData( Self, hPeer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetConnectionName( IntPtr self, Connection hPeer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszName );
|
||||
private FSetConnectionName _SetConnectionName;
|
||||
|
||||
#endregion
|
||||
internal void SetConnectionName( Connection hPeer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszName )
|
||||
{
|
||||
_SetConnectionName( Self, hPeer, pszName );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetConnectionName( IntPtr self, Connection hPeer, IntPtr pszName, int nMaxLen );
|
||||
private FGetConnectionName _GetConnectionName;
|
||||
|
||||
#endregion
|
||||
internal bool GetConnectionName( Connection hPeer, out string pszName )
|
||||
{
|
||||
IntPtr mempszName = Helpers.TakeMemory();
|
||||
var returnValue = _GetConnectionName( Self, hPeer, mempszName, (1024 * 32) );
|
||||
pszName = Helpers.MemoryToString( mempszName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Result FSendMessageToConnection( IntPtr self, Connection hConn, IntPtr pData, uint cbData, int nSendFlags );
|
||||
private FSendMessageToConnection _SendMessageToConnection;
|
||||
|
||||
#endregion
|
||||
internal Result SendMessageToConnection( Connection hConn, IntPtr pData, uint cbData, int nSendFlags )
|
||||
{
|
||||
var returnValue = _SendMessageToConnection( Self, hConn, pData, cbData, nSendFlags );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Result FFlushMessagesOnConnection( IntPtr self, Connection hConn );
|
||||
private FFlushMessagesOnConnection _FlushMessagesOnConnection;
|
||||
|
||||
#endregion
|
||||
internal Result FlushMessagesOnConnection( Connection hConn )
|
||||
{
|
||||
var returnValue = _FlushMessagesOnConnection( Self, hConn );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FReceiveMessagesOnConnection( IntPtr self, Connection hConn, IntPtr ppOutMessages, int nMaxMessages );
|
||||
private FReceiveMessagesOnConnection _ReceiveMessagesOnConnection;
|
||||
|
||||
#endregion
|
||||
internal int ReceiveMessagesOnConnection( Connection hConn, IntPtr ppOutMessages, int nMaxMessages )
|
||||
{
|
||||
var returnValue = _ReceiveMessagesOnConnection( Self, hConn, ppOutMessages, nMaxMessages );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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 )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetConnectionInfo( IntPtr self, Connection hConn, ref ConnectionInfo pInfo );
|
||||
private FGetConnectionInfo _GetConnectionInfo;
|
||||
|
||||
#endregion
|
||||
internal bool GetConnectionInfo( Connection hConn, ref ConnectionInfo pInfo )
|
||||
{
|
||||
var returnValue = _GetConnectionInfo( Self, hConn, ref pInfo );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetQuickConnectionStatus( IntPtr self, Connection hConn, ref SteamNetworkingQuickConnectionStatus pStats );
|
||||
private FGetQuickConnectionStatus _GetQuickConnectionStatus;
|
||||
|
||||
#endregion
|
||||
internal bool GetQuickConnectionStatus( Connection hConn, ref SteamNetworkingQuickConnectionStatus pStats )
|
||||
{
|
||||
var returnValue = _GetQuickConnectionStatus( Self, hConn, ref pStats );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetDetailedConnectionStatus( IntPtr self, Connection hConn, IntPtr pszBuf, int cbBuf );
|
||||
private FGetDetailedConnectionStatus _GetDetailedConnectionStatus;
|
||||
|
||||
#endregion
|
||||
internal int GetDetailedConnectionStatus( Connection hConn, out string pszBuf )
|
||||
{
|
||||
IntPtr mempszBuf = Helpers.TakeMemory();
|
||||
var returnValue = _GetDetailedConnectionStatus( Self, hConn, mempszBuf, (1024 * 32) );
|
||||
pszBuf = Helpers.MemoryToString( mempszBuf );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetListenSocketAddress( IntPtr self, Socket hSocket, ref NetAddress address );
|
||||
private FGetListenSocketAddress _GetListenSocketAddress;
|
||||
|
||||
#endregion
|
||||
internal bool GetListenSocketAddress( Socket hSocket, ref NetAddress address )
|
||||
{
|
||||
var returnValue = _GetListenSocketAddress( Self, hSocket, ref address );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool CreateSocketPair( [In,Out] Connection[] pOutConnection1, [In,Out] Connection[] pOutConnection2, [MarshalAs( UnmanagedType.U1 )] bool bUseNetworkLoopback, ref NetIdentity pIdentity1, ref NetIdentity pIdentity2 )
|
||||
{
|
||||
var returnValue = _CreateSocketPair( Self, pOutConnection1, pOutConnection2, bUseNetworkLoopback, ref pIdentity1, ref pIdentity2 );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetIdentity( IntPtr self, ref NetIdentity pIdentity );
|
||||
private FGetIdentity _GetIdentity;
|
||||
|
||||
#endregion
|
||||
internal bool GetIdentity( ref NetIdentity pIdentity )
|
||||
{
|
||||
var returnValue = _GetIdentity( Self, ref pIdentity );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FReceivedRelayAuthTicket( IntPtr self, IntPtr pvTicket, int cbTicket, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket );
|
||||
private FReceivedRelayAuthTicket _ReceivedRelayAuthTicket;
|
||||
|
||||
#endregion
|
||||
internal bool ReceivedRelayAuthTicket( IntPtr pvTicket, int cbTicket, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket )
|
||||
{
|
||||
var returnValue = _ReceivedRelayAuthTicket( Self, pvTicket, cbTicket, pOutParsedTicket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FFindRelayAuthTicketForServer( IntPtr self, ref NetIdentity identityGameServer, int nVirtualPort, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket );
|
||||
private FFindRelayAuthTicketForServer _FindRelayAuthTicketForServer;
|
||||
|
||||
#endregion
|
||||
internal int FindRelayAuthTicketForServer( ref NetIdentity identityGameServer, int nVirtualPort, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket )
|
||||
{
|
||||
var returnValue = _FindRelayAuthTicketForServer( Self, ref identityGameServer, nVirtualPort, pOutParsedTicket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Connection FConnectToHostedDedicatedServer( IntPtr self, ref NetIdentity identityTarget, int nVirtualPort );
|
||||
private FConnectToHostedDedicatedServer _ConnectToHostedDedicatedServer;
|
||||
|
||||
#endregion
|
||||
internal Connection ConnectToHostedDedicatedServer( ref NetIdentity identityTarget, int nVirtualPort )
|
||||
{
|
||||
var returnValue = _ConnectToHostedDedicatedServer( Self, ref identityTarget, nVirtualPort );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate ushort FGetHostedDedicatedServerPort( IntPtr self );
|
||||
private FGetHostedDedicatedServerPort _GetHostedDedicatedServerPort;
|
||||
|
||||
#endregion
|
||||
internal ushort GetHostedDedicatedServerPort()
|
||||
{
|
||||
var returnValue = _GetHostedDedicatedServerPort( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamNetworkingPOPID FGetHostedDedicatedServerPOPID( IntPtr self );
|
||||
private FGetHostedDedicatedServerPOPID _GetHostedDedicatedServerPOPID;
|
||||
|
||||
#endregion
|
||||
internal SteamNetworkingPOPID GetHostedDedicatedServerPOPID()
|
||||
{
|
||||
var returnValue = _GetHostedDedicatedServerPOPID( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetHostedDedicatedServerAddress( IntPtr self, ref SteamDatagramHostedAddress pRouting );
|
||||
private FGetHostedDedicatedServerAddress _GetHostedDedicatedServerAddress;
|
||||
|
||||
#endregion
|
||||
internal bool 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;
|
||||
|
||||
#endregion
|
||||
internal Socket CreateHostedDedicatedServerListenSocket( int nVirtualPort )
|
||||
{
|
||||
var returnValue = _CreateHostedDedicatedServerListenSocket( Self, nVirtualPort );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRunCallbacks( IntPtr self, IntPtr pCallbacks );
|
||||
private FRunCallbacks _RunCallbacks;
|
||||
|
||||
#endregion
|
||||
internal void RunCallbacks( IntPtr pCallbacks )
|
||||
{
|
||||
_RunCallbacks( Self, pCallbacks );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,267 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamNetworkingUtils : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamNetworkingUtils001";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_GetLocalPingLocation = Marshal.GetDelegateForFunctionPointer<FGetLocalPingLocation>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_EstimatePingTimeBetweenTwoLocations = Marshal.GetDelegateForFunctionPointer<FEstimatePingTimeBetweenTwoLocations>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_EstimatePingTimeFromLocalHost = Marshal.GetDelegateForFunctionPointer<FEstimatePingTimeFromLocalHost>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_ConvertPingLocationToString = Marshal.GetDelegateForFunctionPointer<FConvertPingLocationToString>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_ParsePingLocationString = Marshal.GetDelegateForFunctionPointer<FParsePingLocationString>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_CheckPingDataUpToDate = Marshal.GetDelegateForFunctionPointer<FCheckPingDataUpToDate>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_IsPingMeasurementInProgress = Marshal.GetDelegateForFunctionPointer<FIsPingMeasurementInProgress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_GetPingToDataCenter = Marshal.GetDelegateForFunctionPointer<FGetPingToDataCenter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_GetDirectPingToPOP = Marshal.GetDelegateForFunctionPointer<FGetDirectPingToPOP>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_GetPOPCount = Marshal.GetDelegateForFunctionPointer<FGetPOPCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetPOPList = Marshal.GetDelegateForFunctionPointer<FGetPOPList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GetLocalTimestamp = Marshal.GetDelegateForFunctionPointer<FGetLocalTimestamp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_SetDebugOutputFunction = Marshal.GetDelegateForFunctionPointer<FSetDebugOutputFunction>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_SetConfigValue = Marshal.GetDelegateForFunctionPointer<FSetConfigValue>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_GetConfigValue = Marshal.GetDelegateForFunctionPointer<FGetConfigValue>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetConfigValueInfo = Marshal.GetDelegateForFunctionPointer<FGetConfigValueInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_GetFirstConfigValue = Marshal.GetDelegateForFunctionPointer<FGetFirstConfigValue>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate float FGetLocalPingLocation( IntPtr self, ref PingLocation result );
|
||||
private FGetLocalPingLocation _GetLocalPingLocation;
|
||||
|
||||
#endregion
|
||||
internal float GetLocalPingLocation( ref PingLocation result )
|
||||
{
|
||||
var returnValue = _GetLocalPingLocation( Self, ref result );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FEstimatePingTimeBetweenTwoLocations( IntPtr self, ref PingLocation location1, ref PingLocation location2 );
|
||||
private FEstimatePingTimeBetweenTwoLocations _EstimatePingTimeBetweenTwoLocations;
|
||||
|
||||
#endregion
|
||||
internal int EstimatePingTimeBetweenTwoLocations( ref PingLocation location1, ref PingLocation location2 )
|
||||
{
|
||||
var returnValue = _EstimatePingTimeBetweenTwoLocations( Self, ref location1, ref location2 );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FEstimatePingTimeFromLocalHost( IntPtr self, ref PingLocation remoteLocation );
|
||||
private FEstimatePingTimeFromLocalHost _EstimatePingTimeFromLocalHost;
|
||||
|
||||
#endregion
|
||||
internal int EstimatePingTimeFromLocalHost( ref PingLocation remoteLocation )
|
||||
{
|
||||
var returnValue = _EstimatePingTimeFromLocalHost( Self, ref remoteLocation );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FConvertPingLocationToString( IntPtr self, ref PingLocation location, IntPtr pszBuf, int cchBufSize );
|
||||
private FConvertPingLocationToString _ConvertPingLocationToString;
|
||||
|
||||
#endregion
|
||||
internal void ConvertPingLocationToString( ref PingLocation location, out string pszBuf )
|
||||
{
|
||||
IntPtr mempszBuf = Helpers.TakeMemory();
|
||||
_ConvertPingLocationToString( Self, ref location, mempszBuf, (1024 * 32) );
|
||||
pszBuf = Helpers.MemoryToString( mempszBuf );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FParsePingLocationString( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString, ref PingLocation result );
|
||||
private FParsePingLocationString _ParsePingLocationString;
|
||||
|
||||
#endregion
|
||||
internal bool ParsePingLocationString( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString, ref PingLocation result )
|
||||
{
|
||||
var returnValue = _ParsePingLocationString( Self, pszString, ref result );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCheckPingDataUpToDate( IntPtr self, float flMaxAgeSeconds );
|
||||
private FCheckPingDataUpToDate _CheckPingDataUpToDate;
|
||||
|
||||
#endregion
|
||||
internal bool CheckPingDataUpToDate( float flMaxAgeSeconds )
|
||||
{
|
||||
var returnValue = _CheckPingDataUpToDate( Self, flMaxAgeSeconds );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal int GetPingToDataCenter( SteamNetworkingPOPID popID, ref SteamNetworkingPOPID pViaRelayPoP )
|
||||
{
|
||||
var returnValue = _GetPingToDataCenter( Self, popID, ref pViaRelayPoP );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetDirectPingToPOP( IntPtr self, SteamNetworkingPOPID popID );
|
||||
private FGetDirectPingToPOP _GetDirectPingToPOP;
|
||||
|
||||
#endregion
|
||||
internal int GetDirectPingToPOP( SteamNetworkingPOPID popID )
|
||||
{
|
||||
var returnValue = _GetDirectPingToPOP( Self, popID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetPOPCount( IntPtr self );
|
||||
private FGetPOPCount _GetPOPCount;
|
||||
|
||||
#endregion
|
||||
internal int GetPOPCount()
|
||||
{
|
||||
var returnValue = _GetPOPCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetPOPList( IntPtr self, ref SteamNetworkingPOPID list, int nListSz );
|
||||
private FGetPOPList _GetPOPList;
|
||||
|
||||
#endregion
|
||||
internal int GetPOPList( ref SteamNetworkingPOPID list, int nListSz )
|
||||
{
|
||||
var returnValue = _GetPOPList( Self, ref list, nListSz );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate long FGetLocalTimestamp( IntPtr self );
|
||||
private FGetLocalTimestamp _GetLocalTimestamp;
|
||||
|
||||
#endregion
|
||||
internal long GetLocalTimestamp()
|
||||
{
|
||||
var returnValue = _GetLocalTimestamp( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetDebugOutputFunction( IntPtr self, DebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc );
|
||||
private FSetDebugOutputFunction _SetDebugOutputFunction;
|
||||
|
||||
#endregion
|
||||
internal void SetDebugOutputFunction( DebugOutputType eDetailLevel, FSteamNetworkingSocketsDebugOutput pfnFunc )
|
||||
{
|
||||
_SetDebugOutputFunction( Self, eDetailLevel, pfnFunc );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetConfigValue( IntPtr self, NetConfig eValue, NetScope eScopeType, long scopeObj, NetConfigType eDataType, IntPtr pArg );
|
||||
private FSetConfigValue _SetConfigValue;
|
||||
|
||||
#endregion
|
||||
internal bool SetConfigValue( NetConfig eValue, NetScope eScopeType, long 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;
|
||||
|
||||
#endregion
|
||||
internal NetConfigResult GetConfigValue( NetConfig eValue, NetScope eScopeType, long scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref ulong cbResult )
|
||||
{
|
||||
var returnValue = _GetConfigValue( Self, eValue, eScopeType, scopeObj, ref pOutDataType, pResult, ref cbResult );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#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 )
|
||||
{
|
||||
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;
|
||||
|
||||
#endregion
|
||||
internal NetConfig GetFirstConfigValue()
|
||||
{
|
||||
var returnValue = _GetFirstConfigValue( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamParentalSettings : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMPARENTALSETTINGS_INTERFACE_VERSION001";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_BIsParentalLockEnabled = Marshal.GetDelegateForFunctionPointer<FBIsParentalLockEnabled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_BIsParentalLockLocked = Marshal.GetDelegateForFunctionPointer<FBIsParentalLockLocked>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_BIsAppBlocked = Marshal.GetDelegateForFunctionPointer<FBIsAppBlocked>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_BIsAppInBlockList = Marshal.GetDelegateForFunctionPointer<FBIsAppInBlockList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_BIsFeatureBlocked = Marshal.GetDelegateForFunctionPointer<FBIsFeatureBlocked>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_BIsFeatureInBlockList = Marshal.GetDelegateForFunctionPointer<FBIsFeatureInBlockList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_BIsParentalLockEnabled = null;
|
||||
_BIsParentalLockLocked = null;
|
||||
_BIsAppBlocked = null;
|
||||
_BIsAppInBlockList = null;
|
||||
_BIsFeatureBlocked = null;
|
||||
_BIsFeatureInBlockList = null;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsParentalLockEnabled( IntPtr self );
|
||||
private FBIsParentalLockEnabled _BIsParentalLockEnabled;
|
||||
|
||||
#endregion
|
||||
internal bool BIsParentalLockEnabled()
|
||||
{
|
||||
var returnValue = _BIsParentalLockEnabled( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsParentalLockLocked( IntPtr self );
|
||||
private FBIsParentalLockLocked _BIsParentalLockLocked;
|
||||
|
||||
#endregion
|
||||
internal bool BIsParentalLockLocked()
|
||||
{
|
||||
var returnValue = _BIsParentalLockLocked( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsAppBlocked( IntPtr self, AppId nAppID );
|
||||
private FBIsAppBlocked _BIsAppBlocked;
|
||||
|
||||
#endregion
|
||||
internal bool BIsAppBlocked( AppId nAppID )
|
||||
{
|
||||
var returnValue = _BIsAppBlocked( Self, nAppID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsAppInBlockList( IntPtr self, AppId nAppID );
|
||||
private FBIsAppInBlockList _BIsAppInBlockList;
|
||||
|
||||
#endregion
|
||||
internal bool BIsAppInBlockList( AppId nAppID )
|
||||
{
|
||||
var returnValue = _BIsAppInBlockList( Self, nAppID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsFeatureBlocked( IntPtr self, ParentalFeature eFeature );
|
||||
private FBIsFeatureBlocked _BIsFeatureBlocked;
|
||||
|
||||
#endregion
|
||||
internal bool BIsFeatureBlocked( ParentalFeature eFeature )
|
||||
{
|
||||
var returnValue = _BIsFeatureBlocked( Self, eFeature );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsFeatureInBlockList( IntPtr self, ParentalFeature eFeature );
|
||||
private FBIsFeatureInBlockList _BIsFeatureInBlockList;
|
||||
|
||||
#endregion
|
||||
internal bool BIsFeatureInBlockList( ParentalFeature eFeature )
|
||||
{
|
||||
var returnValue = _BIsFeatureInBlockList( Self, eFeature );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamParties : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamParties002";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_GetNumActiveBeacons = Marshal.GetDelegateForFunctionPointer<FGetNumActiveBeacons>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_GetBeaconByIndex = Marshal.GetDelegateForFunctionPointer<FGetBeaconByIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetBeaconDetails = Marshal.GetDelegateForFunctionPointer<FGetBeaconDetails>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_JoinParty = Marshal.GetDelegateForFunctionPointer<FJoinParty>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_GetNumAvailableBeaconLocations = Marshal.GetDelegateForFunctionPointer<FGetNumAvailableBeaconLocations>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_GetAvailableBeaconLocations = Marshal.GetDelegateForFunctionPointer<FGetAvailableBeaconLocations>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_CreateBeacon = Marshal.GetDelegateForFunctionPointer<FCreateBeacon>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_OnReservationCompleted = Marshal.GetDelegateForFunctionPointer<FOnReservationCompleted>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_CancelReservation = Marshal.GetDelegateForFunctionPointer<FCancelReservation>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_ChangeNumOpenSlots = Marshal.GetDelegateForFunctionPointer<FChangeNumOpenSlots>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_DestroyBeacon = Marshal.GetDelegateForFunctionPointer<FDestroyBeacon>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GetBeaconLocationData = Marshal.GetDelegateForFunctionPointer<FGetBeaconLocationData>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetNumActiveBeacons( IntPtr self );
|
||||
private FGetNumActiveBeacons _GetNumActiveBeacons;
|
||||
|
||||
#endregion
|
||||
internal uint GetNumActiveBeacons()
|
||||
{
|
||||
var returnValue = _GetNumActiveBeacons( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate PartyBeaconID_t FGetBeaconByIndex( IntPtr self, uint unIndex );
|
||||
private FGetBeaconByIndex _GetBeaconByIndex;
|
||||
|
||||
#endregion
|
||||
internal PartyBeaconID_t GetBeaconByIndex( uint unIndex )
|
||||
{
|
||||
var returnValue = _GetBeaconByIndex( Self, unIndex );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetBeaconDetails( PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, out string pchMetadata )
|
||||
{
|
||||
IntPtr mempchMetadata = Helpers.TakeMemory();
|
||||
var returnValue = _GetBeaconDetails( Self, ulBeaconID, ref pSteamIDBeaconOwner, ref pLocation, mempchMetadata, (1024 * 32) );
|
||||
pchMetadata = Helpers.MemoryToString( mempchMetadata );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FJoinParty( IntPtr self, PartyBeaconID_t ulBeaconID );
|
||||
private FJoinParty _JoinParty;
|
||||
|
||||
#endregion
|
||||
internal async Task<JoinPartyCallback_t?> JoinParty( PartyBeaconID_t ulBeaconID )
|
||||
{
|
||||
var returnValue = _JoinParty( Self, ulBeaconID );
|
||||
return await JoinPartyCallback_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetNumAvailableBeaconLocations( IntPtr self, ref uint puNumLocations );
|
||||
private FGetNumAvailableBeaconLocations _GetNumAvailableBeaconLocations;
|
||||
|
||||
#endregion
|
||||
internal bool GetNumAvailableBeaconLocations( ref uint puNumLocations )
|
||||
{
|
||||
var returnValue = _GetNumAvailableBeaconLocations( Self, ref puNumLocations );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetAvailableBeaconLocations( IntPtr self, ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations );
|
||||
private FGetAvailableBeaconLocations _GetAvailableBeaconLocations;
|
||||
|
||||
#endregion
|
||||
internal bool GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations )
|
||||
{
|
||||
var returnValue = _GetAvailableBeaconLocations( Self, ref pLocationList, uMaxNumLocations );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal async Task<CreateBeaconCallback_t?> 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 );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FOnReservationCompleted( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser );
|
||||
private FOnReservationCompleted _OnReservationCompleted;
|
||||
|
||||
#endregion
|
||||
internal void OnReservationCompleted( PartyBeaconID_t ulBeacon, SteamId steamIDUser )
|
||||
{
|
||||
_OnReservationCompleted( Self, ulBeacon, steamIDUser );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FCancelReservation( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser );
|
||||
private FCancelReservation _CancelReservation;
|
||||
|
||||
#endregion
|
||||
internal void CancelReservation( PartyBeaconID_t ulBeacon, SteamId steamIDUser )
|
||||
{
|
||||
_CancelReservation( Self, ulBeacon, steamIDUser );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FChangeNumOpenSlots( IntPtr self, PartyBeaconID_t ulBeacon, uint unOpenSlots );
|
||||
private FChangeNumOpenSlots _ChangeNumOpenSlots;
|
||||
|
||||
#endregion
|
||||
internal async Task<ChangeNumOpenSlotsCallback_t?> ChangeNumOpenSlots( PartyBeaconID_t ulBeacon, uint unOpenSlots )
|
||||
{
|
||||
var returnValue = _ChangeNumOpenSlots( Self, ulBeacon, unOpenSlots );
|
||||
return await ChangeNumOpenSlotsCallback_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDestroyBeacon( IntPtr self, PartyBeaconID_t ulBeacon );
|
||||
private FDestroyBeacon _DestroyBeacon;
|
||||
|
||||
#endregion
|
||||
internal bool DestroyBeacon( PartyBeaconID_t ulBeacon )
|
||||
{
|
||||
var returnValue = _DestroyBeacon( Self, ulBeacon );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetBeaconLocationData( IntPtr self, SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, IntPtr pchDataStringOut, int cchDataStringOut );
|
||||
private FGetBeaconLocationData _GetBeaconLocationData;
|
||||
|
||||
#endregion
|
||||
internal bool GetBeaconLocationData( SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, out string pchDataStringOut )
|
||||
{
|
||||
IntPtr mempchDataStringOut = Helpers.TakeMemory();
|
||||
var returnValue = _GetBeaconLocationData( Self, BeaconLocation, eData, mempchDataStringOut, (1024 * 32) );
|
||||
pchDataStringOut = Helpers.MemoryToString( mempchDataStringOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,482 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamRemoteStorage : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMREMOTESTORAGE_INTERFACE_VERSION014";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_FileWrite = Marshal.GetDelegateForFunctionPointer<FFileWrite>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_FileRead = Marshal.GetDelegateForFunctionPointer<FFileRead>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_FileWriteAsync = Marshal.GetDelegateForFunctionPointer<FFileWriteAsync>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_FileReadAsync = Marshal.GetDelegateForFunctionPointer<FFileReadAsync>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_FileReadAsyncComplete = Marshal.GetDelegateForFunctionPointer<FFileReadAsyncComplete>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_FileForget = Marshal.GetDelegateForFunctionPointer<FFileForget>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_FileDelete = Marshal.GetDelegateForFunctionPointer<FFileDelete>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_FileShare = Marshal.GetDelegateForFunctionPointer<FFileShare>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_SetSyncPlatforms = Marshal.GetDelegateForFunctionPointer<FSetSyncPlatforms>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_FileWriteStreamOpen = Marshal.GetDelegateForFunctionPointer<FFileWriteStreamOpen>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_FileWriteStreamWriteChunk = Marshal.GetDelegateForFunctionPointer<FFileWriteStreamWriteChunk>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_FileWriteStreamClose = Marshal.GetDelegateForFunctionPointer<FFileWriteStreamClose>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_FileWriteStreamCancel = Marshal.GetDelegateForFunctionPointer<FFileWriteStreamCancel>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_FileExists = Marshal.GetDelegateForFunctionPointer<FFileExists>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_FilePersisted = Marshal.GetDelegateForFunctionPointer<FFilePersisted>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetFileSize = Marshal.GetDelegateForFunctionPointer<FGetFileSize>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_GetFileTimestamp = Marshal.GetDelegateForFunctionPointer<FGetFileTimestamp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetSyncPlatforms = Marshal.GetDelegateForFunctionPointer<FGetSyncPlatforms>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetFileCount = Marshal.GetDelegateForFunctionPointer<FGetFileCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_GetFileNameAndSize = Marshal.GetDelegateForFunctionPointer<FGetFileNameAndSize>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetQuota = Marshal.GetDelegateForFunctionPointer<FGetQuota>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_IsCloudEnabledForAccount = Marshal.GetDelegateForFunctionPointer<FIsCloudEnabledForAccount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_IsCloudEnabledForApp = Marshal.GetDelegateForFunctionPointer<FIsCloudEnabledForApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_SetCloudEnabledForApp = Marshal.GetDelegateForFunctionPointer<FSetCloudEnabledForApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_UGCDownload = Marshal.GetDelegateForFunctionPointer<FUGCDownload>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_GetUGCDownloadProgress = Marshal.GetDelegateForFunctionPointer<FGetUGCDownloadProgress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_GetUGCDetails = Marshal.GetDelegateForFunctionPointer<FGetUGCDetails>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_UGCRead = Marshal.GetDelegateForFunctionPointer<FUGCRead>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_GetCachedUGCCount = Marshal.GetDelegateForFunctionPointer<FGetCachedUGCCount>( 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<FUGCDownloadToLocation>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool FileWrite( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData )
|
||||
{
|
||||
var returnValue = _FileWrite( Self, pchFile, pvData, cubData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal int FileRead( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead )
|
||||
{
|
||||
var returnValue = _FileRead( Self, pchFile, pvData, cubDataToRead );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal async Task<RemoteStorageFileWriteAsyncComplete_t?> 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 );
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal async Task<RemoteStorageFileReadAsyncComplete_t?> 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 );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileReadAsyncComplete( IntPtr self, SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead );
|
||||
private FFileReadAsyncComplete _FileReadAsyncComplete;
|
||||
|
||||
#endregion
|
||||
internal bool FileReadAsyncComplete( SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead )
|
||||
{
|
||||
var returnValue = _FileReadAsyncComplete( Self, hReadCall, pvBuffer, cubToRead );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileForget( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFileForget _FileForget;
|
||||
|
||||
#endregion
|
||||
internal bool FileForget( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _FileForget( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileDelete( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFileDelete _FileDelete;
|
||||
|
||||
#endregion
|
||||
internal bool FileDelete( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _FileDelete( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FFileShare( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFileShare _FileShare;
|
||||
|
||||
#endregion
|
||||
internal async Task<RemoteStorageFileShareResult_t?> FileShare( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _FileShare( Self, pchFile );
|
||||
return await RemoteStorageFileShareResult_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform );
|
||||
private FSetSyncPlatforms _SetSyncPlatforms;
|
||||
|
||||
#endregion
|
||||
internal bool SetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform )
|
||||
{
|
||||
var returnValue = _SetSyncPlatforms( Self, pchFile, eRemoteStoragePlatform );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate UGCFileWriteStreamHandle_t FFileWriteStreamOpen( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFileWriteStreamOpen _FileWriteStreamOpen;
|
||||
|
||||
#endregion
|
||||
internal UGCFileWriteStreamHandle_t FileWriteStreamOpen( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _FileWriteStreamOpen( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileWriteStreamWriteChunk( IntPtr self, UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData );
|
||||
private FFileWriteStreamWriteChunk _FileWriteStreamWriteChunk;
|
||||
|
||||
#endregion
|
||||
internal bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData )
|
||||
{
|
||||
var returnValue = _FileWriteStreamWriteChunk( Self, writeHandle, pvData, cubData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileWriteStreamClose( IntPtr self, UGCFileWriteStreamHandle_t writeHandle );
|
||||
private FFileWriteStreamClose _FileWriteStreamClose;
|
||||
|
||||
#endregion
|
||||
internal bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle )
|
||||
{
|
||||
var returnValue = _FileWriteStreamClose( Self, writeHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileWriteStreamCancel( IntPtr self, UGCFileWriteStreamHandle_t writeHandle );
|
||||
private FFileWriteStreamCancel _FileWriteStreamCancel;
|
||||
|
||||
#endregion
|
||||
internal bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle )
|
||||
{
|
||||
var returnValue = _FileWriteStreamCancel( Self, writeHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileExists( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFileExists _FileExists;
|
||||
|
||||
#endregion
|
||||
internal bool FileExists( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _FileExists( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFilePersisted( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFilePersisted _FilePersisted;
|
||||
|
||||
#endregion
|
||||
internal bool FilePersisted( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _FilePersisted( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetFileSize( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FGetFileSize _GetFileSize;
|
||||
|
||||
#endregion
|
||||
internal int GetFileSize( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _GetFileSize( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate long FGetFileTimestamp( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FGetFileTimestamp _GetFileTimestamp;
|
||||
|
||||
#endregion
|
||||
internal long GetFileTimestamp( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _GetFileTimestamp( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate RemoteStoragePlatform FGetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FGetSyncPlatforms _GetSyncPlatforms;
|
||||
|
||||
#endregion
|
||||
internal RemoteStoragePlatform GetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _GetSyncPlatforms( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetFileCount( IntPtr self );
|
||||
private FGetFileCount _GetFileCount;
|
||||
|
||||
#endregion
|
||||
internal int GetFileCount()
|
||||
{
|
||||
var returnValue = _GetFileCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetFileNameAndSize( IntPtr self, int iFile, ref int pnFileSizeInBytes );
|
||||
private FGetFileNameAndSize _GetFileNameAndSize;
|
||||
|
||||
#endregion
|
||||
internal string GetFileNameAndSize( int iFile, ref int pnFileSizeInBytes )
|
||||
{
|
||||
var returnValue = _GetFileNameAndSize( Self, iFile, ref pnFileSizeInBytes );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetQuota( IntPtr self, ref ulong pnTotalBytes, ref ulong puAvailableBytes );
|
||||
private FGetQuota _GetQuota;
|
||||
|
||||
#endregion
|
||||
internal bool GetQuota( ref ulong pnTotalBytes, ref ulong puAvailableBytes )
|
||||
{
|
||||
var returnValue = _GetQuota( Self, ref pnTotalBytes, ref puAvailableBytes );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsCloudEnabledForAccount( IntPtr self );
|
||||
private FIsCloudEnabledForAccount _IsCloudEnabledForAccount;
|
||||
|
||||
#endregion
|
||||
internal bool IsCloudEnabledForAccount()
|
||||
{
|
||||
var returnValue = _IsCloudEnabledForAccount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsCloudEnabledForApp( IntPtr self );
|
||||
private FIsCloudEnabledForApp _IsCloudEnabledForApp;
|
||||
|
||||
#endregion
|
||||
internal bool IsCloudEnabledForApp()
|
||||
{
|
||||
var returnValue = _IsCloudEnabledForApp( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetCloudEnabledForApp( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled );
|
||||
private FSetCloudEnabledForApp _SetCloudEnabledForApp;
|
||||
|
||||
#endregion
|
||||
internal void SetCloudEnabledForApp( [MarshalAs( UnmanagedType.U1 )] bool bEnabled )
|
||||
{
|
||||
_SetCloudEnabledForApp( Self, bEnabled );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FUGCDownload( IntPtr self, UGCHandle_t hContent, uint unPriority );
|
||||
private FUGCDownload _UGCDownload;
|
||||
|
||||
#endregion
|
||||
internal async Task<RemoteStorageDownloadUGCResult_t?> UGCDownload( UGCHandle_t hContent, uint unPriority )
|
||||
{
|
||||
var returnValue = _UGCDownload( Self, hContent, unPriority );
|
||||
return await RemoteStorageDownloadUGCResult_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUGCDownloadProgress( IntPtr self, UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected );
|
||||
private FGetUGCDownloadProgress _GetUGCDownloadProgress;
|
||||
|
||||
#endregion
|
||||
internal bool GetUGCDownloadProgress( UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected )
|
||||
{
|
||||
var returnValue = _GetUGCDownloadProgress( Self, hContent, ref pnBytesDownloaded, ref pnBytesExpected );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetUGCDetails( UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner )
|
||||
{
|
||||
var returnValue = _GetUGCDetails( Self, hContent, ref pnAppID, ref ppchName, ref pnFileSizeInBytes, ref pSteamIDOwner );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal int UGCRead( UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction )
|
||||
{
|
||||
var returnValue = _UGCRead( Self, hContent, pvData, cubDataToRead, cOffset, eAction );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetCachedUGCCount( IntPtr self );
|
||||
private FGetCachedUGCCount _GetCachedUGCCount;
|
||||
|
||||
#endregion
|
||||
internal int GetCachedUGCCount()
|
||||
{
|
||||
var returnValue = _GetCachedUGCCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal async Task<RemoteStorageDownloadUGCResult_t?> 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 );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamScreenshots : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMSCREENSHOTS_INTERFACE_VERSION003";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_WriteScreenshot = Marshal.GetDelegateForFunctionPointer<FWriteScreenshot>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_AddScreenshotToLibrary = Marshal.GetDelegateForFunctionPointer<FAddScreenshotToLibrary>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_TriggerScreenshot = Marshal.GetDelegateForFunctionPointer<FTriggerScreenshot>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_HookScreenshots = Marshal.GetDelegateForFunctionPointer<FHookScreenshots>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_SetLocation = Marshal.GetDelegateForFunctionPointer<FSetLocation>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_TagUser = Marshal.GetDelegateForFunctionPointer<FTagUser>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_TagPublishedFile = Marshal.GetDelegateForFunctionPointer<FTagPublishedFile>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_IsScreenshotsHooked = Marshal.GetDelegateForFunctionPointer<FIsScreenshotsHooked>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_AddVRScreenshotToLibrary = Marshal.GetDelegateForFunctionPointer<FAddVRScreenshotToLibrary>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate ScreenshotHandle FWriteScreenshot( IntPtr self, IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight );
|
||||
private FWriteScreenshot _WriteScreenshot;
|
||||
|
||||
#endregion
|
||||
internal ScreenshotHandle WriteScreenshot( IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight )
|
||||
{
|
||||
var returnValue = _WriteScreenshot( Self, pubRGB, cubRGB, nWidth, nHeight );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal ScreenshotHandle AddScreenshotToLibrary( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight )
|
||||
{
|
||||
var returnValue = _AddScreenshotToLibrary( Self, pchFilename, pchThumbnailFilename, nWidth, nHeight );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FTriggerScreenshot( IntPtr self );
|
||||
private FTriggerScreenshot _TriggerScreenshot;
|
||||
|
||||
#endregion
|
||||
internal void TriggerScreenshot()
|
||||
{
|
||||
_TriggerScreenshot( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FHookScreenshots( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bHook );
|
||||
private FHookScreenshots _HookScreenshots;
|
||||
|
||||
#endregion
|
||||
internal void HookScreenshots( [MarshalAs( UnmanagedType.U1 )] bool bHook )
|
||||
{
|
||||
_HookScreenshots( Self, bHook );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLocation( IntPtr self, ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation );
|
||||
private FSetLocation _SetLocation;
|
||||
|
||||
#endregion
|
||||
internal bool SetLocation( ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation )
|
||||
{
|
||||
var returnValue = _SetLocation( Self, hScreenshot, pchLocation );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FTagUser( IntPtr self, ScreenshotHandle hScreenshot, SteamId steamID );
|
||||
private FTagUser _TagUser;
|
||||
|
||||
#endregion
|
||||
internal bool TagUser( ScreenshotHandle hScreenshot, SteamId steamID )
|
||||
{
|
||||
var returnValue = _TagUser( Self, hScreenshot, steamID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FTagPublishedFile( IntPtr self, ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID );
|
||||
private FTagPublishedFile _TagPublishedFile;
|
||||
|
||||
#endregion
|
||||
internal bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID )
|
||||
{
|
||||
var returnValue = _TagPublishedFile( Self, hScreenshot, unPublishedFileID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsScreenshotsHooked( IntPtr self );
|
||||
private FIsScreenshotsHooked _IsScreenshotsHooked;
|
||||
|
||||
#endregion
|
||||
internal bool IsScreenshotsHooked()
|
||||
{
|
||||
var returnValue = _IsScreenshotsHooked( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal ScreenshotHandle AddVRScreenshotToLibrary( VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename )
|
||||
{
|
||||
var returnValue = _AddVRScreenshotToLibrary( Self, eType, pchFilename, pchVRFilename );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,457 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamUser : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamUser020";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_GetHSteamUser = Marshal.GetDelegateForFunctionPointer<FGetHSteamUser>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_BLoggedOn = Marshal.GetDelegateForFunctionPointer<FBLoggedOn>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetSteamID = Marshal.GetDelegateForFunctionPointer<FGetSteamID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_InitiateGameConnection = Marshal.GetDelegateForFunctionPointer<FInitiateGameConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_TerminateGameConnection = Marshal.GetDelegateForFunctionPointer<FTerminateGameConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_TrackAppUsageEvent = Marshal.GetDelegateForFunctionPointer<FTrackAppUsageEvent>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetUserDataFolder = Marshal.GetDelegateForFunctionPointer<FGetUserDataFolder>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_StartVoiceRecording = Marshal.GetDelegateForFunctionPointer<FStartVoiceRecording>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_StopVoiceRecording = Marshal.GetDelegateForFunctionPointer<FStopVoiceRecording>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_GetAvailableVoice = Marshal.GetDelegateForFunctionPointer<FGetAvailableVoice>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetVoice = Marshal.GetDelegateForFunctionPointer<FGetVoice>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_DecompressVoice = Marshal.GetDelegateForFunctionPointer<FDecompressVoice>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_GetVoiceOptimalSampleRate = Marshal.GetDelegateForFunctionPointer<FGetVoiceOptimalSampleRate>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_GetAuthSessionTicket = Marshal.GetDelegateForFunctionPointer<FGetAuthSessionTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_BeginAuthSession = Marshal.GetDelegateForFunctionPointer<FBeginAuthSession>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_EndAuthSession = Marshal.GetDelegateForFunctionPointer<FEndAuthSession>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_CancelAuthTicket = Marshal.GetDelegateForFunctionPointer<FCancelAuthTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_UserHasLicenseForApp = Marshal.GetDelegateForFunctionPointer<FUserHasLicenseForApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_BIsBehindNAT = Marshal.GetDelegateForFunctionPointer<FBIsBehindNAT>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_AdvertiseGame = Marshal.GetDelegateForFunctionPointer<FAdvertiseGame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_RequestEncryptedAppTicket = Marshal.GetDelegateForFunctionPointer<FRequestEncryptedAppTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetEncryptedAppTicket = Marshal.GetDelegateForFunctionPointer<FGetEncryptedAppTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_GetGameBadgeLevel = Marshal.GetDelegateForFunctionPointer<FGetGameBadgeLevel>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_GetPlayerSteamLevel = Marshal.GetDelegateForFunctionPointer<FGetPlayerSteamLevel>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_RequestStoreAuthURL = Marshal.GetDelegateForFunctionPointer<FRequestStoreAuthURL>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_BIsPhoneVerified = Marshal.GetDelegateForFunctionPointer<FBIsPhoneVerified>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_BIsTwoFactorEnabled = Marshal.GetDelegateForFunctionPointer<FBIsTwoFactorEnabled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_BIsPhoneIdentifying = Marshal.GetDelegateForFunctionPointer<FBIsPhoneIdentifying>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_BIsPhoneRequiringVerification = Marshal.GetDelegateForFunctionPointer<FBIsPhoneRequiringVerification>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_GetMarketEligibility = Marshal.GetDelegateForFunctionPointer<FGetMarketEligibility>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HSteamUser FGetHSteamUser( IntPtr self );
|
||||
private FGetHSteamUser _GetHSteamUser;
|
||||
|
||||
#endregion
|
||||
internal HSteamUser GetHSteamUser()
|
||||
{
|
||||
var returnValue = _GetHSteamUser( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBLoggedOn( IntPtr self );
|
||||
private FBLoggedOn _BLoggedOn;
|
||||
|
||||
#endregion
|
||||
internal bool BLoggedOn()
|
||||
{
|
||||
var returnValue = _BLoggedOn( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal int InitiateGameConnection( IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure )
|
||||
{
|
||||
var returnValue = _InitiateGameConnection( Self, pAuthBlob, cbMaxAuthBlob, steamIDGameServer, unIPServer, usPortServer, bSecure );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FTerminateGameConnection( IntPtr self, uint unIPServer, ushort usPortServer );
|
||||
private FTerminateGameConnection _TerminateGameConnection;
|
||||
|
||||
#endregion
|
||||
internal void TerminateGameConnection( uint unIPServer, ushort usPortServer )
|
||||
{
|
||||
_TerminateGameConnection( Self, unIPServer, usPortServer );
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal void TrackAppUsageEvent( GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo )
|
||||
{
|
||||
_TrackAppUsageEvent( Self, gameID, eAppUsageEvent, pchExtraInfo );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUserDataFolder( IntPtr self, IntPtr pchBuffer, int cubBuffer );
|
||||
private FGetUserDataFolder _GetUserDataFolder;
|
||||
|
||||
#endregion
|
||||
internal bool GetUserDataFolder( out string pchBuffer )
|
||||
{
|
||||
IntPtr mempchBuffer = Helpers.TakeMemory();
|
||||
var returnValue = _GetUserDataFolder( Self, mempchBuffer, (1024 * 32) );
|
||||
pchBuffer = Helpers.MemoryToString( mempchBuffer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FStartVoiceRecording( IntPtr self );
|
||||
private FStartVoiceRecording _StartVoiceRecording;
|
||||
|
||||
#endregion
|
||||
internal void StartVoiceRecording()
|
||||
{
|
||||
_StartVoiceRecording( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FStopVoiceRecording( IntPtr self );
|
||||
private FStopVoiceRecording _StopVoiceRecording;
|
||||
|
||||
#endregion
|
||||
internal void StopVoiceRecording()
|
||||
{
|
||||
_StopVoiceRecording( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate VoiceResult FGetAvailableVoice( IntPtr self, ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
|
||||
private FGetAvailableVoice _GetAvailableVoice;
|
||||
|
||||
#endregion
|
||||
internal VoiceResult GetAvailableVoice( ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated )
|
||||
{
|
||||
var returnValue = _GetAvailableVoice( Self, ref pcbCompressed, ref pcbUncompressed_Deprecated, nUncompressedVoiceDesiredSampleRate_Deprecated );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#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 )
|
||||
{
|
||||
var returnValue = _GetVoice( Self, bWantCompressed, pDestBuffer, cbDestBufferSize, ref nBytesWritten, bWantUncompressed_Deprecated, pUncompressedDestBuffer_Deprecated, cbUncompressedDestBufferSize_Deprecated, ref nUncompressBytesWritten_Deprecated, nUncompressedVoiceDesiredSampleRate_Deprecated );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal VoiceResult DecompressVoice( IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate )
|
||||
{
|
||||
var returnValue = _DecompressVoice( Self, pCompressed, cbCompressed, pDestBuffer, cbDestBufferSize, ref nBytesWritten, nDesiredSampleRate );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetVoiceOptimalSampleRate( IntPtr self );
|
||||
private FGetVoiceOptimalSampleRate _GetVoiceOptimalSampleRate;
|
||||
|
||||
#endregion
|
||||
internal uint GetVoiceOptimalSampleRate()
|
||||
{
|
||||
var returnValue = _GetVoiceOptimalSampleRate( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
|
||||
private FGetAuthSessionTicket _GetAuthSessionTicket;
|
||||
|
||||
#endregion
|
||||
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
|
||||
{
|
||||
var returnValue = _GetAuthSessionTicket( Self, pTicket, cbMaxTicket, ref pcbTicket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate BeginAuthResult FBeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
|
||||
private FBeginAuthSession _BeginAuthSession;
|
||||
|
||||
#endregion
|
||||
internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID )
|
||||
{
|
||||
var returnValue = _BeginAuthSession( Self, pAuthTicket, cbAuthTicket, steamID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FEndAuthSession( IntPtr self, SteamId steamID );
|
||||
private FEndAuthSession _EndAuthSession;
|
||||
|
||||
#endregion
|
||||
internal void EndAuthSession( SteamId steamID )
|
||||
{
|
||||
_EndAuthSession( Self, steamID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FCancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
|
||||
private FCancelAuthTicket _CancelAuthTicket;
|
||||
|
||||
#endregion
|
||||
internal void CancelAuthTicket( HAuthTicket hAuthTicket )
|
||||
{
|
||||
_CancelAuthTicket( Self, hAuthTicket );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate UserHasLicenseForAppResult FUserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
|
||||
private FUserHasLicenseForApp _UserHasLicenseForApp;
|
||||
|
||||
#endregion
|
||||
internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID )
|
||||
{
|
||||
var returnValue = _UserHasLicenseForApp( Self, steamID, appID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsBehindNAT( IntPtr self );
|
||||
private FBIsBehindNAT _BIsBehindNAT;
|
||||
|
||||
#endregion
|
||||
internal bool BIsBehindNAT()
|
||||
{
|
||||
var returnValue = _BIsBehindNAT( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAdvertiseGame( IntPtr self, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer );
|
||||
private FAdvertiseGame _AdvertiseGame;
|
||||
|
||||
#endregion
|
||||
internal void AdvertiseGame( SteamId steamIDGameServer, uint unIPServer, ushort usPortServer )
|
||||
{
|
||||
_AdvertiseGame( Self, steamIDGameServer, unIPServer, usPortServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestEncryptedAppTicket( IntPtr self, IntPtr pDataToInclude, int cbDataToInclude );
|
||||
private FRequestEncryptedAppTicket _RequestEncryptedAppTicket;
|
||||
|
||||
#endregion
|
||||
internal async Task<EncryptedAppTicketResponse_t?> RequestEncryptedAppTicket( IntPtr pDataToInclude, int cbDataToInclude )
|
||||
{
|
||||
var returnValue = _RequestEncryptedAppTicket( Self, pDataToInclude, cbDataToInclude );
|
||||
return await EncryptedAppTicketResponse_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetEncryptedAppTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
|
||||
private FGetEncryptedAppTicket _GetEncryptedAppTicket;
|
||||
|
||||
#endregion
|
||||
internal bool GetEncryptedAppTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
|
||||
{
|
||||
var returnValue = _GetEncryptedAppTicket( Self, pTicket, cbMaxTicket, ref pcbTicket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetGameBadgeLevel( IntPtr self, int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil );
|
||||
private FGetGameBadgeLevel _GetGameBadgeLevel;
|
||||
|
||||
#endregion
|
||||
internal int GetGameBadgeLevel( int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil )
|
||||
{
|
||||
var returnValue = _GetGameBadgeLevel( Self, nSeries, bFoil );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetPlayerSteamLevel( IntPtr self );
|
||||
private FGetPlayerSteamLevel _GetPlayerSteamLevel;
|
||||
|
||||
#endregion
|
||||
internal int GetPlayerSteamLevel()
|
||||
{
|
||||
var returnValue = _GetPlayerSteamLevel( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestStoreAuthURL( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL );
|
||||
private FRequestStoreAuthURL _RequestStoreAuthURL;
|
||||
|
||||
#endregion
|
||||
internal async Task<StoreAuthURLResponse_t?> RequestStoreAuthURL( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL )
|
||||
{
|
||||
var returnValue = _RequestStoreAuthURL( Self, pchRedirectURL );
|
||||
return await StoreAuthURLResponse_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsPhoneVerified( IntPtr self );
|
||||
private FBIsPhoneVerified _BIsPhoneVerified;
|
||||
|
||||
#endregion
|
||||
internal bool BIsPhoneVerified()
|
||||
{
|
||||
var returnValue = _BIsPhoneVerified( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsTwoFactorEnabled( IntPtr self );
|
||||
private FBIsTwoFactorEnabled _BIsTwoFactorEnabled;
|
||||
|
||||
#endregion
|
||||
internal bool BIsTwoFactorEnabled()
|
||||
{
|
||||
var returnValue = _BIsTwoFactorEnabled( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsPhoneIdentifying( IntPtr self );
|
||||
private FBIsPhoneIdentifying _BIsPhoneIdentifying;
|
||||
|
||||
#endregion
|
||||
internal bool BIsPhoneIdentifying()
|
||||
{
|
||||
var returnValue = _BIsPhoneIdentifying( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsPhoneRequiringVerification( IntPtr self );
|
||||
private FBIsPhoneRequiringVerification _BIsPhoneRequiringVerification;
|
||||
|
||||
#endregion
|
||||
internal bool BIsPhoneRequiringVerification()
|
||||
{
|
||||
var returnValue = _BIsPhoneRequiringVerification( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FGetMarketEligibility( IntPtr self );
|
||||
private FGetMarketEligibility _GetMarketEligibility;
|
||||
|
||||
#endregion
|
||||
internal async Task<MarketEligibilityResponse_t?> GetMarketEligibility()
|
||||
{
|
||||
var returnValue = _GetMarketEligibility( Self );
|
||||
return await MarketEligibilityResponse_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,665 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamUserStats : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMUSERSTATS_INTERFACE_VERSION011";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_RequestCurrentStats = Marshal.GetDelegateForFunctionPointer<FRequestCurrentStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_UpdateAvgRateStat = Marshal.GetDelegateForFunctionPointer<FUpdateAvgRateStat>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetAchievement = Marshal.GetDelegateForFunctionPointer<FGetAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_SetAchievement = Marshal.GetDelegateForFunctionPointer<FSetAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_ClearAchievement = Marshal.GetDelegateForFunctionPointer<FClearAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_GetAchievementAndUnlockTime = Marshal.GetDelegateForFunctionPointer<FGetAchievementAndUnlockTime>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_StoreStats = Marshal.GetDelegateForFunctionPointer<FStoreStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GetAchievementIcon = Marshal.GetDelegateForFunctionPointer<FGetAchievementIcon>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_GetAchievementDisplayAttribute = Marshal.GetDelegateForFunctionPointer<FGetAchievementDisplayAttribute>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_IndicateAchievementProgress = Marshal.GetDelegateForFunctionPointer<FIndicateAchievementProgress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_GetNumAchievements = Marshal.GetDelegateForFunctionPointer<FGetNumAchievements>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetAchievementName = Marshal.GetDelegateForFunctionPointer<FGetAchievementName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_RequestUserStats = Marshal.GetDelegateForFunctionPointer<FRequestUserStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetUserAchievement = Marshal.GetDelegateForFunctionPointer<FGetUserAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetUserAchievementAndUnlockTime = Marshal.GetDelegateForFunctionPointer<FGetUserAchievementAndUnlockTime>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_ResetAllStats = Marshal.GetDelegateForFunctionPointer<FResetAllStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_FindOrCreateLeaderboard = Marshal.GetDelegateForFunctionPointer<FFindOrCreateLeaderboard>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_FindLeaderboard = Marshal.GetDelegateForFunctionPointer<FFindLeaderboard>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_GetLeaderboardName = Marshal.GetDelegateForFunctionPointer<FGetLeaderboardName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_GetLeaderboardEntryCount = Marshal.GetDelegateForFunctionPointer<FGetLeaderboardEntryCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_GetLeaderboardSortMethod = Marshal.GetDelegateForFunctionPointer<FGetLeaderboardSortMethod>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_GetLeaderboardDisplayType = Marshal.GetDelegateForFunctionPointer<FGetLeaderboardDisplayType>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_DownloadLeaderboardEntries = Marshal.GetDelegateForFunctionPointer<FDownloadLeaderboardEntries>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_DownloadLeaderboardEntriesForUsers = Marshal.GetDelegateForFunctionPointer<FDownloadLeaderboardEntriesForUsers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
_GetDownloadedLeaderboardEntry = Marshal.GetDelegateForFunctionPointer<FGetDownloadedLeaderboardEntry>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
|
||||
_UploadLeaderboardScore = Marshal.GetDelegateForFunctionPointer<FUploadLeaderboardScore>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
|
||||
_AttachLeaderboardUGC = Marshal.GetDelegateForFunctionPointer<FAttachLeaderboardUGC>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
|
||||
_GetNumberOfCurrentPlayers = Marshal.GetDelegateForFunctionPointer<FGetNumberOfCurrentPlayers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) );
|
||||
_RequestGlobalAchievementPercentages = Marshal.GetDelegateForFunctionPointer<FRequestGlobalAchievementPercentages>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) );
|
||||
_GetMostAchievedAchievementInfo = Marshal.GetDelegateForFunctionPointer<FGetMostAchievedAchievementInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) );
|
||||
_GetNextMostAchievedAchievementInfo = Marshal.GetDelegateForFunctionPointer<FGetNextMostAchievedAchievementInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) );
|
||||
_GetAchievementAchievedPercent = Marshal.GetDelegateForFunctionPointer<FGetAchievementAchievedPercent>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) );
|
||||
_RequestGlobalStats = Marshal.GetDelegateForFunctionPointer<FRequestGlobalStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 304 ) ) );
|
||||
|
||||
#if PLATFORM_WIN
|
||||
_GetStat1 = Marshal.GetDelegateForFunctionPointer<FGetStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetStat2 = Marshal.GetDelegateForFunctionPointer<FGetStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_SetStat1 = Marshal.GetDelegateForFunctionPointer<FSetStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_SetStat2 = Marshal.GetDelegateForFunctionPointer<FSetStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_GetUserStat1 = Marshal.GetDelegateForFunctionPointer<FGetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_GetUserStat2 = Marshal.GetDelegateForFunctionPointer<FGetUserStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetGlobalStat1 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) );
|
||||
_GetGlobalStat2 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) );
|
||||
_GetGlobalStatHistory1 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStatHistory1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) );
|
||||
_GetGlobalStatHistory2 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStatHistory2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) );
|
||||
#else
|
||||
_GetStat1 = Marshal.GetDelegateForFunctionPointer<FGetStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetStat2 = Marshal.GetDelegateForFunctionPointer<FGetStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_SetStat1 = Marshal.GetDelegateForFunctionPointer<FSetStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_SetStat2 = Marshal.GetDelegateForFunctionPointer<FSetStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_GetUserStat1 = Marshal.GetDelegateForFunctionPointer<FGetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetUserStat2 = Marshal.GetDelegateForFunctionPointer<FGetUserStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_GetGlobalStat1 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) );
|
||||
_GetGlobalStat2 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) );
|
||||
_GetGlobalStatHistory1 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStatHistory1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) );
|
||||
_GetGlobalStatHistory2 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStatHistory2>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FRequestCurrentStats( IntPtr self );
|
||||
private FRequestCurrentStats _RequestCurrentStats;
|
||||
|
||||
#endregion
|
||||
internal bool RequestCurrentStats()
|
||||
{
|
||||
var returnValue = _RequestCurrentStats( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
|
||||
private FGetStat1 _GetStat1;
|
||||
|
||||
#endregion
|
||||
internal bool GetStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
{
|
||||
var returnValue = _GetStat1( Self, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
|
||||
private FGetStat2 _GetStat2;
|
||||
|
||||
#endregion
|
||||
internal bool GetStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
{
|
||||
var returnValue = _GetStat2( Self, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
|
||||
private FSetStat1 _SetStat1;
|
||||
|
||||
#endregion
|
||||
internal bool SetStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
|
||||
{
|
||||
var returnValue = _SetStat1( Self, pchName, nData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
|
||||
private FSetStat2 _SetStat2;
|
||||
|
||||
#endregion
|
||||
internal bool SetStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
|
||||
{
|
||||
var returnValue = _SetStat2( Self, pchName, fData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool UpdateAvgRateStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength )
|
||||
{
|
||||
var returnValue = _UpdateAvgRateStat( Self, pchName, flCountThisSession, dSessionLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
{
|
||||
var returnValue = _GetAchievement( Self, pchName, ref pbAchieved );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
private FSetAchievement _SetAchievement;
|
||||
|
||||
#endregion
|
||||
internal bool SetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
{
|
||||
var returnValue = _SetAchievement( Self, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FClearAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
private FClearAchievement _ClearAchievement;
|
||||
|
||||
#endregion
|
||||
internal bool ClearAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
{
|
||||
var returnValue = _ClearAchievement( Self, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetAchievementAndUnlockTime( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime )
|
||||
{
|
||||
var returnValue = _GetAchievementAndUnlockTime( Self, pchName, ref pbAchieved, ref punUnlockTime );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FStoreStats( IntPtr self );
|
||||
private FStoreStats _StoreStats;
|
||||
|
||||
#endregion
|
||||
internal bool StoreStats()
|
||||
{
|
||||
var returnValue = _StoreStats( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetAchievementIcon( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
private FGetAchievementIcon _GetAchievementIcon;
|
||||
|
||||
#endregion
|
||||
internal int GetAchievementIcon( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
{
|
||||
var returnValue = _GetAchievementIcon( Self, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal string GetAchievementDisplayAttribute( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
var returnValue = _GetAchievementDisplayAttribute( Self, pchName, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool IndicateAchievementProgress( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress )
|
||||
{
|
||||
var returnValue = _IndicateAchievementProgress( Self, pchName, nCurProgress, nMaxProgress );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetNumAchievements( IntPtr self );
|
||||
private FGetNumAchievements _GetNumAchievements;
|
||||
|
||||
#endregion
|
||||
internal uint GetNumAchievements()
|
||||
{
|
||||
var returnValue = _GetNumAchievements( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetAchievementName( IntPtr self, uint iAchievement );
|
||||
private FGetAchievementName _GetAchievementName;
|
||||
|
||||
#endregion
|
||||
internal string GetAchievementName( uint iAchievement )
|
||||
{
|
||||
var returnValue = _GetAchievementName( Self, iAchievement );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestUserStats( IntPtr self, SteamId steamIDUser );
|
||||
private FRequestUserStats _RequestUserStats;
|
||||
|
||||
#endregion
|
||||
internal async Task<UserStatsReceived_t?> RequestUserStats( SteamId steamIDUser )
|
||||
{
|
||||
var returnValue = _RequestUserStats( Self, steamIDUser );
|
||||
return await UserStatsReceived_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
{
|
||||
var returnValue = _GetUserStat1( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
{
|
||||
var returnValue = _GetUserStat2( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
{
|
||||
var returnValue = _GetUserAchievement( Self, steamIDUser, pchName, ref pbAchieved );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetUserAchievementAndUnlockTime( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime )
|
||||
{
|
||||
var returnValue = _GetUserAchievementAndUnlockTime( Self, steamIDUser, pchName, ref pbAchieved, ref punUnlockTime );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FResetAllStats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo );
|
||||
private FResetAllStats _ResetAllStats;
|
||||
|
||||
#endregion
|
||||
internal bool ResetAllStats( [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo )
|
||||
{
|
||||
var returnValue = _ResetAllStats( Self, bAchievementsToo );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardFindResult_t?> 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 );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FFindLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName );
|
||||
private FFindLeaderboard _FindLeaderboard;
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardFindResult_t?> FindLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName )
|
||||
{
|
||||
var returnValue = _FindLeaderboard( Self, pchLeaderboardName );
|
||||
return await LeaderboardFindResult_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetLeaderboardName( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
private FGetLeaderboardName _GetLeaderboardName;
|
||||
|
||||
#endregion
|
||||
internal string GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard )
|
||||
{
|
||||
var returnValue = _GetLeaderboardName( Self, hSteamLeaderboard );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetLeaderboardEntryCount( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
private FGetLeaderboardEntryCount _GetLeaderboardEntryCount;
|
||||
|
||||
#endregion
|
||||
internal int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard )
|
||||
{
|
||||
var returnValue = _GetLeaderboardEntryCount( Self, hSteamLeaderboard );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate LeaderboardSort FGetLeaderboardSortMethod( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
private FGetLeaderboardSortMethod _GetLeaderboardSortMethod;
|
||||
|
||||
#endregion
|
||||
internal LeaderboardSort GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard )
|
||||
{
|
||||
var returnValue = _GetLeaderboardSortMethod( Self, hSteamLeaderboard );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate LeaderboardDisplay FGetLeaderboardDisplayType( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
private FGetLeaderboardDisplayType _GetLeaderboardDisplayType;
|
||||
|
||||
#endregion
|
||||
internal LeaderboardDisplay GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard )
|
||||
{
|
||||
var returnValue = _GetLeaderboardDisplayType( Self, hSteamLeaderboard );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FDownloadLeaderboardEntries( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd );
|
||||
private FDownloadLeaderboardEntries _DownloadLeaderboardEntries;
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardScoresDownloaded_t?> DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd )
|
||||
{
|
||||
var returnValue = _DownloadLeaderboardEntries( Self, hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd );
|
||||
return await LeaderboardScoresDownloaded_t.GetResultAsync( 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;
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardScoresDownloaded_t?> DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers )
|
||||
{
|
||||
var returnValue = _DownloadLeaderboardEntriesForUsers( Self, hSteamLeaderboard, prgUsers, cUsers );
|
||||
return await LeaderboardScoresDownloaded_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax )
|
||||
{
|
||||
var returnValue = _GetDownloadedLeaderboardEntry( Self, hSteamLeaderboardEntries, index, ref pLeaderboardEntry, pDetails, cDetailsMax );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardScoreUploaded_t?> 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 );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FAttachLeaderboardUGC( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC );
|
||||
private FAttachLeaderboardUGC _AttachLeaderboardUGC;
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardUGCSet_t?> AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC )
|
||||
{
|
||||
var returnValue = _AttachLeaderboardUGC( Self, hSteamLeaderboard, hUGC );
|
||||
return await LeaderboardUGCSet_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FGetNumberOfCurrentPlayers( IntPtr self );
|
||||
private FGetNumberOfCurrentPlayers _GetNumberOfCurrentPlayers;
|
||||
|
||||
#endregion
|
||||
internal async Task<NumberOfCurrentPlayers_t?> GetNumberOfCurrentPlayers()
|
||||
{
|
||||
var returnValue = _GetNumberOfCurrentPlayers( Self );
|
||||
return await NumberOfCurrentPlayers_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestGlobalAchievementPercentages( IntPtr self );
|
||||
private FRequestGlobalAchievementPercentages _RequestGlobalAchievementPercentages;
|
||||
|
||||
#endregion
|
||||
internal async Task<GlobalAchievementPercentagesReady_t?> RequestGlobalAchievementPercentages()
|
||||
{
|
||||
var returnValue = _RequestGlobalAchievementPercentages( Self );
|
||||
return await GlobalAchievementPercentagesReady_t.GetResultAsync( 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;
|
||||
|
||||
#endregion
|
||||
internal int GetMostAchievedAchievementInfo( out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
{
|
||||
IntPtr mempchName = Helpers.TakeMemory();
|
||||
var returnValue = _GetMostAchievedAchievementInfo( Self, mempchName, (1024 * 32), ref pflPercent, ref pbAchieved );
|
||||
pchName = Helpers.MemoryToString( mempchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
{
|
||||
IntPtr mempchName = Helpers.TakeMemory();
|
||||
var returnValue = _GetNextMostAchievedAchievementInfo( Self, iIteratorPrevious, mempchName, (1024 * 32), ref pflPercent, ref pbAchieved );
|
||||
pchName = Helpers.MemoryToString( mempchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetAchievementAchievedPercent( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent );
|
||||
private FGetAchievementAchievedPercent _GetAchievementAchievedPercent;
|
||||
|
||||
#endregion
|
||||
internal bool GetAchievementAchievedPercent( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent )
|
||||
{
|
||||
var returnValue = _GetAchievementAchievedPercent( Self, pchName, ref pflPercent );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestGlobalStats( IntPtr self, int nHistoryDays );
|
||||
private FRequestGlobalStats _RequestGlobalStats;
|
||||
|
||||
#endregion
|
||||
internal async Task<GlobalStatsReceived_t?> RequestGlobalStats( int nHistoryDays )
|
||||
{
|
||||
var returnValue = _RequestGlobalStats( Self, nHistoryDays );
|
||||
return await GlobalStatsReceived_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetGlobalStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData );
|
||||
private FGetGlobalStat1 _GetGlobalStat1;
|
||||
|
||||
#endregion
|
||||
internal bool GetGlobalStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData )
|
||||
{
|
||||
var returnValue = _GetGlobalStat1( Self, pchStatName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetGlobalStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData );
|
||||
private FGetGlobalStat2 _GetGlobalStat2;
|
||||
|
||||
#endregion
|
||||
internal bool GetGlobalStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData )
|
||||
{
|
||||
var returnValue = _GetGlobalStat2( 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;
|
||||
|
||||
#endregion
|
||||
internal int GetGlobalStatHistory1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData )
|
||||
{
|
||||
var returnValue = _GetGlobalStatHistory1( 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;
|
||||
|
||||
#endregion
|
||||
internal int GetGlobalStatHistory2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData )
|
||||
{
|
||||
var returnValue = _GetGlobalStatHistory2( Self, pchStatName, pData, cubData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,452 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamUtils : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamUtils009";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_GetSecondsSinceAppActive = Marshal.GetDelegateForFunctionPointer<FGetSecondsSinceAppActive>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_GetSecondsSinceComputerActive = Marshal.GetDelegateForFunctionPointer<FGetSecondsSinceComputerActive>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetConnectedUniverse = Marshal.GetDelegateForFunctionPointer<FGetConnectedUniverse>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetServerRealTime = Marshal.GetDelegateForFunctionPointer<FGetServerRealTime>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_GetIPCountry = Marshal.GetDelegateForFunctionPointer<FGetIPCountry>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_GetImageSize = Marshal.GetDelegateForFunctionPointer<FGetImageSize>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetImageRGBA = Marshal.GetDelegateForFunctionPointer<FGetImageRGBA>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_GetCSERIPPort = Marshal.GetDelegateForFunctionPointer<FGetCSERIPPort>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_GetCurrentBatteryPower = Marshal.GetDelegateForFunctionPointer<FGetCurrentBatteryPower>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_GetAppID = Marshal.GetDelegateForFunctionPointer<FGetAppID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_SetOverlayNotificationPosition = Marshal.GetDelegateForFunctionPointer<FSetOverlayNotificationPosition>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_IsAPICallCompleted = Marshal.GetDelegateForFunctionPointer<FIsAPICallCompleted>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_GetAPICallFailureReason = Marshal.GetDelegateForFunctionPointer<FGetAPICallFailureReason>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_GetAPICallResult = Marshal.GetDelegateForFunctionPointer<FGetAPICallResult>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_RunFrame = Marshal.GetDelegateForFunctionPointer<FRunFrame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetIPCCallCount = Marshal.GetDelegateForFunctionPointer<FGetIPCCallCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_SetWarningMessageHook = Marshal.GetDelegateForFunctionPointer<FSetWarningMessageHook>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_IsOverlayEnabled = Marshal.GetDelegateForFunctionPointer<FIsOverlayEnabled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_BOverlayNeedsPresent = Marshal.GetDelegateForFunctionPointer<FBOverlayNeedsPresent>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_CheckFileSignature = Marshal.GetDelegateForFunctionPointer<FCheckFileSignature>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_ShowGamepadTextInput = Marshal.GetDelegateForFunctionPointer<FShowGamepadTextInput>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetEnteredGamepadTextLength = Marshal.GetDelegateForFunctionPointer<FGetEnteredGamepadTextLength>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_GetEnteredGamepadTextInput = Marshal.GetDelegateForFunctionPointer<FGetEnteredGamepadTextInput>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_GetSteamUILanguage = Marshal.GetDelegateForFunctionPointer<FGetSteamUILanguage>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_IsSteamRunningInVR = Marshal.GetDelegateForFunctionPointer<FIsSteamRunningInVR>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_SetOverlayNotificationInset = Marshal.GetDelegateForFunctionPointer<FSetOverlayNotificationInset>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_IsSteamInBigPictureMode = Marshal.GetDelegateForFunctionPointer<FIsSteamInBigPictureMode>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_StartVRDashboard = Marshal.GetDelegateForFunctionPointer<FStartVRDashboard>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_IsVRHeadsetStreamingEnabled = Marshal.GetDelegateForFunctionPointer<FIsVRHeadsetStreamingEnabled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_SetVRHeadsetStreamingEnabled = Marshal.GetDelegateForFunctionPointer<FSetVRHeadsetStreamingEnabled>( 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;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetSecondsSinceAppActive( IntPtr self );
|
||||
private FGetSecondsSinceAppActive _GetSecondsSinceAppActive;
|
||||
|
||||
#endregion
|
||||
internal uint GetSecondsSinceAppActive()
|
||||
{
|
||||
var returnValue = _GetSecondsSinceAppActive( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetSecondsSinceComputerActive( IntPtr self );
|
||||
private FGetSecondsSinceComputerActive _GetSecondsSinceComputerActive;
|
||||
|
||||
#endregion
|
||||
internal uint GetSecondsSinceComputerActive()
|
||||
{
|
||||
var returnValue = _GetSecondsSinceComputerActive( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Universe FGetConnectedUniverse( IntPtr self );
|
||||
private FGetConnectedUniverse _GetConnectedUniverse;
|
||||
|
||||
#endregion
|
||||
internal Universe GetConnectedUniverse()
|
||||
{
|
||||
var returnValue = _GetConnectedUniverse( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetServerRealTime( IntPtr self );
|
||||
private FGetServerRealTime _GetServerRealTime;
|
||||
|
||||
#endregion
|
||||
internal uint GetServerRealTime()
|
||||
{
|
||||
var returnValue = _GetServerRealTime( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetIPCountry( IntPtr self );
|
||||
private FGetIPCountry _GetIPCountry;
|
||||
|
||||
#endregion
|
||||
internal string GetIPCountry()
|
||||
{
|
||||
var returnValue = _GetIPCountry( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetImageSize( IntPtr self, int iImage, ref uint pnWidth, ref uint pnHeight );
|
||||
private FGetImageSize _GetImageSize;
|
||||
|
||||
#endregion
|
||||
internal bool GetImageSize( int iImage, ref uint pnWidth, ref uint pnHeight )
|
||||
{
|
||||
var returnValue = _GetImageSize( Self, iImage, ref pnWidth, ref pnHeight );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetImageRGBA( IntPtr self, int iImage, [In,Out] byte[] pubDest, int nDestBufferSize );
|
||||
private FGetImageRGBA _GetImageRGBA;
|
||||
|
||||
#endregion
|
||||
internal bool GetImageRGBA( int iImage, [In,Out] byte[] pubDest, int nDestBufferSize )
|
||||
{
|
||||
var returnValue = _GetImageRGBA( Self, iImage, pubDest, nDestBufferSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetCSERIPPort( IntPtr self, ref uint unIP, ref ushort usPort );
|
||||
private FGetCSERIPPort _GetCSERIPPort;
|
||||
|
||||
#endregion
|
||||
internal bool GetCSERIPPort( ref uint unIP, ref ushort usPort )
|
||||
{
|
||||
var returnValue = _GetCSERIPPort( Self, ref unIP, ref usPort );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate byte FGetCurrentBatteryPower( IntPtr self );
|
||||
private FGetCurrentBatteryPower _GetCurrentBatteryPower;
|
||||
|
||||
#endregion
|
||||
internal byte GetCurrentBatteryPower()
|
||||
{
|
||||
var returnValue = _GetCurrentBatteryPower( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetAppID( IntPtr self );
|
||||
private FGetAppID _GetAppID;
|
||||
|
||||
#endregion
|
||||
internal uint GetAppID()
|
||||
{
|
||||
var returnValue = _GetAppID( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetOverlayNotificationPosition( IntPtr self, NotificationPosition eNotificationPosition );
|
||||
private FSetOverlayNotificationPosition _SetOverlayNotificationPosition;
|
||||
|
||||
#endregion
|
||||
internal void SetOverlayNotificationPosition( NotificationPosition eNotificationPosition )
|
||||
{
|
||||
_SetOverlayNotificationPosition( Self, eNotificationPosition );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsAPICallCompleted( IntPtr self, SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed );
|
||||
private FIsAPICallCompleted _IsAPICallCompleted;
|
||||
|
||||
#endregion
|
||||
internal bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed )
|
||||
{
|
||||
var returnValue = _IsAPICallCompleted( Self, hSteamAPICall, ref pbFailed );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICallFailure FGetAPICallFailureReason( IntPtr self, SteamAPICall_t hSteamAPICall );
|
||||
private FGetAPICallFailureReason _GetAPICallFailureReason;
|
||||
|
||||
#endregion
|
||||
internal SteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall )
|
||||
{
|
||||
var returnValue = _GetAPICallFailureReason( Self, hSteamAPICall );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#endregion
|
||||
internal bool GetAPICallResult( SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed )
|
||||
{
|
||||
var returnValue = _GetAPICallResult( Self, hSteamAPICall, pCallback, cubCallback, iCallbackExpected, ref pbFailed );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#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;
|
||||
|
||||
#endregion
|
||||
internal uint GetIPCCallCount()
|
||||
{
|
||||
var returnValue = _GetIPCCallCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetWarningMessageHook( IntPtr self, IntPtr pFunction );
|
||||
private FSetWarningMessageHook _SetWarningMessageHook;
|
||||
|
||||
#endregion
|
||||
internal void SetWarningMessageHook( IntPtr pFunction )
|
||||
{
|
||||
_SetWarningMessageHook( Self, pFunction );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsOverlayEnabled( IntPtr self );
|
||||
private FIsOverlayEnabled _IsOverlayEnabled;
|
||||
|
||||
#endregion
|
||||
internal bool IsOverlayEnabled()
|
||||
{
|
||||
var returnValue = _IsOverlayEnabled( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBOverlayNeedsPresent( IntPtr self );
|
||||
private FBOverlayNeedsPresent _BOverlayNeedsPresent;
|
||||
|
||||
#endregion
|
||||
internal bool BOverlayNeedsPresent()
|
||||
{
|
||||
var returnValue = _BOverlayNeedsPresent( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FCheckFileSignature( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName );
|
||||
private FCheckFileSignature _CheckFileSignature;
|
||||
|
||||
#endregion
|
||||
internal async Task<CheckFileSignature_t?> CheckFileSignature( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName )
|
||||
{
|
||||
var returnValue = _CheckFileSignature( Self, szFileName );
|
||||
return await CheckFileSignature_t.GetResultAsync( returnValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[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;
|
||||
|
||||
#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 )
|
||||
{
|
||||
var returnValue = _ShowGamepadTextInput( Self, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetEnteredGamepadTextLength( IntPtr self );
|
||||
private FGetEnteredGamepadTextLength _GetEnteredGamepadTextLength;
|
||||
|
||||
#endregion
|
||||
internal uint GetEnteredGamepadTextLength()
|
||||
{
|
||||
var returnValue = _GetEnteredGamepadTextLength( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetEnteredGamepadTextInput( IntPtr self, IntPtr pchText, uint cchText );
|
||||
private FGetEnteredGamepadTextInput _GetEnteredGamepadTextInput;
|
||||
|
||||
#endregion
|
||||
internal bool GetEnteredGamepadTextInput( out string pchText )
|
||||
{
|
||||
IntPtr mempchText = Helpers.TakeMemory();
|
||||
var returnValue = _GetEnteredGamepadTextInput( Self, mempchText, (1024 * 32) );
|
||||
pchText = Helpers.MemoryToString( mempchText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetSteamUILanguage( IntPtr self );
|
||||
private FGetSteamUILanguage _GetSteamUILanguage;
|
||||
|
||||
#endregion
|
||||
internal string GetSteamUILanguage()
|
||||
{
|
||||
var returnValue = _GetSteamUILanguage( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsSteamRunningInVR( IntPtr self );
|
||||
private FIsSteamRunningInVR _IsSteamRunningInVR;
|
||||
|
||||
#endregion
|
||||
internal bool IsSteamRunningInVR()
|
||||
{
|
||||
var returnValue = _IsSteamRunningInVR( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetOverlayNotificationInset( IntPtr self, int nHorizontalInset, int nVerticalInset );
|
||||
private FSetOverlayNotificationInset _SetOverlayNotificationInset;
|
||||
|
||||
#endregion
|
||||
internal void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset )
|
||||
{
|
||||
_SetOverlayNotificationInset( Self, nHorizontalInset, nVerticalInset );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsSteamInBigPictureMode( IntPtr self );
|
||||
private FIsSteamInBigPictureMode _IsSteamInBigPictureMode;
|
||||
|
||||
#endregion
|
||||
internal bool IsSteamInBigPictureMode()
|
||||
{
|
||||
var returnValue = _IsSteamInBigPictureMode( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FStartVRDashboard( IntPtr self );
|
||||
private FStartVRDashboard _StartVRDashboard;
|
||||
|
||||
#endregion
|
||||
internal void StartVRDashboard()
|
||||
{
|
||||
_StartVRDashboard( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsVRHeadsetStreamingEnabled( IntPtr self );
|
||||
private FIsVRHeadsetStreamingEnabled _IsVRHeadsetStreamingEnabled;
|
||||
|
||||
#endregion
|
||||
internal bool IsVRHeadsetStreamingEnabled()
|
||||
{
|
||||
var returnValue = _IsVRHeadsetStreamingEnabled( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetVRHeadsetStreamingEnabled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled );
|
||||
private FSetVRHeadsetStreamingEnabled _SetVRHeadsetStreamingEnabled;
|
||||
|
||||
#endregion
|
||||
internal void SetVRHeadsetStreamingEnabled( [MarshalAs( UnmanagedType.U1 )] bool bEnabled )
|
||||
{
|
||||
_SetVRHeadsetStreamingEnabled( Self, bEnabled );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamVideo : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMVIDEO_INTERFACE_V002";
|
||||
|
||||
public override void InitInternals()
|
||||
{
|
||||
_GetVideoURL = Marshal.GetDelegateForFunctionPointer<FGetVideoURL>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_IsBroadcasting = Marshal.GetDelegateForFunctionPointer<FIsBroadcasting>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetOPFSettings = Marshal.GetDelegateForFunctionPointer<FGetOPFSettings>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetOPFStringForApp = Marshal.GetDelegateForFunctionPointer<FGetOPFStringForApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_GetVideoURL = null;
|
||||
_IsBroadcasting = null;
|
||||
_GetOPFSettings = null;
|
||||
_GetOPFStringForApp = null;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FGetVideoURL( IntPtr self, AppId unVideoAppID );
|
||||
private FGetVideoURL _GetVideoURL;
|
||||
|
||||
#endregion
|
||||
internal void GetVideoURL( AppId unVideoAppID )
|
||||
{
|
||||
_GetVideoURL( Self, unVideoAppID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsBroadcasting( IntPtr self, ref int pnNumViewers );
|
||||
private FIsBroadcasting _IsBroadcasting;
|
||||
|
||||
#endregion
|
||||
internal bool IsBroadcasting( ref int pnNumViewers )
|
||||
{
|
||||
var returnValue = _IsBroadcasting( Self, ref pnNumViewers );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FGetOPFSettings( IntPtr self, AppId unVideoAppID );
|
||||
private FGetOPFSettings _GetOPFSettings;
|
||||
|
||||
#endregion
|
||||
internal void GetOPFSettings( AppId unVideoAppID )
|
||||
{
|
||||
_GetOPFSettings( Self, unVideoAppID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetOPFStringForApp( IntPtr self, AppId unVideoAppID, IntPtr pchBuffer, ref int pnBufferSize );
|
||||
private FGetOPFStringForApp _GetOPFStringForApp;
|
||||
|
||||
#endregion
|
||||
internal bool GetOPFStringForApp( AppId unVideoAppID, out string pchBuffer, ref int pnBufferSize )
|
||||
{
|
||||
IntPtr mempchBuffer = Helpers.TakeMemory();
|
||||
var returnValue = _GetOPFStringForApp( Self, unVideoAppID, mempchBuffer, ref pnBufferSize );
|
||||
pchBuffer = Helpers.MemoryToString( mempchBuffer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user