Converting to flat

This commit is contained in:
Garry Newman 2020-02-10 19:21:52 +00:00
parent 4c4fd8dad0
commit 12f95a7f4e
39 changed files with 2762 additions and 8783 deletions

View File

@ -0,0 +1,50 @@
using Steamworks.Data;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
namespace Steamworks
{
//
// Created on registration of a callback
//
internal struct CallbackResult
{
SteamAPICall_t call;
public CallbackResult( SteamAPICall_t call )
{
this.call = call;
}
public async Task<T?> GetAsync<T>() where T : struct, ICallbackData
{
bool failed = false;
var t = default( T );
var size = t.DataSize;
while ( !SteamUtils.IsCallComplete( call, out failed ) )
{
await Task.Delay( 1 );
if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null;
}
if ( failed ) return null;
var ptr = Marshal.AllocHGlobal( size );
try
{
if ( !SteamUtils.Internal.GetAPICallResult( call, ptr, size, t.CallbackId, ref failed ) || failed )
return null;
return ((T)Marshal.PtrToStructure( ptr, typeof( T ) ));
}
finally
{
Marshal.FreeHGlobal( ptr );
}
}
}
}

View File

@ -0,0 +1,17 @@
using Steamworks.Data;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
namespace Steamworks
{
//
// Created on registration of a callback
//
internal interface ICallbackData
{
int CallbackId { get; }
int DataSize { get; }
}
}

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamApps : SteamInterface internal class ISteamApps : SteamInterface
{ {
public override string InterfaceName => "STEAMAPPS_INTERFACE_VERSION008";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,10 +19,9 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribed")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsSubscribed( IntPtr self ); private static extern bool _BIsSubscribed( IntPtr self );
private FBIsSubscribed _BIsSubscribed;
#endregion #endregion
internal bool BIsSubscribed() internal bool BIsSubscribed()
@ -34,10 +31,9 @@ internal bool BIsSubscribed()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsLowViolence")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsLowViolence( IntPtr self ); private static extern bool _BIsLowViolence( IntPtr self );
private FBIsLowViolence _BIsLowViolence;
#endregion #endregion
internal bool BIsLowViolence() internal bool BIsLowViolence()
@ -47,10 +43,9 @@ internal bool BIsLowViolence()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsCybercafe")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsCybercafe( IntPtr self ); private static extern bool _BIsCybercafe( IntPtr self );
private FBIsCybercafe _BIsCybercafe;
#endregion #endregion
internal bool BIsCybercafe() internal bool BIsCybercafe()
@ -60,10 +55,9 @@ internal bool BIsCybercafe()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsVACBanned")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsVACBanned( IntPtr self ); private static extern bool _BIsVACBanned( IntPtr self );
private FBIsVACBanned _BIsVACBanned;
#endregion #endregion
internal bool BIsVACBanned() internal bool BIsVACBanned()
@ -73,9 +67,8 @@ internal bool BIsVACBanned()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetCurrentGameLanguage")]
private delegate Utf8StringPointer FGetCurrentGameLanguage( IntPtr self ); private static extern Utf8StringPointer _GetCurrentGameLanguage( IntPtr self );
private FGetCurrentGameLanguage _GetCurrentGameLanguage;
#endregion #endregion
internal string GetCurrentGameLanguage() internal string GetCurrentGameLanguage()
@ -85,9 +78,8 @@ internal string GetCurrentGameLanguage()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAvailableGameLanguages")]
private delegate Utf8StringPointer FGetAvailableGameLanguages( IntPtr self ); private static extern Utf8StringPointer _GetAvailableGameLanguages( IntPtr self );
private FGetAvailableGameLanguages _GetAvailableGameLanguages;
#endregion #endregion
internal string GetAvailableGameLanguages() internal string GetAvailableGameLanguages()
@ -97,10 +89,9 @@ internal string GetAvailableGameLanguages()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedApp")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsSubscribedApp( IntPtr self, AppId appID ); private static extern bool _BIsSubscribedApp( IntPtr self, AppId appID );
private FBIsSubscribedApp _BIsSubscribedApp;
#endregion #endregion
internal bool BIsSubscribedApp( AppId appID ) internal bool BIsSubscribedApp( AppId appID )
@ -110,10 +101,9 @@ internal bool BIsSubscribedApp( AppId appID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsDlcInstalled")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsDlcInstalled( IntPtr self, AppId appID ); private static extern bool _BIsDlcInstalled( IntPtr self, AppId appID );
private FBIsDlcInstalled _BIsDlcInstalled;
#endregion #endregion
internal bool BIsDlcInstalled( AppId appID ) internal bool BIsDlcInstalled( AppId appID )
@ -123,9 +113,8 @@ internal bool BIsDlcInstalled( AppId appID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetEarliestPurchaseUnixTime")]
private delegate uint FGetEarliestPurchaseUnixTime( IntPtr self, AppId nAppID ); private static extern uint _GetEarliestPurchaseUnixTime( IntPtr self, AppId nAppID );
private FGetEarliestPurchaseUnixTime _GetEarliestPurchaseUnixTime;
#endregion #endregion
internal uint GetEarliestPurchaseUnixTime( AppId nAppID ) internal uint GetEarliestPurchaseUnixTime( AppId nAppID )
@ -135,10 +124,9 @@ internal uint GetEarliestPurchaseUnixTime( AppId nAppID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFreeWeekend")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsSubscribedFromFreeWeekend( IntPtr self ); private static extern bool _BIsSubscribedFromFreeWeekend( IntPtr self );
private FBIsSubscribedFromFreeWeekend _BIsSubscribedFromFreeWeekend;
#endregion #endregion
internal bool BIsSubscribedFromFreeWeekend() internal bool BIsSubscribedFromFreeWeekend()
@ -148,9 +136,8 @@ internal bool BIsSubscribedFromFreeWeekend()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetDLCCount")]
private delegate int FGetDLCCount( IntPtr self ); private static extern int _GetDLCCount( IntPtr self );
private FGetDLCCount _GetDLCCount;
#endregion #endregion
internal int GetDLCCount() internal int GetDLCCount()
@ -160,10 +147,9 @@ internal int GetDLCCount()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BGetDLCDataByIndex")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _BGetDLCDataByIndex( IntPtr self, int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, IntPtr pchName, int cchNameBufferSize );
private FBGetDLCDataByIndex _BGetDLCDataByIndex;
#endregion #endregion
internal bool BGetDLCDataByIndex( int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, out string pchName ) internal bool BGetDLCDataByIndex( int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, out string pchName )
@ -175,9 +161,8 @@ internal bool BGetDLCDataByIndex( int iDLC, ref AppId pAppID, [MarshalAs( Unmana
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_InstallDLC")]
private delegate void FInstallDLC( IntPtr self, AppId nAppID ); private static extern void _InstallDLC( IntPtr self, AppId nAppID );
private FInstallDLC _InstallDLC;
#endregion #endregion
internal void InstallDLC( AppId nAppID ) internal void InstallDLC( AppId nAppID )
@ -186,9 +171,8 @@ internal void InstallDLC( AppId nAppID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_UninstallDLC")]
private delegate void FUninstallDLC( IntPtr self, AppId nAppID ); private static extern void _UninstallDLC( IntPtr self, AppId nAppID );
private FUninstallDLC _UninstallDLC;
#endregion #endregion
internal void UninstallDLC( AppId nAppID ) internal void UninstallDLC( AppId nAppID )
@ -197,9 +181,8 @@ internal void UninstallDLC( AppId nAppID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey")]
private delegate void FRequestAppProofOfPurchaseKey( IntPtr self, AppId nAppID ); private static extern void _RequestAppProofOfPurchaseKey( IntPtr self, AppId nAppID );
private FRequestAppProofOfPurchaseKey _RequestAppProofOfPurchaseKey;
#endregion #endregion
internal void RequestAppProofOfPurchaseKey( AppId nAppID ) internal void RequestAppProofOfPurchaseKey( AppId nAppID )
@ -208,10 +191,9 @@ internal void RequestAppProofOfPurchaseKey( AppId nAppID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetCurrentBetaName")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetCurrentBetaName( IntPtr self, IntPtr pchName, int cchNameBufferSize ); private static extern bool _GetCurrentBetaName( IntPtr self, IntPtr pchName, int cchNameBufferSize );
private FGetCurrentBetaName _GetCurrentBetaName;
#endregion #endregion
internal bool GetCurrentBetaName( out string pchName ) internal bool GetCurrentBetaName( out string pchName )
@ -223,10 +205,9 @@ internal bool GetCurrentBetaName( out string pchName )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_MarkContentCorrupt")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FMarkContentCorrupt( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly ); private static extern bool _MarkContentCorrupt( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly );
private FMarkContentCorrupt _MarkContentCorrupt;
#endregion #endregion
internal bool MarkContentCorrupt( [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly ) internal bool MarkContentCorrupt( [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly )
@ -236,9 +217,8 @@ internal bool MarkContentCorrupt( [MarshalAs( UnmanagedType.U1 )] bool bMissingF
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetInstalledDepots")]
private delegate uint FGetInstalledDepots( IntPtr self, AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots ); private static extern uint _GetInstalledDepots( IntPtr self, AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots );
private FGetInstalledDepots _GetInstalledDepots;
#endregion #endregion
internal uint GetInstalledDepots( AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots ) internal uint GetInstalledDepots( AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots )
@ -248,9 +228,8 @@ internal uint GetInstalledDepots( AppId appID, [In,Out] DepotId_t[] pvecDepots,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppInstallDir")]
private delegate uint FGetAppInstallDir( IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize ); private static extern uint _GetAppInstallDir( IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize );
private FGetAppInstallDir _GetAppInstallDir;
#endregion #endregion
internal uint GetAppInstallDir( AppId appID, out string pchFolder ) internal uint GetAppInstallDir( AppId appID, out string pchFolder )
@ -262,10 +241,9 @@ internal uint GetAppInstallDir( AppId appID, out string pchFolder )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsAppInstalled")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsAppInstalled( IntPtr self, AppId appID ); private static extern bool _BIsAppInstalled( IntPtr self, AppId appID );
private FBIsAppInstalled _BIsAppInstalled;
#endregion #endregion
internal bool BIsAppInstalled( AppId appID ) internal bool BIsAppInstalled( AppId appID )
@ -275,31 +253,19 @@ internal bool BIsAppInstalled( AppId appID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppOwner")]
#if PLATFORM_WIN private static extern SteamId _GetAppOwner( IntPtr self );
private delegate void FGetAppOwner( IntPtr self, ref SteamId retVal );
#else
private delegate SteamId FGetAppOwner( IntPtr self );
#endif
private FGetAppOwner _GetAppOwner;
#endregion #endregion
internal SteamId GetAppOwner() internal SteamId GetAppOwner()
{ {
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetAppOwner( Self, ref retVal );
return retVal;
#else
var returnValue = _GetAppOwner( Self ); var returnValue = _GetAppOwner( Self );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetLaunchQueryParam")]
private delegate Utf8StringPointer FGetLaunchQueryParam( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); private static extern Utf8StringPointer _GetLaunchQueryParam( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
private FGetLaunchQueryParam _GetLaunchQueryParam;
#endregion #endregion
internal string GetLaunchQueryParam( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) internal string GetLaunchQueryParam( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
@ -309,10 +275,9 @@ internal string GetLaunchQueryParam( [MarshalAs( UnmanagedType.CustomMarshaler,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetDlcDownloadProgress")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetDlcDownloadProgress( IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal ); private static extern bool _GetDlcDownloadProgress( IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal );
private FGetDlcDownloadProgress _GetDlcDownloadProgress;
#endregion #endregion
internal bool GetDlcDownloadProgress( AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal ) internal bool GetDlcDownloadProgress( AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal )
@ -322,9 +287,8 @@ internal bool GetDlcDownloadProgress( AppId nAppID, ref ulong punBytesDownloaded
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppBuildId")]
private delegate int FGetAppBuildId( IntPtr self ); private static extern int _GetAppBuildId( IntPtr self );
private FGetAppBuildId _GetAppBuildId;
#endregion #endregion
internal int GetAppBuildId() internal int GetAppBuildId()
@ -334,9 +298,8 @@ internal int GetAppBuildId()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys")]
private delegate void FRequestAllProofOfPurchaseKeys( IntPtr self ); private static extern void _RequestAllProofOfPurchaseKeys( IntPtr self );
private FRequestAllProofOfPurchaseKeys _RequestAllProofOfPurchaseKeys;
#endregion #endregion
internal void RequestAllProofOfPurchaseKeys() internal void RequestAllProofOfPurchaseKeys()
@ -345,21 +308,19 @@ internal void RequestAllProofOfPurchaseKeys()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetFileDetails")]
private delegate SteamAPICall_t FGetFileDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName ); private static extern SteamAPICall_t _GetFileDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName );
private FGetFileDetails _GetFileDetails;
#endregion #endregion
internal async Task<FileDetailsResult_t?> GetFileDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName ) internal CallbackResult GetFileDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName )
{ {
var returnValue = _GetFileDetails( Self, pszFileName ); var returnValue = _GetFileDetails( Self, pszFileName );
return await FileDetailsResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetLaunchCommandLine")]
private delegate int FGetLaunchCommandLine( IntPtr self, IntPtr pszCommandLine, int cubCommandLine ); private static extern int _GetLaunchCommandLine( IntPtr self, IntPtr pszCommandLine, int cubCommandLine );
private FGetLaunchCommandLine _GetLaunchCommandLine;
#endregion #endregion
internal int GetLaunchCommandLine( out string pszCommandLine ) internal int GetLaunchCommandLine( out string pszCommandLine )
@ -371,10 +332,9 @@ internal int GetLaunchCommandLine( out string pszCommandLine )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsSubscribedFromFamilySharing( IntPtr self ); private static extern bool _BIsSubscribedFromFamilySharing( IntPtr self );
private FBIsSubscribedFromFamilySharing _BIsSubscribedFromFamilySharing;
#endregion #endregion
internal bool BIsSubscribedFromFamilySharing() internal bool BIsSubscribedFromFamilySharing()

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamFriends : SteamInterface internal class ISteamFriends : SteamInterface
{ {
public override string InterfaceName => "SteamFriends017";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,9 +19,8 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaName")]
private delegate Utf8StringPointer FGetPersonaName( IntPtr self ); private static extern Utf8StringPointer _GetPersonaName( IntPtr self );
private FGetPersonaName _GetPersonaName;
#endregion #endregion
internal string GetPersonaName() internal string GetPersonaName()
@ -33,21 +30,19 @@ internal string GetPersonaName()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetPersonaName")]
private delegate SteamAPICall_t FSetPersonaName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName ); private static extern SteamAPICall_t _SetPersonaName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName );
private FSetPersonaName _SetPersonaName;
#endregion #endregion
internal async Task<SetPersonaNameResponse_t?> SetPersonaName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName ) internal CallbackResult SetPersonaName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName )
{ {
var returnValue = _SetPersonaName( Self, pchPersonaName ); var returnValue = _SetPersonaName( Self, pchPersonaName );
return await SetPersonaNameResponse_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaState")]
private delegate FriendState FGetPersonaState( IntPtr self ); private static extern FriendState _GetPersonaState( IntPtr self );
private FGetPersonaState _GetPersonaState;
#endregion #endregion
internal FriendState GetPersonaState() internal FriendState GetPersonaState()
@ -57,9 +52,8 @@ internal FriendState GetPersonaState()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCount")]
private delegate int FGetFriendCount( IntPtr self, int iFriendFlags ); private static extern int _GetFriendCount( IntPtr self, int iFriendFlags );
private FGetFriendCount _GetFriendCount;
#endregion #endregion
internal int GetFriendCount( int iFriendFlags ) internal int GetFriendCount( int iFriendFlags )
@ -69,31 +63,19 @@ internal int GetFriendCount( int iFriendFlags )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendByIndex")]
#if PLATFORM_WIN private static extern SteamId _GetFriendByIndex( IntPtr self, int iFriend, int iFriendFlags );
private delegate void FGetFriendByIndex( IntPtr self, ref SteamId retVal, int iFriend, int iFriendFlags );
#else
private delegate SteamId FGetFriendByIndex( IntPtr self, int iFriend, int iFriendFlags );
#endif
private FGetFriendByIndex _GetFriendByIndex;
#endregion #endregion
internal SteamId GetFriendByIndex( int iFriend, int iFriendFlags ) internal SteamId GetFriendByIndex( int iFriend, int iFriendFlags )
{ {
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetFriendByIndex( Self, ref retVal, iFriend, iFriendFlags );
return retVal;
#else
var returnValue = _GetFriendByIndex( Self, iFriend, iFriendFlags ); var returnValue = _GetFriendByIndex( Self, iFriend, iFriendFlags );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRelationship")]
private delegate Relationship FGetFriendRelationship( IntPtr self, SteamId steamIDFriend ); private static extern Relationship _GetFriendRelationship( IntPtr self, SteamId steamIDFriend );
private FGetFriendRelationship _GetFriendRelationship;
#endregion #endregion
internal Relationship GetFriendRelationship( SteamId steamIDFriend ) internal Relationship GetFriendRelationship( SteamId steamIDFriend )
@ -103,9 +85,8 @@ internal Relationship GetFriendRelationship( SteamId steamIDFriend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaState")]
private delegate FriendState FGetFriendPersonaState( IntPtr self, SteamId steamIDFriend ); private static extern FriendState _GetFriendPersonaState( IntPtr self, SteamId steamIDFriend );
private FGetFriendPersonaState _GetFriendPersonaState;
#endregion #endregion
internal FriendState GetFriendPersonaState( SteamId steamIDFriend ) internal FriendState GetFriendPersonaState( SteamId steamIDFriend )
@ -115,9 +96,8 @@ internal FriendState GetFriendPersonaState( SteamId steamIDFriend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaName")]
private delegate Utf8StringPointer FGetFriendPersonaName( IntPtr self, SteamId steamIDFriend ); private static extern Utf8StringPointer _GetFriendPersonaName( IntPtr self, SteamId steamIDFriend );
private FGetFriendPersonaName _GetFriendPersonaName;
#endregion #endregion
internal string GetFriendPersonaName( SteamId steamIDFriend ) internal string GetFriendPersonaName( SteamId steamIDFriend )
@ -127,10 +107,9 @@ internal string GetFriendPersonaName( SteamId steamIDFriend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendGamePlayed")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetFriendGamePlayed( IntPtr self, SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo ); private static extern bool _GetFriendGamePlayed( IntPtr self, SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo );
private FGetFriendGamePlayed _GetFriendGamePlayed;
#endregion #endregion
internal bool GetFriendGamePlayed( SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo ) internal bool GetFriendGamePlayed( SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo )
@ -140,9 +119,8 @@ internal bool GetFriendGamePlayed( SteamId steamIDFriend, ref FriendGameInfo_t p
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaNameHistory")]
private delegate Utf8StringPointer FGetFriendPersonaNameHistory( IntPtr self, SteamId steamIDFriend, int iPersonaName ); private static extern Utf8StringPointer _GetFriendPersonaNameHistory( IntPtr self, SteamId steamIDFriend, int iPersonaName );
private FGetFriendPersonaNameHistory _GetFriendPersonaNameHistory;
#endregion #endregion
internal string GetFriendPersonaNameHistory( SteamId steamIDFriend, int iPersonaName ) internal string GetFriendPersonaNameHistory( SteamId steamIDFriend, int iPersonaName )
@ -152,9 +130,8 @@ internal string GetFriendPersonaNameHistory( SteamId steamIDFriend, int iPersona
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendSteamLevel")]
private delegate int FGetFriendSteamLevel( IntPtr self, SteamId steamIDFriend ); private static extern int _GetFriendSteamLevel( IntPtr self, SteamId steamIDFriend );
private FGetFriendSteamLevel _GetFriendSteamLevel;
#endregion #endregion
internal int GetFriendSteamLevel( SteamId steamIDFriend ) internal int GetFriendSteamLevel( SteamId steamIDFriend )
@ -164,9 +141,8 @@ internal int GetFriendSteamLevel( SteamId steamIDFriend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPlayerNickname")]
private delegate Utf8StringPointer FGetPlayerNickname( IntPtr self, SteamId steamIDPlayer ); private static extern Utf8StringPointer _GetPlayerNickname( IntPtr self, SteamId steamIDPlayer );
private FGetPlayerNickname _GetPlayerNickname;
#endregion #endregion
internal string GetPlayerNickname( SteamId steamIDPlayer ) internal string GetPlayerNickname( SteamId steamIDPlayer )
@ -176,9 +152,8 @@ internal string GetPlayerNickname( SteamId steamIDPlayer )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupCount")]
private delegate int FGetFriendsGroupCount( IntPtr self ); private static extern int _GetFriendsGroupCount( IntPtr self );
private FGetFriendsGroupCount _GetFriendsGroupCount;
#endregion #endregion
internal int GetFriendsGroupCount() internal int GetFriendsGroupCount()
@ -188,9 +163,8 @@ internal int GetFriendsGroupCount()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupIDByIndex")]
private delegate FriendsGroupID_t FGetFriendsGroupIDByIndex( IntPtr self, int iFG ); private static extern FriendsGroupID_t _GetFriendsGroupIDByIndex( IntPtr self, int iFG );
private FGetFriendsGroupIDByIndex _GetFriendsGroupIDByIndex;
#endregion #endregion
internal FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG ) internal FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG )
@ -200,9 +174,8 @@ internal FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupName")]
private delegate Utf8StringPointer FGetFriendsGroupName( IntPtr self, FriendsGroupID_t friendsGroupID ); private static extern Utf8StringPointer _GetFriendsGroupName( IntPtr self, FriendsGroupID_t friendsGroupID );
private FGetFriendsGroupName _GetFriendsGroupName;
#endregion #endregion
internal string GetFriendsGroupName( FriendsGroupID_t friendsGroupID ) internal string GetFriendsGroupName( FriendsGroupID_t friendsGroupID )
@ -212,9 +185,8 @@ internal string GetFriendsGroupName( FriendsGroupID_t friendsGroupID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersCount")]
private delegate int FGetFriendsGroupMembersCount( IntPtr self, FriendsGroupID_t friendsGroupID ); private static extern int _GetFriendsGroupMembersCount( IntPtr self, FriendsGroupID_t friendsGroupID );
private FGetFriendsGroupMembersCount _GetFriendsGroupMembersCount;
#endregion #endregion
internal int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID ) internal int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID )
@ -224,9 +196,8 @@ internal int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersList")]
private delegate void FGetFriendsGroupMembersList( IntPtr self, FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount ); private static extern void _GetFriendsGroupMembersList( IntPtr self, FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount );
private FGetFriendsGroupMembersList _GetFriendsGroupMembersList;
#endregion #endregion
internal void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount ) internal void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount )
@ -235,10 +206,9 @@ internal void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, [In,O
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_HasFriend")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FHasFriend( IntPtr self, SteamId steamIDFriend, int iFriendFlags ); private static extern bool _HasFriend( IntPtr self, SteamId steamIDFriend, int iFriendFlags );
private FHasFriend _HasFriend;
#endregion #endregion
internal bool HasFriend( SteamId steamIDFriend, int iFriendFlags ) internal bool HasFriend( SteamId steamIDFriend, int iFriendFlags )
@ -248,9 +218,8 @@ internal bool HasFriend( SteamId steamIDFriend, int iFriendFlags )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanCount")]
private delegate int FGetClanCount( IntPtr self ); private static extern int _GetClanCount( IntPtr self );
private FGetClanCount _GetClanCount;
#endregion #endregion
internal int GetClanCount() internal int GetClanCount()
@ -260,31 +229,19 @@ internal int GetClanCount()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanByIndex")]
#if PLATFORM_WIN private static extern SteamId _GetClanByIndex( IntPtr self, int iClan );
private delegate void FGetClanByIndex( IntPtr self, ref SteamId retVal, int iClan );
#else
private delegate SteamId FGetClanByIndex( IntPtr self, int iClan );
#endif
private FGetClanByIndex _GetClanByIndex;
#endregion #endregion
internal SteamId GetClanByIndex( int iClan ) internal SteamId GetClanByIndex( int iClan )
{ {
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetClanByIndex( Self, ref retVal, iClan );
return retVal;
#else
var returnValue = _GetClanByIndex( Self, iClan ); var returnValue = _GetClanByIndex( Self, iClan );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanName")]
private delegate Utf8StringPointer FGetClanName( IntPtr self, SteamId steamIDClan ); private static extern Utf8StringPointer _GetClanName( IntPtr self, SteamId steamIDClan );
private FGetClanName _GetClanName;
#endregion #endregion
internal string GetClanName( SteamId steamIDClan ) internal string GetClanName( SteamId steamIDClan )
@ -294,9 +251,8 @@ internal string GetClanName( SteamId steamIDClan )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanTag")]
private delegate Utf8StringPointer FGetClanTag( IntPtr self, SteamId steamIDClan ); private static extern Utf8StringPointer _GetClanTag( IntPtr self, SteamId steamIDClan );
private FGetClanTag _GetClanTag;
#endregion #endregion
internal string GetClanTag( SteamId steamIDClan ) internal string GetClanTag( SteamId steamIDClan )
@ -306,10 +262,9 @@ internal string GetClanTag( SteamId steamIDClan )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanActivityCounts")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetClanActivityCounts( IntPtr self, SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting ); private static extern bool _GetClanActivityCounts( IntPtr self, SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting );
private FGetClanActivityCounts _GetClanActivityCounts;
#endregion #endregion
internal bool GetClanActivityCounts( SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting ) internal bool GetClanActivityCounts( SteamId steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting )
@ -319,21 +274,19 @@ internal bool GetClanActivityCounts( SteamId steamIDClan, ref int pnOnline, ref
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_DownloadClanActivityCounts")]
private delegate SteamAPICall_t FDownloadClanActivityCounts( IntPtr self, [In,Out] SteamId[] psteamIDClans, int cClansToRequest ); private static extern SteamAPICall_t _DownloadClanActivityCounts( IntPtr self, [In,Out] SteamId[] psteamIDClans, int cClansToRequest );
private FDownloadClanActivityCounts _DownloadClanActivityCounts;
#endregion #endregion
internal async Task<DownloadClanActivityCountsResult_t?> DownloadClanActivityCounts( [In,Out] SteamId[] psteamIDClans, int cClansToRequest ) internal CallbackResult DownloadClanActivityCounts( [In,Out] SteamId[] psteamIDClans, int cClansToRequest )
{ {
var returnValue = _DownloadClanActivityCounts( Self, psteamIDClans, cClansToRequest ); var returnValue = _DownloadClanActivityCounts( Self, psteamIDClans, cClansToRequest );
return await DownloadClanActivityCountsResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCountFromSource")]
private delegate int FGetFriendCountFromSource( IntPtr self, SteamId steamIDSource ); private static extern int _GetFriendCountFromSource( IntPtr self, SteamId steamIDSource );
private FGetFriendCountFromSource _GetFriendCountFromSource;
#endregion #endregion
internal int GetFriendCountFromSource( SteamId steamIDSource ) internal int GetFriendCountFromSource( SteamId steamIDSource )
@ -343,32 +296,20 @@ internal int GetFriendCountFromSource( SteamId steamIDSource )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendFromSourceByIndex")]
#if PLATFORM_WIN private static extern SteamId _GetFriendFromSourceByIndex( IntPtr self, SteamId steamIDSource, int iFriend );
private delegate void FGetFriendFromSourceByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDSource, int iFriend );
#else
private delegate SteamId FGetFriendFromSourceByIndex( IntPtr self, SteamId steamIDSource, int iFriend );
#endif
private FGetFriendFromSourceByIndex _GetFriendFromSourceByIndex;
#endregion #endregion
internal SteamId GetFriendFromSourceByIndex( SteamId steamIDSource, int iFriend ) internal SteamId GetFriendFromSourceByIndex( SteamId steamIDSource, int iFriend )
{ {
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetFriendFromSourceByIndex( Self, ref retVal, steamIDSource, iFriend );
return retVal;
#else
var returnValue = _GetFriendFromSourceByIndex( Self, steamIDSource, iFriend ); var returnValue = _GetFriendFromSourceByIndex( Self, steamIDSource, iFriend );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsUserInSource")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsUserInSource( IntPtr self, SteamId steamIDUser, SteamId steamIDSource ); private static extern bool _IsUserInSource( IntPtr self, SteamId steamIDUser, SteamId steamIDSource );
private FIsUserInSource _IsUserInSource;
#endregion #endregion
internal bool IsUserInSource( SteamId steamIDUser, SteamId steamIDSource ) internal bool IsUserInSource( SteamId steamIDUser, SteamId steamIDSource )
@ -378,9 +319,8 @@ internal bool IsUserInSource( SteamId steamIDUser, SteamId steamIDSource )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetInGameVoiceSpeaking")]
private delegate void FSetInGameVoiceSpeaking( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking ); private static extern void _SetInGameVoiceSpeaking( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking );
private FSetInGameVoiceSpeaking _SetInGameVoiceSpeaking;
#endregion #endregion
internal void SetInGameVoiceSpeaking( SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking ) internal void SetInGameVoiceSpeaking( SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking )
@ -389,9 +329,8 @@ internal void SetInGameVoiceSpeaking( SteamId steamIDUser, [MarshalAs( Unmanaged
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlay")]
private delegate void FActivateGameOverlay( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog ); private static extern void _ActivateGameOverlay( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog );
private FActivateGameOverlay _ActivateGameOverlay;
#endregion #endregion
internal void ActivateGameOverlay( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog ) internal void ActivateGameOverlay( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog )
@ -400,9 +339,8 @@ internal void ActivateGameOverlay( [MarshalAs( UnmanagedType.CustomMarshaler, Ma
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToUser")]
private delegate void FActivateGameOverlayToUser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID ); private static extern void _ActivateGameOverlayToUser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID );
private FActivateGameOverlayToUser _ActivateGameOverlayToUser;
#endregion #endregion
internal void ActivateGameOverlayToUser( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID ) internal void ActivateGameOverlayToUser( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID )
@ -411,9 +349,8 @@ internal void ActivateGameOverlayToUser( [MarshalAs( UnmanagedType.CustomMarshal
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage")]
private delegate void FActivateGameOverlayToWebPage( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode ); private static extern void _ActivateGameOverlayToWebPage( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode );
private FActivateGameOverlayToWebPage _ActivateGameOverlayToWebPage;
#endregion #endregion
internal void ActivateGameOverlayToWebPage( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode ) internal void ActivateGameOverlayToWebPage( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode )
@ -422,9 +359,8 @@ internal void ActivateGameOverlayToWebPage( [MarshalAs( UnmanagedType.CustomMars
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToStore")]
private delegate void FActivateGameOverlayToStore( IntPtr self, AppId nAppID, OverlayToStoreFlag eFlag ); private static extern void _ActivateGameOverlayToStore( IntPtr self, AppId nAppID, OverlayToStoreFlag eFlag );
private FActivateGameOverlayToStore _ActivateGameOverlayToStore;
#endregion #endregion
internal void ActivateGameOverlayToStore( AppId nAppID, OverlayToStoreFlag eFlag ) internal void ActivateGameOverlayToStore( AppId nAppID, OverlayToStoreFlag eFlag )
@ -433,9 +369,8 @@ internal void ActivateGameOverlayToStore( AppId nAppID, OverlayToStoreFlag eFlag
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetPlayedWith")]
private delegate void FSetPlayedWith( IntPtr self, SteamId steamIDUserPlayedWith ); private static extern void _SetPlayedWith( IntPtr self, SteamId steamIDUserPlayedWith );
private FSetPlayedWith _SetPlayedWith;
#endregion #endregion
internal void SetPlayedWith( SteamId steamIDUserPlayedWith ) internal void SetPlayedWith( SteamId steamIDUserPlayedWith )
@ -444,9 +379,8 @@ internal void SetPlayedWith( SteamId steamIDUserPlayedWith )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialog")]
private delegate void FActivateGameOverlayInviteDialog( IntPtr self, SteamId steamIDLobby ); private static extern void _ActivateGameOverlayInviteDialog( IntPtr self, SteamId steamIDLobby );
private FActivateGameOverlayInviteDialog _ActivateGameOverlayInviteDialog;
#endregion #endregion
internal void ActivateGameOverlayInviteDialog( SteamId steamIDLobby ) internal void ActivateGameOverlayInviteDialog( SteamId steamIDLobby )
@ -455,9 +389,8 @@ internal void ActivateGameOverlayInviteDialog( SteamId steamIDLobby )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetSmallFriendAvatar")]
private delegate int FGetSmallFriendAvatar( IntPtr self, SteamId steamIDFriend ); private static extern int _GetSmallFriendAvatar( IntPtr self, SteamId steamIDFriend );
private FGetSmallFriendAvatar _GetSmallFriendAvatar;
#endregion #endregion
internal int GetSmallFriendAvatar( SteamId steamIDFriend ) internal int GetSmallFriendAvatar( SteamId steamIDFriend )
@ -467,9 +400,8 @@ internal int GetSmallFriendAvatar( SteamId steamIDFriend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetMediumFriendAvatar")]
private delegate int FGetMediumFriendAvatar( IntPtr self, SteamId steamIDFriend ); private static extern int _GetMediumFriendAvatar( IntPtr self, SteamId steamIDFriend );
private FGetMediumFriendAvatar _GetMediumFriendAvatar;
#endregion #endregion
internal int GetMediumFriendAvatar( SteamId steamIDFriend ) internal int GetMediumFriendAvatar( SteamId steamIDFriend )
@ -479,9 +411,8 @@ internal int GetMediumFriendAvatar( SteamId steamIDFriend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetLargeFriendAvatar")]
private delegate int FGetLargeFriendAvatar( IntPtr self, SteamId steamIDFriend ); private static extern int _GetLargeFriendAvatar( IntPtr self, SteamId steamIDFriend );
private FGetLargeFriendAvatar _GetLargeFriendAvatar;
#endregion #endregion
internal int GetLargeFriendAvatar( SteamId steamIDFriend ) internal int GetLargeFriendAvatar( SteamId steamIDFriend )
@ -491,10 +422,9 @@ internal int GetLargeFriendAvatar( SteamId steamIDFriend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestUserInformation")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRequestUserInformation( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly ); private static extern bool _RequestUserInformation( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly );
private FRequestUserInformation _RequestUserInformation;
#endregion #endregion
internal bool RequestUserInformation( SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly ) internal bool RequestUserInformation( SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly )
@ -504,43 +434,30 @@ internal bool RequestUserInformation( SteamId steamIDUser, [MarshalAs( Unmanaged
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestClanOfficerList")]
private delegate SteamAPICall_t FRequestClanOfficerList( IntPtr self, SteamId steamIDClan ); private static extern SteamAPICall_t _RequestClanOfficerList( IntPtr self, SteamId steamIDClan );
private FRequestClanOfficerList _RequestClanOfficerList;
#endregion #endregion
internal async Task<ClanOfficerListResponse_t?> RequestClanOfficerList( SteamId steamIDClan ) internal CallbackResult RequestClanOfficerList( SteamId steamIDClan )
{ {
var returnValue = _RequestClanOfficerList( Self, steamIDClan ); var returnValue = _RequestClanOfficerList( Self, steamIDClan );
return await ClanOfficerListResponse_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOwner")]
#if PLATFORM_WIN private static extern SteamId _GetClanOwner( IntPtr self, SteamId steamIDClan );
private delegate void FGetClanOwner( IntPtr self, ref SteamId retVal, SteamId steamIDClan );
#else
private delegate SteamId FGetClanOwner( IntPtr self, SteamId steamIDClan );
#endif
private FGetClanOwner _GetClanOwner;
#endregion #endregion
internal SteamId GetClanOwner( SteamId steamIDClan ) internal SteamId GetClanOwner( SteamId steamIDClan )
{ {
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetClanOwner( Self, ref retVal, steamIDClan );
return retVal;
#else
var returnValue = _GetClanOwner( Self, steamIDClan ); var returnValue = _GetClanOwner( Self, steamIDClan );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOfficerCount")]
private delegate int FGetClanOfficerCount( IntPtr self, SteamId steamIDClan ); private static extern int _GetClanOfficerCount( IntPtr self, SteamId steamIDClan );
private FGetClanOfficerCount _GetClanOfficerCount;
#endregion #endregion
internal int GetClanOfficerCount( SteamId steamIDClan ) internal int GetClanOfficerCount( SteamId steamIDClan )
@ -550,31 +467,19 @@ internal int GetClanOfficerCount( SteamId steamIDClan )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOfficerByIndex")]
#if PLATFORM_WIN private static extern SteamId _GetClanOfficerByIndex( IntPtr self, SteamId steamIDClan, int iOfficer );
private delegate void FGetClanOfficerByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDClan, int iOfficer );
#else
private delegate SteamId FGetClanOfficerByIndex( IntPtr self, SteamId steamIDClan, int iOfficer );
#endif
private FGetClanOfficerByIndex _GetClanOfficerByIndex;
#endregion #endregion
internal SteamId GetClanOfficerByIndex( SteamId steamIDClan, int iOfficer ) internal SteamId GetClanOfficerByIndex( SteamId steamIDClan, int iOfficer )
{ {
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetClanOfficerByIndex( Self, ref retVal, steamIDClan, iOfficer );
return retVal;
#else
var returnValue = _GetClanOfficerByIndex( Self, steamIDClan, iOfficer ); var returnValue = _GetClanOfficerByIndex( Self, steamIDClan, iOfficer );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetUserRestrictions")]
private delegate uint FGetUserRestrictions( IntPtr self ); private static extern uint _GetUserRestrictions( IntPtr self );
private FGetUserRestrictions _GetUserRestrictions;
#endregion #endregion
internal uint GetUserRestrictions() internal uint GetUserRestrictions()
@ -584,10 +489,9 @@ internal uint GetUserRestrictions()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetRichPresence")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetRichPresence( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); private static extern bool _SetRichPresence( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
private FSetRichPresence _SetRichPresence;
#endregion #endregion
internal bool SetRichPresence( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) internal bool SetRichPresence( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
@ -597,9 +501,8 @@ internal bool SetRichPresence( [MarshalAs( UnmanagedType.CustomMarshaler, Marsha
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ClearRichPresence")]
private delegate void FClearRichPresence( IntPtr self ); private static extern void _ClearRichPresence( IntPtr self );
private FClearRichPresence _ClearRichPresence;
#endregion #endregion
internal void ClearRichPresence() internal void ClearRichPresence()
@ -608,9 +511,8 @@ internal void ClearRichPresence()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresence")]
private delegate Utf8StringPointer FGetFriendRichPresence( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); private static extern Utf8StringPointer _GetFriendRichPresence( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
private FGetFriendRichPresence _GetFriendRichPresence;
#endregion #endregion
internal string GetFriendRichPresence( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) internal string GetFriendRichPresence( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
@ -620,9 +522,8 @@ internal string GetFriendRichPresence( SteamId steamIDFriend, [MarshalAs( Unmana
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresenceKeyCount")]
private delegate int FGetFriendRichPresenceKeyCount( IntPtr self, SteamId steamIDFriend ); private static extern int _GetFriendRichPresenceKeyCount( IntPtr self, SteamId steamIDFriend );
private FGetFriendRichPresenceKeyCount _GetFriendRichPresenceKeyCount;
#endregion #endregion
internal int GetFriendRichPresenceKeyCount( SteamId steamIDFriend ) internal int GetFriendRichPresenceKeyCount( SteamId steamIDFriend )
@ -632,9 +533,8 @@ internal int GetFriendRichPresenceKeyCount( SteamId steamIDFriend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresenceKeyByIndex")]
private delegate Utf8StringPointer FGetFriendRichPresenceKeyByIndex( IntPtr self, SteamId steamIDFriend, int iKey ); private static extern Utf8StringPointer _GetFriendRichPresenceKeyByIndex( IntPtr self, SteamId steamIDFriend, int iKey );
private FGetFriendRichPresenceKeyByIndex _GetFriendRichPresenceKeyByIndex;
#endregion #endregion
internal string GetFriendRichPresenceKeyByIndex( SteamId steamIDFriend, int iKey ) internal string GetFriendRichPresenceKeyByIndex( SteamId steamIDFriend, int iKey )
@ -644,9 +544,8 @@ internal string GetFriendRichPresenceKeyByIndex( SteamId steamIDFriend, int iKey
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestFriendRichPresence")]
private delegate void FRequestFriendRichPresence( IntPtr self, SteamId steamIDFriend ); private static extern void _RequestFriendRichPresence( IntPtr self, SteamId steamIDFriend );
private FRequestFriendRichPresence _RequestFriendRichPresence;
#endregion #endregion
internal void RequestFriendRichPresence( SteamId steamIDFriend ) internal void RequestFriendRichPresence( SteamId steamIDFriend )
@ -655,10 +554,9 @@ internal void RequestFriendRichPresence( SteamId steamIDFriend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_InviteUserToGame")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FInviteUserToGame( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString ); private static extern bool _InviteUserToGame( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString );
private FInviteUserToGame _InviteUserToGame;
#endregion #endregion
internal bool InviteUserToGame( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString ) internal bool InviteUserToGame( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString )
@ -668,9 +566,8 @@ internal bool InviteUserToGame( SteamId steamIDFriend, [MarshalAs( UnmanagedType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetCoplayFriendCount")]
private delegate int FGetCoplayFriendCount( IntPtr self ); private static extern int _GetCoplayFriendCount( IntPtr self );
private FGetCoplayFriendCount _GetCoplayFriendCount;
#endregion #endregion
internal int GetCoplayFriendCount() internal int GetCoplayFriendCount()
@ -680,31 +577,19 @@ internal int GetCoplayFriendCount()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetCoplayFriend")]
#if PLATFORM_WIN private static extern SteamId _GetCoplayFriend( IntPtr self, int iCoplayFriend );
private delegate void FGetCoplayFriend( IntPtr self, ref SteamId retVal, int iCoplayFriend );
#else
private delegate SteamId FGetCoplayFriend( IntPtr self, int iCoplayFriend );
#endif
private FGetCoplayFriend _GetCoplayFriend;
#endregion #endregion
internal SteamId GetCoplayFriend( int iCoplayFriend ) internal SteamId GetCoplayFriend( int iCoplayFriend )
{ {
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetCoplayFriend( Self, ref retVal, iCoplayFriend );
return retVal;
#else
var returnValue = _GetCoplayFriend( Self, iCoplayFriend ); var returnValue = _GetCoplayFriend( Self, iCoplayFriend );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCoplayTime")]
private delegate int FGetFriendCoplayTime( IntPtr self, SteamId steamIDFriend ); private static extern int _GetFriendCoplayTime( IntPtr self, SteamId steamIDFriend );
private FGetFriendCoplayTime _GetFriendCoplayTime;
#endregion #endregion
internal int GetFriendCoplayTime( SteamId steamIDFriend ) internal int GetFriendCoplayTime( SteamId steamIDFriend )
@ -714,9 +599,8 @@ internal int GetFriendCoplayTime( SteamId steamIDFriend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCoplayGame")]
private delegate AppId FGetFriendCoplayGame( IntPtr self, SteamId steamIDFriend ); private static extern AppId _GetFriendCoplayGame( IntPtr self, SteamId steamIDFriend );
private FGetFriendCoplayGame _GetFriendCoplayGame;
#endregion #endregion
internal AppId GetFriendCoplayGame( SteamId steamIDFriend ) internal AppId GetFriendCoplayGame( SteamId steamIDFriend )
@ -726,22 +610,20 @@ internal AppId GetFriendCoplayGame( SteamId steamIDFriend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_JoinClanChatRoom")]
private delegate SteamAPICall_t FJoinClanChatRoom( IntPtr self, SteamId steamIDClan ); private static extern SteamAPICall_t _JoinClanChatRoom( IntPtr self, SteamId steamIDClan );
private FJoinClanChatRoom _JoinClanChatRoom;
#endregion #endregion
internal async Task<JoinClanChatRoomCompletionResult_t?> JoinClanChatRoom( SteamId steamIDClan ) internal CallbackResult JoinClanChatRoom( SteamId steamIDClan )
{ {
var returnValue = _JoinClanChatRoom( Self, steamIDClan ); var returnValue = _JoinClanChatRoom( Self, steamIDClan );
return await JoinClanChatRoomCompletionResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_LeaveClanChatRoom")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FLeaveClanChatRoom( IntPtr self, SteamId steamIDClan ); private static extern bool _LeaveClanChatRoom( IntPtr self, SteamId steamIDClan );
private FLeaveClanChatRoom _LeaveClanChatRoom;
#endregion #endregion
internal bool LeaveClanChatRoom( SteamId steamIDClan ) internal bool LeaveClanChatRoom( SteamId steamIDClan )
@ -751,9 +633,8 @@ internal bool LeaveClanChatRoom( SteamId steamIDClan )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanChatMemberCount")]
private delegate int FGetClanChatMemberCount( IntPtr self, SteamId steamIDClan ); private static extern int _GetClanChatMemberCount( IntPtr self, SteamId steamIDClan );
private FGetClanChatMemberCount _GetClanChatMemberCount;
#endregion #endregion
internal int GetClanChatMemberCount( SteamId steamIDClan ) internal int GetClanChatMemberCount( SteamId steamIDClan )
@ -763,32 +644,20 @@ internal int GetClanChatMemberCount( SteamId steamIDClan )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetChatMemberByIndex")]
#if PLATFORM_WIN private static extern SteamId _GetChatMemberByIndex( IntPtr self, SteamId steamIDClan, int iUser );
private delegate void FGetChatMemberByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDClan, int iUser );
#else
private delegate SteamId FGetChatMemberByIndex( IntPtr self, SteamId steamIDClan, int iUser );
#endif
private FGetChatMemberByIndex _GetChatMemberByIndex;
#endregion #endregion
internal SteamId GetChatMemberByIndex( SteamId steamIDClan, int iUser ) internal SteamId GetChatMemberByIndex( SteamId steamIDClan, int iUser )
{ {
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetChatMemberByIndex( Self, ref retVal, steamIDClan, iUser );
return retVal;
#else
var returnValue = _GetChatMemberByIndex( Self, steamIDClan, iUser ); var returnValue = _GetChatMemberByIndex( Self, steamIDClan, iUser );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SendClanChatMessage")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSendClanChatMessage( IntPtr self, SteamId steamIDClanChat, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText ); private static extern bool _SendClanChatMessage( IntPtr self, SteamId steamIDClanChat, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText );
private FSendClanChatMessage _SendClanChatMessage;
#endregion #endregion
internal bool SendClanChatMessage( SteamId steamIDClanChat, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText ) internal bool SendClanChatMessage( SteamId steamIDClanChat, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText )
@ -798,9 +667,8 @@ internal bool SendClanChatMessage( SteamId steamIDClanChat, [MarshalAs( Unmanage
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanChatMessage")]
private delegate int FGetClanChatMessage( IntPtr self, SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter ); private static extern int _GetClanChatMessage( IntPtr self, SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter );
private FGetClanChatMessage _GetClanChatMessage;
#endregion #endregion
internal int GetClanChatMessage( SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter ) internal int GetClanChatMessage( SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter )
@ -810,10 +678,9 @@ internal int GetClanChatMessage( SteamId steamIDClanChat, int iMessage, IntPtr p
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanChatAdmin")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsClanChatAdmin( IntPtr self, SteamId steamIDClanChat, SteamId steamIDUser ); private static extern bool _IsClanChatAdmin( IntPtr self, SteamId steamIDClanChat, SteamId steamIDUser );
private FIsClanChatAdmin _IsClanChatAdmin;
#endregion #endregion
internal bool IsClanChatAdmin( SteamId steamIDClanChat, SteamId steamIDUser ) internal bool IsClanChatAdmin( SteamId steamIDClanChat, SteamId steamIDUser )
@ -823,10 +690,9 @@ internal bool IsClanChatAdmin( SteamId steamIDClanChat, SteamId steamIDUser )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanChatWindowOpenInSteam")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsClanChatWindowOpenInSteam( IntPtr self, SteamId steamIDClanChat ); private static extern bool _IsClanChatWindowOpenInSteam( IntPtr self, SteamId steamIDClanChat );
private FIsClanChatWindowOpenInSteam _IsClanChatWindowOpenInSteam;
#endregion #endregion
internal bool IsClanChatWindowOpenInSteam( SteamId steamIDClanChat ) internal bool IsClanChatWindowOpenInSteam( SteamId steamIDClanChat )
@ -836,10 +702,9 @@ internal bool IsClanChatWindowOpenInSteam( SteamId steamIDClanChat )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_OpenClanChatWindowInSteam")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FOpenClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat ); private static extern bool _OpenClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat );
private FOpenClanChatWindowInSteam _OpenClanChatWindowInSteam;
#endregion #endregion
internal bool OpenClanChatWindowInSteam( SteamId steamIDClanChat ) internal bool OpenClanChatWindowInSteam( SteamId steamIDClanChat )
@ -849,10 +714,9 @@ internal bool OpenClanChatWindowInSteam( SteamId steamIDClanChat )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_CloseClanChatWindowInSteam")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FCloseClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat ); private static extern bool _CloseClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat );
private FCloseClanChatWindowInSteam _CloseClanChatWindowInSteam;
#endregion #endregion
internal bool CloseClanChatWindowInSteam( SteamId steamIDClanChat ) internal bool CloseClanChatWindowInSteam( SteamId steamIDClanChat )
@ -862,10 +726,9 @@ internal bool CloseClanChatWindowInSteam( SteamId steamIDClanChat )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetListenForFriendsMessages")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetListenForFriendsMessages( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled ); private static extern bool _SetListenForFriendsMessages( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled );
private FSetListenForFriendsMessages _SetListenForFriendsMessages;
#endregion #endregion
internal bool SetListenForFriendsMessages( [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled ) internal bool SetListenForFriendsMessages( [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled )
@ -875,10 +738,9 @@ internal bool SetListenForFriendsMessages( [MarshalAs( UnmanagedType.U1 )] bool
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ReplyToFriendMessage")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FReplyToFriendMessage( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMsgToSend ); private static extern bool _ReplyToFriendMessage( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMsgToSend );
private FReplyToFriendMessage _ReplyToFriendMessage;
#endregion #endregion
internal bool ReplyToFriendMessage( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMsgToSend ) internal bool ReplyToFriendMessage( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMsgToSend )
@ -888,9 +750,8 @@ internal bool ReplyToFriendMessage( SteamId steamIDFriend, [MarshalAs( Unmanaged
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendMessage")]
private delegate int FGetFriendMessage( IntPtr self, SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType ); private static extern int _GetFriendMessage( IntPtr self, SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType );
private FGetFriendMessage _GetFriendMessage;
#endregion #endregion
internal int GetFriendMessage( SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType ) internal int GetFriendMessage( SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType )
@ -900,46 +761,42 @@ internal int GetFriendMessage( SteamId steamIDFriend, int iMessageID, IntPtr pvD
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFollowerCount")]
private delegate SteamAPICall_t FGetFollowerCount( IntPtr self, SteamId steamID ); private static extern SteamAPICall_t _GetFollowerCount( IntPtr self, SteamId steamID );
private FGetFollowerCount _GetFollowerCount;
#endregion #endregion
internal async Task<FriendsGetFollowerCount_t?> GetFollowerCount( SteamId steamID ) internal CallbackResult GetFollowerCount( SteamId steamID )
{ {
var returnValue = _GetFollowerCount( Self, steamID ); var returnValue = _GetFollowerCount( Self, steamID );
return await FriendsGetFollowerCount_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsFollowing")]
private delegate SteamAPICall_t FIsFollowing( IntPtr self, SteamId steamID ); private static extern SteamAPICall_t _IsFollowing( IntPtr self, SteamId steamID );
private FIsFollowing _IsFollowing;
#endregion #endregion
internal async Task<FriendsIsFollowing_t?> IsFollowing( SteamId steamID ) internal CallbackResult IsFollowing( SteamId steamID )
{ {
var returnValue = _IsFollowing( Self, steamID ); var returnValue = _IsFollowing( Self, steamID );
return await FriendsIsFollowing_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_EnumerateFollowingList")]
private delegate SteamAPICall_t FEnumerateFollowingList( IntPtr self, uint unStartIndex ); private static extern SteamAPICall_t _EnumerateFollowingList( IntPtr self, uint unStartIndex );
private FEnumerateFollowingList _EnumerateFollowingList;
#endregion #endregion
internal async Task<FriendsEnumerateFollowingList_t?> EnumerateFollowingList( uint unStartIndex ) internal CallbackResult EnumerateFollowingList( uint unStartIndex )
{ {
var returnValue = _EnumerateFollowingList( Self, unStartIndex ); var returnValue = _EnumerateFollowingList( Self, unStartIndex );
return await FriendsEnumerateFollowingList_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanPublic")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsClanPublic( IntPtr self, SteamId steamIDClan ); private static extern bool _IsClanPublic( IntPtr self, SteamId steamIDClan );
private FIsClanPublic _IsClanPublic;
#endregion #endregion
internal bool IsClanPublic( SteamId steamIDClan ) internal bool IsClanPublic( SteamId steamIDClan )
@ -949,10 +806,9 @@ internal bool IsClanPublic( SteamId steamIDClan )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanOfficialGameGroup")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsClanOfficialGameGroup( IntPtr self, SteamId steamIDClan ); private static extern bool _IsClanOfficialGameGroup( IntPtr self, SteamId steamIDClan );
private FIsClanOfficialGameGroup _IsClanOfficialGameGroup;
#endregion #endregion
internal bool IsClanOfficialGameGroup( SteamId steamIDClan ) internal bool IsClanOfficialGameGroup( SteamId steamIDClan )
@ -962,9 +818,8 @@ internal bool IsClanOfficialGameGroup( SteamId steamIDClan )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages")]
private delegate int FGetNumChatsWithUnreadPriorityMessages( IntPtr self ); private static extern int _GetNumChatsWithUnreadPriorityMessages( IntPtr self );
private FGetNumChatsWithUnreadPriorityMessages _GetNumChatsWithUnreadPriorityMessages;
#endregion #endregion
internal int GetNumChatsWithUnreadPriorityMessages() internal int GetNumChatsWithUnreadPriorityMessages()

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamGameServer : SteamInterface internal class ISteamGameServer : SteamInterface
{ {
public override string InterfaceName => "SteamGameServer012";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,10 +19,9 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_InitGameServer")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _InitGameServer( IntPtr self, uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString );
private FInitGameServer _InitGameServer;
#endregion #endregion
internal bool InitGameServer( uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString ) internal bool InitGameServer( uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString )
@ -34,9 +31,8 @@ internal bool InitGameServer( uint unIP, ushort usGamePort, ushort usQueryPort,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetProduct")]
private delegate void FSetProduct( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct ); private static extern void _SetProduct( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct );
private FSetProduct _SetProduct;
#endregion #endregion
internal void SetProduct( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct ) internal void SetProduct( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct )
@ -45,9 +41,8 @@ internal void SetProduct( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameDescription")]
private delegate void FSetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription ); private static extern void _SetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription );
private FSetGameDescription _SetGameDescription;
#endregion #endregion
internal void SetGameDescription( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription ) internal void SetGameDescription( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription )
@ -56,9 +51,8 @@ internal void SetGameDescription( [MarshalAs( UnmanagedType.CustomMarshaler, Mar
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetModDir")]
private delegate void FSetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir ); private static extern void _SetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir );
private FSetModDir _SetModDir;
#endregion #endregion
internal void SetModDir( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir ) internal void SetModDir( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir )
@ -67,9 +61,8 @@ internal void SetModDir( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeR
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetDedicatedServer")]
private delegate void FSetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated ); private static extern void _SetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated );
private FSetDedicatedServer _SetDedicatedServer;
#endregion #endregion
internal void SetDedicatedServer( [MarshalAs( UnmanagedType.U1 )] bool bDedicated ) internal void SetDedicatedServer( [MarshalAs( UnmanagedType.U1 )] bool bDedicated )
@ -78,9 +71,8 @@ internal void SetDedicatedServer( [MarshalAs( UnmanagedType.U1 )] bool bDedicate
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOn")]
private delegate void FLogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken ); private static extern void _LogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken );
private FLogOn _LogOn;
#endregion #endregion
internal void LogOn( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken ) internal void LogOn( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken )
@ -89,9 +81,8 @@ internal void LogOn( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef =
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOnAnonymous")]
private delegate void FLogOnAnonymous( IntPtr self ); private static extern void _LogOnAnonymous( IntPtr self );
private FLogOnAnonymous _LogOnAnonymous;
#endregion #endregion
internal void LogOnAnonymous() internal void LogOnAnonymous()
@ -100,9 +91,8 @@ internal void LogOnAnonymous()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOff")]
private delegate void FLogOff( IntPtr self ); private static extern void _LogOff( IntPtr self );
private FLogOff _LogOff;
#endregion #endregion
internal void LogOff() internal void LogOff()
@ -111,10 +101,9 @@ internal void LogOff()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BLoggedOn")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBLoggedOn( IntPtr self ); private static extern bool _BLoggedOn( IntPtr self );
private FBLoggedOn _BLoggedOn;
#endregion #endregion
internal bool BLoggedOn() internal bool BLoggedOn()
@ -124,10 +113,9 @@ internal bool BLoggedOn()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BSecure")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBSecure( IntPtr self ); private static extern bool _BSecure( IntPtr self );
private FBSecure _BSecure;
#endregion #endregion
internal bool BSecure() internal bool BSecure()
@ -137,32 +125,20 @@ internal bool BSecure()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetSteamID")]
#if PLATFORM_WIN private static extern SteamId _GetSteamID( IntPtr self );
private delegate void FGetSteamID( IntPtr self, ref SteamId retVal );
#else
private delegate SteamId FGetSteamID( IntPtr self );
#endif
private FGetSteamID _GetSteamID;
#endregion #endregion
internal SteamId GetSteamID() internal SteamId GetSteamID()
{ {
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetSteamID( Self, ref retVal );
return retVal;
#else
var returnValue = _GetSteamID( Self ); var returnValue = _GetSteamID( Self );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_WasRestartRequested")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FWasRestartRequested( IntPtr self ); private static extern bool _WasRestartRequested( IntPtr self );
private FWasRestartRequested _WasRestartRequested;
#endregion #endregion
internal bool WasRestartRequested() internal bool WasRestartRequested()
@ -172,9 +148,8 @@ internal bool WasRestartRequested()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMaxPlayerCount")]
private delegate void FSetMaxPlayerCount( IntPtr self, int cPlayersMax ); private static extern void _SetMaxPlayerCount( IntPtr self, int cPlayersMax );
private FSetMaxPlayerCount _SetMaxPlayerCount;
#endregion #endregion
internal void SetMaxPlayerCount( int cPlayersMax ) internal void SetMaxPlayerCount( int cPlayersMax )
@ -183,9 +158,8 @@ internal void SetMaxPlayerCount( int cPlayersMax )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetBotPlayerCount")]
private delegate void FSetBotPlayerCount( IntPtr self, int cBotplayers ); private static extern void _SetBotPlayerCount( IntPtr self, int cBotplayers );
private FSetBotPlayerCount _SetBotPlayerCount;
#endregion #endregion
internal void SetBotPlayerCount( int cBotplayers ) internal void SetBotPlayerCount( int cBotplayers )
@ -194,9 +168,8 @@ internal void SetBotPlayerCount( int cBotplayers )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetServerName")]
private delegate void FSetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName ); private static extern void _SetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName );
private FSetServerName _SetServerName;
#endregion #endregion
internal void SetServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName ) internal void SetServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName )
@ -205,9 +178,8 @@ internal void SetServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalT
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMapName")]
private delegate void FSetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName ); private static extern void _SetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName );
private FSetMapName _SetMapName;
#endregion #endregion
internal void SetMapName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName ) internal void SetMapName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName )
@ -216,9 +188,8 @@ internal void SetMapName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetPasswordProtected")]
private delegate void FSetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected ); private static extern void _SetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected );
private FSetPasswordProtected _SetPasswordProtected;
#endregion #endregion
internal void SetPasswordProtected( [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected ) internal void SetPasswordProtected( [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected )
@ -227,9 +198,8 @@ internal void SetPasswordProtected( [MarshalAs( UnmanagedType.U1 )] bool bPasswo
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorPort")]
private delegate void FSetSpectatorPort( IntPtr self, ushort unSpectatorPort ); private static extern void _SetSpectatorPort( IntPtr self, ushort unSpectatorPort );
private FSetSpectatorPort _SetSpectatorPort;
#endregion #endregion
internal void SetSpectatorPort( ushort unSpectatorPort ) internal void SetSpectatorPort( ushort unSpectatorPort )
@ -238,9 +208,8 @@ internal void SetSpectatorPort( ushort unSpectatorPort )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorServerName")]
private delegate void FSetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName ); private static extern void _SetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName );
private FSetSpectatorServerName _SetSpectatorServerName;
#endregion #endregion
internal void SetSpectatorServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName ) internal void SetSpectatorServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName )
@ -249,9 +218,8 @@ internal void SetSpectatorServerName( [MarshalAs( UnmanagedType.CustomMarshaler,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ClearAllKeyValues")]
private delegate void FClearAllKeyValues( IntPtr self ); private static extern void _ClearAllKeyValues( IntPtr self );
private FClearAllKeyValues _ClearAllKeyValues;
#endregion #endregion
internal void ClearAllKeyValues() internal void ClearAllKeyValues()
@ -260,9 +228,8 @@ internal void ClearAllKeyValues()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetKeyValue")]
private delegate void FSetKeyValue( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue ); private static extern void _SetKeyValue( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue );
private FSetKeyValue _SetKeyValue;
#endregion #endregion
internal void SetKeyValue( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue ) internal void SetKeyValue( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue )
@ -271,9 +238,8 @@ internal void SetKeyValue( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTyp
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameTags")]
private delegate void FSetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags ); private static extern void _SetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags );
private FSetGameTags _SetGameTags;
#endregion #endregion
internal void SetGameTags( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags ) internal void SetGameTags( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags )
@ -282,9 +248,8 @@ internal void SetGameTags( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTyp
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameData")]
private delegate void FSetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData ); private static extern void _SetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData );
private FSetGameData _SetGameData;
#endregion #endregion
internal void SetGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData ) internal void SetGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData )
@ -293,9 +258,8 @@ internal void SetGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTyp
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetRegion")]
private delegate void FSetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion ); private static extern void _SetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion );
private FSetRegion _SetRegion;
#endregion #endregion
internal void SetRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion ) internal void SetRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion )
@ -304,10 +268,9 @@ internal void SetRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeR
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSendUserConnectAndAuthenticate( IntPtr self, uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser ); private static extern bool _SendUserConnectAndAuthenticate( IntPtr self, uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser );
private FSendUserConnectAndAuthenticate _SendUserConnectAndAuthenticate;
#endregion #endregion
internal bool SendUserConnectAndAuthenticate( uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser ) internal bool SendUserConnectAndAuthenticate( uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser )
@ -317,31 +280,19 @@ internal bool SendUserConnectAndAuthenticate( uint unIPClient, IntPtr pvAuthBlob
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection")]
#if PLATFORM_WIN private static extern SteamId _CreateUnauthenticatedUserConnection( IntPtr self );
private delegate void FCreateUnauthenticatedUserConnection( IntPtr self, ref SteamId retVal );
#else
private delegate SteamId FCreateUnauthenticatedUserConnection( IntPtr self );
#endif
private FCreateUnauthenticatedUserConnection _CreateUnauthenticatedUserConnection;
#endregion #endregion
internal SteamId CreateUnauthenticatedUserConnection() internal SteamId CreateUnauthenticatedUserConnection()
{ {
#if PLATFORM_WIN
var retVal = default( SteamId );
_CreateUnauthenticatedUserConnection( Self, ref retVal );
return retVal;
#else
var returnValue = _CreateUnauthenticatedUserConnection( Self ); var returnValue = _CreateUnauthenticatedUserConnection( Self );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserDisconnect")]
private delegate void FSendUserDisconnect( IntPtr self, SteamId steamIDUser ); private static extern void _SendUserDisconnect( IntPtr self, SteamId steamIDUser );
private FSendUserDisconnect _SendUserDisconnect;
#endregion #endregion
internal void SendUserDisconnect( SteamId steamIDUser ) internal void SendUserDisconnect( SteamId steamIDUser )
@ -350,10 +301,9 @@ internal void SendUserDisconnect( SteamId steamIDUser )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BUpdateUserData")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBUpdateUserData( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore ); private static extern bool _BUpdateUserData( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore );
private FBUpdateUserData _BUpdateUserData;
#endregion #endregion
internal bool BUpdateUserData( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore ) internal bool BUpdateUserData( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore )
@ -363,9 +313,8 @@ internal bool BUpdateUserData( SteamId steamIDUser, [MarshalAs( UnmanagedType.Cu
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetAuthSessionTicket")]
private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ); private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
private FGetAuthSessionTicket _GetAuthSessionTicket;
#endregion #endregion
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ) internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
@ -375,9 +324,8 @@ internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BeginAuthSession")]
private delegate BeginAuthResult FBeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID ); private static extern BeginAuthResult _BeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
private FBeginAuthSession _BeginAuthSession;
#endregion #endregion
internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID ) internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID )
@ -387,9 +335,8 @@ internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_EndAuthSession")]
private delegate void FEndAuthSession( IntPtr self, SteamId steamID ); private static extern void _EndAuthSession( IntPtr self, SteamId steamID );
private FEndAuthSession _EndAuthSession;
#endregion #endregion
internal void EndAuthSession( SteamId steamID ) internal void EndAuthSession( SteamId steamID )
@ -398,9 +345,8 @@ internal void EndAuthSession( SteamId steamID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CancelAuthTicket")]
private delegate void FCancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket ); private static extern void _CancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
private FCancelAuthTicket _CancelAuthTicket;
#endregion #endregion
internal void CancelAuthTicket( HAuthTicket hAuthTicket ) internal void CancelAuthTicket( HAuthTicket hAuthTicket )
@ -409,9 +355,8 @@ internal void CancelAuthTicket( HAuthTicket hAuthTicket )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_UserHasLicenseForApp")]
private delegate UserHasLicenseForAppResult FUserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID ); private static extern UserHasLicenseForAppResult _UserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
private FUserHasLicenseForApp _UserHasLicenseForApp;
#endregion #endregion
internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID ) internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID )
@ -421,10 +366,9 @@ internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_RequestUserGroupStatus")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup ); private static extern bool _RequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup );
private FRequestUserGroupStatus _RequestUserGroupStatus;
#endregion #endregion
internal bool RequestUserGroupStatus( SteamId steamIDUser, SteamId steamIDGroup ) internal bool RequestUserGroupStatus( SteamId steamIDUser, SteamId steamIDGroup )
@ -434,9 +378,8 @@ internal bool RequestUserGroupStatus( SteamId steamIDUser, SteamId steamIDGroup
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetGameplayStats")]
private delegate void FGetGameplayStats( IntPtr self ); private static extern void _GetGameplayStats( IntPtr self );
private FGetGameplayStats _GetGameplayStats;
#endregion #endregion
internal void GetGameplayStats() internal void GetGameplayStats()
@ -445,21 +388,19 @@ internal void GetGameplayStats()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetServerReputation")]
private delegate SteamAPICall_t FGetServerReputation( IntPtr self ); private static extern SteamAPICall_t _GetServerReputation( IntPtr self );
private FGetServerReputation _GetServerReputation;
#endregion #endregion
internal async Task<GSReputation_t?> GetServerReputation() internal CallbackResult GetServerReputation()
{ {
var returnValue = _GetServerReputation( Self ); var returnValue = _GetServerReputation( Self );
return await GSReputation_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetPublicIP")]
private delegate uint FGetPublicIP( IntPtr self ); private static extern uint _GetPublicIP( IntPtr self );
private FGetPublicIP _GetPublicIP;
#endregion #endregion
internal uint GetPublicIP() internal uint GetPublicIP()
@ -469,10 +410,9 @@ internal uint GetPublicIP()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_HandleIncomingPacket")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FHandleIncomingPacket( IntPtr self, IntPtr pData, int cbData, uint srcIP, ushort srcPort ); private static extern bool _HandleIncomingPacket( IntPtr self, IntPtr pData, int cbData, uint srcIP, ushort srcPort );
private FHandleIncomingPacket _HandleIncomingPacket;
#endregion #endregion
internal bool HandleIncomingPacket( IntPtr pData, int cbData, uint srcIP, ushort srcPort ) internal bool HandleIncomingPacket( IntPtr pData, int cbData, uint srcIP, ushort srcPort )
@ -482,9 +422,8 @@ internal bool HandleIncomingPacket( IntPtr pData, int cbData, uint srcIP, ushort
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetNextOutgoingPacket")]
private delegate int FGetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort ); private static extern int _GetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort );
private FGetNextOutgoingPacket _GetNextOutgoingPacket;
#endregion #endregion
internal int GetNextOutgoingPacket( IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort ) internal int GetNextOutgoingPacket( IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort )
@ -494,9 +433,8 @@ internal int GetNextOutgoingPacket( IntPtr pOut, int cbMaxOut, ref uint pNetAdr,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_EnableHeartbeats")]
private delegate void FEnableHeartbeats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive ); private static extern void _EnableHeartbeats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive );
private FEnableHeartbeats _EnableHeartbeats;
#endregion #endregion
internal void EnableHeartbeats( [MarshalAs( UnmanagedType.U1 )] bool bActive ) internal void EnableHeartbeats( [MarshalAs( UnmanagedType.U1 )] bool bActive )
@ -505,9 +443,8 @@ internal void EnableHeartbeats( [MarshalAs( UnmanagedType.U1 )] bool bActive )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetHeartbeatInterval")]
private delegate void FSetHeartbeatInterval( IntPtr self, int iHeartbeatInterval ); private static extern void _SetHeartbeatInterval( IntPtr self, int iHeartbeatInterval );
private FSetHeartbeatInterval _SetHeartbeatInterval;
#endregion #endregion
internal void SetHeartbeatInterval( int iHeartbeatInterval ) internal void SetHeartbeatInterval( int iHeartbeatInterval )
@ -516,9 +453,8 @@ internal void SetHeartbeatInterval( int iHeartbeatInterval )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ForceHeartbeat")]
private delegate void FForceHeartbeat( IntPtr self ); private static extern void _ForceHeartbeat( IntPtr self );
private FForceHeartbeat _ForceHeartbeat;
#endregion #endregion
internal void ForceHeartbeat() internal void ForceHeartbeat()
@ -527,27 +463,25 @@ internal void ForceHeartbeat()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_AssociateWithClan")]
private delegate SteamAPICall_t FAssociateWithClan( IntPtr self, SteamId steamIDClan ); private static extern SteamAPICall_t _AssociateWithClan( IntPtr self, SteamId steamIDClan );
private FAssociateWithClan _AssociateWithClan;
#endregion #endregion
internal async Task<AssociateWithClanResult_t?> AssociateWithClan( SteamId steamIDClan ) internal CallbackResult AssociateWithClan( SteamId steamIDClan )
{ {
var returnValue = _AssociateWithClan( Self, steamIDClan ); var returnValue = _AssociateWithClan( Self, steamIDClan );
return await AssociateWithClanResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility")]
private delegate SteamAPICall_t FComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer ); private static extern SteamAPICall_t _ComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer );
private FComputeNewPlayerCompatibility _ComputeNewPlayerCompatibility;
#endregion #endregion
internal async Task<ComputeNewPlayerCompatibilityResult_t?> ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer ) internal CallbackResult ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer )
{ {
var returnValue = _ComputeNewPlayerCompatibility( Self, steamIDNewPlayer ); var returnValue = _ComputeNewPlayerCompatibility( Self, steamIDNewPlayer );
return await ComputeNewPlayerCompatibilityResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
} }

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamGameServerStats : SteamInterface internal class ISteamGameServerStats : SteamInterface
{ {
public override string InterfaceName => "SteamGameServerStats001";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,48 +19,44 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_RequestUserStats")]
private delegate SteamAPICall_t FRequestUserStats( IntPtr self, SteamId steamIDUser ); private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser );
private FRequestUserStats _RequestUserStats;
#endregion #endregion
internal async Task<GSStatsReceived_t?> RequestUserStats( SteamId steamIDUser ) internal CallbackResult RequestUserStats( SteamId steamIDUser )
{ {
var returnValue = _RequestUserStats( Self, steamIDUser ); var returnValue = _RequestUserStats( Self, steamIDUser );
return await GSStatsReceived_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStat")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ); private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
private FGetUserStat1 _GetUserStat1;
#endregion #endregion
internal bool GetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ) internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
{ {
var returnValue = _GetUserStat1( Self, steamIDUser, pchName, ref pData ); var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStat0")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ); private static extern bool _GetUserStat0( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
private FGetUserStat2 _GetUserStat2;
#endregion #endregion
internal bool GetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ) internal bool GetUserStat0( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
{ {
var returnValue = _GetUserStat2( Self, steamIDUser, pchName, ref pData ); var returnValue = _GetUserStat0( Self, steamIDUser, pchName, ref pData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserAchievement")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
private FGetUserAchievement _GetUserAchievement;
#endregion #endregion
internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ) internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
@ -72,36 +66,33 @@ internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStat")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ); private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
private FSetUserStat1 _SetUserStat1;
#endregion #endregion
internal bool SetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ) internal bool SetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
{ {
var returnValue = _SetUserStat1( Self, steamIDUser, pchName, nData ); var returnValue = _SetUserStat( Self, steamIDUser, pchName, nData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStat0")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ); private static extern bool _SetUserStat0( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
private FSetUserStat2 _SetUserStat2;
#endregion #endregion
internal bool SetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ) internal bool SetUserStat0( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
{ {
var returnValue = _SetUserStat2( Self, steamIDUser, pchName, fData ); var returnValue = _SetUserStat0( Self, steamIDUser, pchName, fData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_UpdateUserAvgRateStat")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _UpdateUserAvgRateStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
private FUpdateUserAvgRateStat _UpdateUserAvgRateStat;
#endregion #endregion
internal bool UpdateUserAvgRateStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength ) internal bool UpdateUserAvgRateStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength )
@ -111,10 +102,9 @@ internal bool UpdateUserAvgRateStat( SteamId steamIDUser, [MarshalAs( UnmanagedT
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserAchievement")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); private static extern bool _SetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
private FSetUserAchievement _SetUserAchievement;
#endregion #endregion
internal bool SetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ) internal bool SetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@ -124,10 +114,9 @@ internal bool SetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_ClearUserAchievement")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); private static extern bool _ClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
private FClearUserAchievement _ClearUserAchievement;
#endregion #endregion
internal bool ClearUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ) internal bool ClearUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@ -137,15 +126,14 @@ internal bool ClearUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedTy
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_StoreUserStats")]
private delegate SteamAPICall_t FStoreUserStats( IntPtr self, SteamId steamIDUser ); private static extern SteamAPICall_t _StoreUserStats( IntPtr self, SteamId steamIDUser );
private FStoreUserStats _StoreUserStats;
#endregion #endregion
internal async Task<GSStatsStored_t?> StoreUserStats( SteamId steamIDUser ) internal CallbackResult StoreUserStats( SteamId steamIDUser )
{ {
var returnValue = _StoreUserStats( Self, steamIDUser ); var returnValue = _StoreUserStats( Self, steamIDUser );
return await GSStatsStored_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
} }

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamInput : SteamInterface internal class ISteamInput : SteamInterface
{ {
public override string InterfaceName => "SteamInput001";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,35 +19,32 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Init")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FDoInit( IntPtr self ); private static extern bool _Init( IntPtr self );
private FDoInit _DoInit;
#endregion #endregion
internal bool DoInit() internal bool Init()
{ {
var returnValue = _DoInit( Self ); var returnValue = _Init( Self );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Shutdown")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FDoShutdown( IntPtr self ); private static extern bool _Shutdown( IntPtr self );
private FDoShutdown _DoShutdown;
#endregion #endregion
internal bool DoShutdown() internal bool Shutdown()
{ {
var returnValue = _DoShutdown( Self ); var returnValue = _Shutdown( Self );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_RunFrame")]
private delegate void FRunFrame( IntPtr self ); private static extern void _RunFrame( IntPtr self );
private FRunFrame _RunFrame;
#endregion #endregion
internal void RunFrame() internal void RunFrame()
@ -58,9 +53,8 @@ internal void RunFrame()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetConnectedControllers")]
private delegate int FGetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut ); private static extern int _GetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut );
private FGetConnectedControllers _GetConnectedControllers;
#endregion #endregion
internal int GetConnectedControllers( [In,Out] InputHandle_t[] handlesOut ) internal int GetConnectedControllers( [In,Out] InputHandle_t[] handlesOut )
@ -70,9 +64,8 @@ internal int GetConnectedControllers( [In,Out] InputHandle_t[] handlesOut )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionSetHandle")]
private delegate InputActionSetHandle_t FGetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName ); private static extern InputActionSetHandle_t _GetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
private FGetActionSetHandle _GetActionSetHandle;
#endregion #endregion
internal InputActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName ) internal InputActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName )
@ -82,9 +75,8 @@ internal InputActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.Cu
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSet")]
private delegate void FActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle ); private static extern void _ActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
private FActivateActionSet _ActivateActionSet;
#endregion #endregion
internal void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle ) internal void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle )
@ -93,9 +85,8 @@ internal void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetCurrentActionSet")]
private delegate InputActionSetHandle_t FGetCurrentActionSet( IntPtr self, InputHandle_t inputHandle ); private static extern InputActionSetHandle_t _GetCurrentActionSet( IntPtr self, InputHandle_t inputHandle );
private FGetCurrentActionSet _GetCurrentActionSet;
#endregion #endregion
internal InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle ) internal InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle )
@ -105,9 +96,8 @@ internal InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSetLayer")]
private delegate void FActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ); private static extern void _ActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
private FActivateActionSetLayer _ActivateActionSetLayer;
#endregion #endregion
internal void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) internal void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
@ -116,9 +106,8 @@ internal void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetH
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateActionSetLayer")]
private delegate void FDeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ); private static extern void _DeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
private FDeactivateActionSetLayer _DeactivateActionSetLayer;
#endregion #endregion
internal void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle ) internal void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
@ -127,9 +116,8 @@ internal void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSe
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateAllActionSetLayers")]
private delegate void FDeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle ); private static extern void _DeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle );
private FDeactivateAllActionSetLayers _DeactivateAllActionSetLayers;
#endregion #endregion
internal void DeactivateAllActionSetLayers( InputHandle_t inputHandle ) internal void DeactivateAllActionSetLayers( InputHandle_t inputHandle )
@ -138,9 +126,8 @@ internal void DeactivateAllActionSetLayers( InputHandle_t inputHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActiveActionSetLayers")]
private delegate int FGetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut ); private static extern int _GetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut );
private FGetActiveActionSetLayers _GetActiveActionSetLayers;
#endregion #endregion
internal int GetActiveActionSetLayers( InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut ) internal int GetActiveActionSetLayers( InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut )
@ -150,9 +137,8 @@ internal int GetActiveActionSetLayers( InputHandle_t inputHandle, [In,Out] Input
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionHandle")]
private delegate InputDigitalActionHandle_t FGetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ); private static extern InputDigitalActionHandle_t _GetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
private FGetDigitalActionHandle _GetDigitalActionHandle;
#endregion #endregion
internal InputDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ) internal InputDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
@ -162,31 +148,19 @@ internal InputDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( Unmanage
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionData")]
#if PLATFORM_WIN private static extern DigitalState _GetDigitalActionData( IntPtr self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
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 #endregion
internal DigitalState GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle ) 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 ); var returnValue = _GetDigitalActionData( Self, inputHandle, digitalActionHandle );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionOrigins")]
private delegate int FGetDigitalActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut ); private static extern int _GetDigitalActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut );
private FGetDigitalActionOrigins _GetDigitalActionOrigins;
#endregion #endregion
internal int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut ) internal int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut )
@ -196,9 +170,8 @@ internal int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetH
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionHandle")]
private delegate InputAnalogActionHandle_t FGetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ); private static extern InputAnalogActionHandle_t _GetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
private FGetAnalogActionHandle _GetAnalogActionHandle;
#endregion #endregion
internal InputAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName ) internal InputAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
@ -208,31 +181,19 @@ internal InputAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedT
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionData")]
#if PLATFORM_WIN private static extern AnalogState _GetAnalogActionData( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
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 #endregion
internal AnalogState GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle ) 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 ); var returnValue = _GetAnalogActionData( Self, inputHandle, analogActionHandle );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionOrigins")]
private delegate int FGetAnalogActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut ); private static extern int _GetAnalogActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut );
private FGetAnalogActionOrigins _GetAnalogActionOrigins;
#endregion #endregion
internal int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut ) internal int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut )
@ -242,9 +203,8 @@ internal int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHa
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForActionOrigin")]
private delegate Utf8StringPointer FGetGlyphForActionOrigin( IntPtr self, InputActionOrigin eOrigin ); private static extern Utf8StringPointer _GetGlyphForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
private FGetGlyphForActionOrigin _GetGlyphForActionOrigin;
#endregion #endregion
internal string GetGlyphForActionOrigin( InputActionOrigin eOrigin ) internal string GetGlyphForActionOrigin( InputActionOrigin eOrigin )
@ -254,9 +214,8 @@ internal string GetGlyphForActionOrigin( InputActionOrigin eOrigin )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForActionOrigin")]
private delegate Utf8StringPointer FGetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin ); private static extern Utf8StringPointer _GetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
private FGetStringForActionOrigin _GetStringForActionOrigin;
#endregion #endregion
internal string GetStringForActionOrigin( InputActionOrigin eOrigin ) internal string GetStringForActionOrigin( InputActionOrigin eOrigin )
@ -266,9 +225,8 @@ internal string GetStringForActionOrigin( InputActionOrigin eOrigin )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_StopAnalogActionMomentum")]
private delegate void FStopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction ); private static extern void _StopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
private FStopAnalogActionMomentum _StopAnalogActionMomentum;
#endregion #endregion
internal void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction ) internal void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction )
@ -277,31 +235,19 @@ internal void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogAc
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetMotionData")]
#if PLATFORM_WIN private static extern MotionState _GetMotionData( IntPtr self, InputHandle_t inputHandle );
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 #endregion
internal MotionState GetMotionData( InputHandle_t inputHandle ) 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 ); var returnValue = _GetMotionData( Self, inputHandle );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerVibration")]
private delegate void FTriggerVibration( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed ); private static extern void _TriggerVibration( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed );
private FTriggerVibration _TriggerVibration;
#endregion #endregion
internal void TriggerVibration( InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed ) internal void TriggerVibration( InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed )
@ -310,9 +256,8 @@ internal void TriggerVibration( InputHandle_t inputHandle, ushort usLeftSpeed, u
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_SetLEDColor")]
private delegate void FSetLEDColor( IntPtr self, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags ); private static extern void _SetLEDColor( IntPtr self, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags );
private FSetLEDColor _SetLEDColor;
#endregion #endregion
internal void SetLEDColor( InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags ) internal void SetLEDColor( InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags )
@ -321,9 +266,8 @@ internal void SetLEDColor( InputHandle_t inputHandle, byte nColorR, byte nColorG
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerHapticPulse")]
private delegate void FTriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec ); private static extern void _TriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
private FTriggerHapticPulse _TriggerHapticPulse;
#endregion #endregion
internal void TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec ) internal void TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec )
@ -332,9 +276,8 @@ internal void TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerRepeatedHapticPulse")]
private delegate void FTriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags ); private static extern void _TriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
private FTriggerRepeatedHapticPulse _TriggerRepeatedHapticPulse;
#endregion #endregion
internal void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags ) internal void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags )
@ -343,10 +286,9 @@ internal void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamContro
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ShowBindingPanel")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FShowBindingPanel( IntPtr self, InputHandle_t inputHandle ); private static extern bool _ShowBindingPanel( IntPtr self, InputHandle_t inputHandle );
private FShowBindingPanel _ShowBindingPanel;
#endregion #endregion
internal bool ShowBindingPanel( InputHandle_t inputHandle ) internal bool ShowBindingPanel( InputHandle_t inputHandle )
@ -356,9 +298,8 @@ internal bool ShowBindingPanel( InputHandle_t inputHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetInputTypeForHandle")]
private delegate InputType FGetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle ); private static extern InputType _GetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle );
private FGetInputTypeForHandle _GetInputTypeForHandle;
#endregion #endregion
internal InputType GetInputTypeForHandle( InputHandle_t inputHandle ) internal InputType GetInputTypeForHandle( InputHandle_t inputHandle )
@ -368,9 +309,8 @@ internal InputType GetInputTypeForHandle( InputHandle_t inputHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetControllerForGamepadIndex")]
private delegate InputHandle_t FGetControllerForGamepadIndex( IntPtr self, int nIndex ); private static extern InputHandle_t _GetControllerForGamepadIndex( IntPtr self, int nIndex );
private FGetControllerForGamepadIndex _GetControllerForGamepadIndex;
#endregion #endregion
internal InputHandle_t GetControllerForGamepadIndex( int nIndex ) internal InputHandle_t GetControllerForGamepadIndex( int nIndex )
@ -380,9 +320,8 @@ internal InputHandle_t GetControllerForGamepadIndex( int nIndex )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGamepadIndexForController")]
private delegate int FGetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle ); private static extern int _GetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle );
private FGetGamepadIndexForController _GetGamepadIndexForController;
#endregion #endregion
internal int GetGamepadIndexForController( InputHandle_t ulinputHandle ) internal int GetGamepadIndexForController( InputHandle_t ulinputHandle )
@ -392,9 +331,8 @@ internal int GetGamepadIndexForController( InputHandle_t ulinputHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForXboxOrigin")]
private delegate Utf8StringPointer FGetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin ); private static extern Utf8StringPointer _GetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
private FGetStringForXboxOrigin _GetStringForXboxOrigin;
#endregion #endregion
internal string GetStringForXboxOrigin( XboxOrigin eOrigin ) internal string GetStringForXboxOrigin( XboxOrigin eOrigin )
@ -404,9 +342,8 @@ internal string GetStringForXboxOrigin( XboxOrigin eOrigin )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForXboxOrigin")]
private delegate Utf8StringPointer FGetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin ); private static extern Utf8StringPointer _GetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
private FGetGlyphForXboxOrigin _GetGlyphForXboxOrigin;
#endregion #endregion
internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin ) internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin )
@ -416,9 +353,8 @@ internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin")]
private delegate InputActionOrigin FGetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin ); private static extern InputActionOrigin _GetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin );
private FGetActionOriginFromXboxOrigin _GetActionOriginFromXboxOrigin;
#endregion #endregion
internal InputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, XboxOrigin eOrigin ) internal InputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, XboxOrigin eOrigin )
@ -428,9 +364,8 @@ internal InputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHan
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TranslateActionOrigin")]
private delegate InputActionOrigin FTranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin ); private static extern InputActionOrigin _TranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin );
private FTranslateActionOrigin _TranslateActionOrigin;
#endregion #endregion
internal InputActionOrigin TranslateActionOrigin( InputType eDestinationInputType, InputActionOrigin eSourceOrigin ) internal InputActionOrigin TranslateActionOrigin( InputType eDestinationInputType, InputActionOrigin eSourceOrigin )

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamInventory : SteamInterface internal class ISteamInventory : SteamInterface
{ {
public override string InterfaceName => "STEAMINVENTORY_INTERFACE_V003";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,9 +19,8 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultStatus")]
private delegate Result FGetResultStatus( IntPtr self, SteamInventoryResult_t resultHandle ); private static extern Result _GetResultStatus( IntPtr self, SteamInventoryResult_t resultHandle );
private FGetResultStatus _GetResultStatus;
#endregion #endregion
internal Result GetResultStatus( SteamInventoryResult_t resultHandle ) internal Result GetResultStatus( SteamInventoryResult_t resultHandle )
@ -33,10 +30,9 @@ internal Result GetResultStatus( SteamInventoryResult_t resultHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultItems")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetResultItems( IntPtr self, SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize ); private static extern bool _GetResultItems( IntPtr self, SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize );
private FGetResultItems _GetResultItems;
#endregion #endregion
internal bool GetResultItems( SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize ) internal bool GetResultItems( SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize )
@ -46,10 +42,9 @@ internal bool GetResultItems( SteamInventoryResult_t resultHandle, [In,Out] Stea
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultItemProperty")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetResultItemProperty( IntPtr self, SteamInventoryResult_t resultHandle, uint unItemIndex, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut );
private FGetResultItemProperty _GetResultItemProperty;
#endregion #endregion
internal bool GetResultItemProperty( SteamInventoryResult_t resultHandle, uint unItemIndex, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut ) internal bool GetResultItemProperty( SteamInventoryResult_t resultHandle, uint unItemIndex, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut )
@ -61,9 +56,8 @@ internal bool GetResultItemProperty( SteamInventoryResult_t resultHandle, uint u
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultTimestamp")]
private delegate uint FGetResultTimestamp( IntPtr self, SteamInventoryResult_t resultHandle ); private static extern uint _GetResultTimestamp( IntPtr self, SteamInventoryResult_t resultHandle );
private FGetResultTimestamp _GetResultTimestamp;
#endregion #endregion
internal uint GetResultTimestamp( SteamInventoryResult_t resultHandle ) internal uint GetResultTimestamp( SteamInventoryResult_t resultHandle )
@ -73,10 +67,9 @@ internal uint GetResultTimestamp( SteamInventoryResult_t resultHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_CheckResultSteamID")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FCheckResultSteamID( IntPtr self, SteamInventoryResult_t resultHandle, SteamId steamIDExpected ); private static extern bool _CheckResultSteamID( IntPtr self, SteamInventoryResult_t resultHandle, SteamId steamIDExpected );
private FCheckResultSteamID _CheckResultSteamID;
#endregion #endregion
internal bool CheckResultSteamID( SteamInventoryResult_t resultHandle, SteamId steamIDExpected ) internal bool CheckResultSteamID( SteamInventoryResult_t resultHandle, SteamId steamIDExpected )
@ -86,9 +79,8 @@ internal bool CheckResultSteamID( SteamInventoryResult_t resultHandle, SteamId s
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_DestroyResult")]
private delegate void FDestroyResult( IntPtr self, SteamInventoryResult_t resultHandle ); private static extern void _DestroyResult( IntPtr self, SteamInventoryResult_t resultHandle );
private FDestroyResult _DestroyResult;
#endregion #endregion
internal void DestroyResult( SteamInventoryResult_t resultHandle ) internal void DestroyResult( SteamInventoryResult_t resultHandle )
@ -97,10 +89,9 @@ internal void DestroyResult( SteamInventoryResult_t resultHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetAllItems")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetAllItems( IntPtr self, ref SteamInventoryResult_t pResultHandle ); private static extern bool _GetAllItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
private FGetAllItems _GetAllItems;
#endregion #endregion
internal bool GetAllItems( ref SteamInventoryResult_t pResultHandle ) internal bool GetAllItems( ref SteamInventoryResult_t pResultHandle )
@ -110,10 +101,9 @@ internal bool GetAllItems( ref SteamInventoryResult_t pResultHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemsByID")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemsByID( IntPtr self, ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs ); private static extern bool _GetItemsByID( IntPtr self, ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs );
private FGetItemsByID _GetItemsByID;
#endregion #endregion
internal bool GetItemsByID( ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs ) internal bool GetItemsByID( ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs )
@ -123,10 +113,9 @@ internal bool GetItemsByID( ref SteamInventoryResult_t pResultHandle, ref Invent
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SerializeResult")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSerializeResult( IntPtr self, SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize ); private static extern bool _SerializeResult( IntPtr self, SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize );
private FSerializeResult _SerializeResult;
#endregion #endregion
internal bool SerializeResult( SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize ) internal bool SerializeResult( SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize )
@ -136,10 +125,9 @@ internal bool SerializeResult( SteamInventoryResult_t resultHandle, IntPtr pOutB
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_DeserializeResult")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _DeserializeResult( IntPtr self, ref SteamInventoryResult_t pOutResultHandle, IntPtr pBuffer, uint unBufferSize, [MarshalAs( UnmanagedType.U1 )] bool bRESERVED_MUST_BE_FALSE );
private FDeserializeResult _DeserializeResult;
#endregion #endregion
internal bool DeserializeResult( ref SteamInventoryResult_t pOutResultHandle, IntPtr pBuffer, uint unBufferSize, [MarshalAs( UnmanagedType.U1 )] bool bRESERVED_MUST_BE_FALSE ) internal bool DeserializeResult( ref SteamInventoryResult_t pOutResultHandle, IntPtr pBuffer, uint unBufferSize, [MarshalAs( UnmanagedType.U1 )] bool bRESERVED_MUST_BE_FALSE )
@ -149,10 +137,9 @@ internal bool DeserializeResult( ref SteamInventoryResult_t pOutResultHandle, In
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GenerateItems")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GenerateItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength );
private FGenerateItems _GenerateItems;
#endregion #endregion
internal bool GenerateItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength ) internal bool GenerateItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength )
@ -162,10 +149,9 @@ internal bool GenerateItems( ref SteamInventoryResult_t pResultHandle, [In,Out]
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GrantPromoItems")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGrantPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle ); private static extern bool _GrantPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
private FGrantPromoItems _GrantPromoItems;
#endregion #endregion
internal bool GrantPromoItems( ref SteamInventoryResult_t pResultHandle ) internal bool GrantPromoItems( ref SteamInventoryResult_t pResultHandle )
@ -175,10 +161,9 @@ internal bool GrantPromoItems( ref SteamInventoryResult_t pResultHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_AddPromoItem")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddPromoItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef ); private static extern bool _AddPromoItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef );
private FAddPromoItem _AddPromoItem;
#endregion #endregion
internal bool AddPromoItem( ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef ) internal bool AddPromoItem( ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef )
@ -188,10 +173,9 @@ internal bool AddPromoItem( ref SteamInventoryResult_t pResultHandle, InventoryD
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_AddPromoItems")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength ); private static extern bool _AddPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength );
private FAddPromoItems _AddPromoItems;
#endregion #endregion
internal bool AddPromoItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength ) internal bool AddPromoItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength )
@ -201,10 +185,9 @@ internal bool AddPromoItems( ref SteamInventoryResult_t pResultHandle, [In,Out]
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_ConsumeItem")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FConsumeItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity ); private static extern bool _ConsumeItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity );
private FConsumeItem _ConsumeItem;
#endregion #endregion
internal bool ConsumeItem( ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity ) internal bool ConsumeItem( ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity )
@ -214,10 +197,9 @@ internal bool ConsumeItem( ref SteamInventoryResult_t pResultHandle, InventoryIt
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_ExchangeItems")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _ExchangeItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayGenerate, [In,Out] uint[] punArrayGenerateQuantity, uint unArrayGenerateLength, [In,Out] InventoryItemId[] pArrayDestroy, [In,Out] uint[] punArrayDestroyQuantity, uint unArrayDestroyLength );
private FExchangeItems _ExchangeItems;
#endregion #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 ) 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 )
@ -227,10 +209,9 @@ internal bool ExchangeItems( ref SteamInventoryResult_t pResultHandle, [In,Out]
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TransferItemQuantity")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FTransferItemQuantity( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest ); private static extern bool _TransferItemQuantity( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest );
private FTransferItemQuantity _TransferItemQuantity;
#endregion #endregion
internal bool TransferItemQuantity( ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest ) internal bool TransferItemQuantity( ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest )
@ -240,9 +221,8 @@ internal bool TransferItemQuantity( ref SteamInventoryResult_t pResultHandle, In
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SendItemDropHeartbeat")]
private delegate void FSendItemDropHeartbeat( IntPtr self ); private static extern void _SendItemDropHeartbeat( IntPtr self );
private FSendItemDropHeartbeat _SendItemDropHeartbeat;
#endregion #endregion
internal void SendItemDropHeartbeat() internal void SendItemDropHeartbeat()
@ -251,10 +231,9 @@ internal void SendItemDropHeartbeat()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TriggerItemDrop")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FTriggerItemDrop( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition ); private static extern bool _TriggerItemDrop( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition );
private FTriggerItemDrop _TriggerItemDrop;
#endregion #endregion
internal bool TriggerItemDrop( ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition ) internal bool TriggerItemDrop( ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition )
@ -264,10 +243,9 @@ internal bool TriggerItemDrop( ref SteamInventoryResult_t pResultHandle, Invento
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TradeItems")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _TradeItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, SteamId steamIDTradePartner, [In,Out] InventoryItemId[] pArrayGive, [In,Out] uint[] pArrayGiveQuantity, uint nArrayGiveLength, [In,Out] InventoryItemId[] pArrayGet, [In,Out] uint[] pArrayGetQuantity, uint nArrayGetLength );
private FTradeItems _TradeItems;
#endregion #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 ) 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 )
@ -277,10 +255,9 @@ internal bool TradeItems( ref SteamInventoryResult_t pResultHandle, SteamId stea
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_LoadItemDefinitions")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FLoadItemDefinitions( IntPtr self ); private static extern bool _LoadItemDefinitions( IntPtr self );
private FLoadItemDefinitions _LoadItemDefinitions;
#endregion #endregion
internal bool LoadItemDefinitions() internal bool LoadItemDefinitions()
@ -290,10 +267,9 @@ internal bool LoadItemDefinitions()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemDefinitionIDs")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemDefinitionIDs( IntPtr self, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize ); private static extern bool _GetItemDefinitionIDs( IntPtr self, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
private FGetItemDefinitionIDs _GetItemDefinitionIDs;
#endregion #endregion
internal bool GetItemDefinitionIDs( [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize ) internal bool GetItemDefinitionIDs( [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize )
@ -303,10 +279,9 @@ internal bool GetItemDefinitionIDs( [In,Out] InventoryDefId[] pItemDefIDs, ref
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemDefinitionProperty")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetItemDefinitionProperty( IntPtr self, InventoryDefId iDefinition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut );
private FGetItemDefinitionProperty _GetItemDefinitionProperty;
#endregion #endregion
internal bool GetItemDefinitionProperty( InventoryDefId iDefinition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut ) internal bool GetItemDefinitionProperty( InventoryDefId iDefinition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut )
@ -318,22 +293,20 @@ internal bool GetItemDefinitionProperty( InventoryDefId iDefinition, [MarshalAs(
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RequestEligiblePromoItemDefinitionsIDs")]
private delegate SteamAPICall_t FRequestEligiblePromoItemDefinitionsIDs( IntPtr self, SteamId steamID ); private static extern SteamAPICall_t _RequestEligiblePromoItemDefinitionsIDs( IntPtr self, SteamId steamID );
private FRequestEligiblePromoItemDefinitionsIDs _RequestEligiblePromoItemDefinitionsIDs;
#endregion #endregion
internal async Task<SteamInventoryEligiblePromoItemDefIDs_t?> RequestEligiblePromoItemDefinitionsIDs( SteamId steamID ) internal CallbackResult RequestEligiblePromoItemDefinitionsIDs( SteamId steamID )
{ {
var returnValue = _RequestEligiblePromoItemDefinitionsIDs( Self, steamID ); var returnValue = _RequestEligiblePromoItemDefinitionsIDs( Self, steamID );
return await SteamInventoryEligiblePromoItemDefIDs_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetEligiblePromoItemDefinitionIDs")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetEligiblePromoItemDefinitionIDs( IntPtr self, SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize ); private static extern bool _GetEligiblePromoItemDefinitionIDs( IntPtr self, SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
private FGetEligiblePromoItemDefinitionIDs _GetEligiblePromoItemDefinitionIDs;
#endregion #endregion
internal bool GetEligiblePromoItemDefinitionIDs( SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize ) internal bool GetEligiblePromoItemDefinitionIDs( SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize )
@ -343,33 +316,30 @@ internal bool GetEligiblePromoItemDefinitionIDs( SteamId steamID, [In,Out] Inven
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_StartPurchase")]
private delegate SteamAPICall_t FStartPurchase( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength ); private static extern SteamAPICall_t _StartPurchase( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength );
private FStartPurchase _StartPurchase;
#endregion #endregion
internal async Task<SteamInventoryStartPurchaseResult_t?> StartPurchase( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength ) internal CallbackResult StartPurchase( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength )
{ {
var returnValue = _StartPurchase( Self, pArrayItemDefs, punArrayQuantity, unArrayLength ); var returnValue = _StartPurchase( Self, pArrayItemDefs, punArrayQuantity, unArrayLength );
return await SteamInventoryStartPurchaseResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RequestPrices")]
private delegate SteamAPICall_t FRequestPrices( IntPtr self ); private static extern SteamAPICall_t _RequestPrices( IntPtr self );
private FRequestPrices _RequestPrices;
#endregion #endregion
internal async Task<SteamInventoryRequestPricesResult_t?> RequestPrices() internal CallbackResult RequestPrices()
{ {
var returnValue = _RequestPrices( Self ); var returnValue = _RequestPrices( Self );
return await SteamInventoryRequestPricesResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetNumItemsWithPrices")]
private delegate uint FGetNumItemsWithPrices( IntPtr self ); private static extern uint _GetNumItemsWithPrices( IntPtr self );
private FGetNumItemsWithPrices _GetNumItemsWithPrices;
#endregion #endregion
internal uint GetNumItemsWithPrices() internal uint GetNumItemsWithPrices()
@ -379,10 +349,9 @@ internal uint GetNumItemsWithPrices()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemsWithPrices")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetItemsWithPrices( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] ulong[] pCurrentPrices, [In,Out] ulong[] pBasePrices, uint unArrayLength );
private FGetItemsWithPrices _GetItemsWithPrices;
#endregion #endregion
internal bool GetItemsWithPrices( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] ulong[] pCurrentPrices, [In,Out] ulong[] pBasePrices, uint unArrayLength ) internal bool GetItemsWithPrices( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] ulong[] pCurrentPrices, [In,Out] ulong[] pBasePrices, uint unArrayLength )
@ -392,10 +361,9 @@ internal bool GetItemsWithPrices( [In,Out] InventoryDefId[] pArrayItemDefs, [In
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemPrice")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemPrice( IntPtr self, InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice ); private static extern bool _GetItemPrice( IntPtr self, InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice );
private FGetItemPrice _GetItemPrice;
#endregion #endregion
internal bool GetItemPrice( InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice ) internal bool GetItemPrice( InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice )
@ -405,9 +373,8 @@ internal bool GetItemPrice( InventoryDefId iDefinition, ref ulong pCurrentPrice,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_StartUpdateProperties")]
private delegate SteamInventoryUpdateHandle_t FStartUpdateProperties( IntPtr self ); private static extern SteamInventoryUpdateHandle_t _StartUpdateProperties( IntPtr self );
private FStartUpdateProperties _StartUpdateProperties;
#endregion #endregion
internal SteamInventoryUpdateHandle_t StartUpdateProperties() internal SteamInventoryUpdateHandle_t StartUpdateProperties()
@ -417,10 +384,9 @@ internal SteamInventoryUpdateHandle_t StartUpdateProperties()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RemoveProperty")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRemoveProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName ); private static extern bool _RemoveProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName );
private FRemoveProperty _RemoveProperty;
#endregion #endregion
internal bool RemoveProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName ) internal bool RemoveProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName )
@ -430,62 +396,57 @@ internal bool RemoveProperty( SteamInventoryUpdateHandle_t handle, InventoryItem
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetProperty")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue );
private FSetProperty1 _SetProperty1;
#endregion #endregion
internal bool SetProperty1( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue ) internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue )
{ {
var returnValue = _SetProperty1( Self, handle, nItemID, pchPropertyName, pchPropertyValue ); var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, pchPropertyValue );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetProperty0")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _SetProperty0( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue );
private FSetProperty2 _SetProperty2;
#endregion #endregion
internal bool SetProperty2( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue ) internal bool SetProperty0( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue )
{ {
var returnValue = _SetProperty2( Self, handle, nItemID, pchPropertyName, bValue ); var returnValue = _SetProperty0( Self, handle, nItemID, pchPropertyName, bValue );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetProperty1")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _SetProperty1( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue );
private FSetProperty3 _SetProperty3;
#endregion #endregion
internal bool SetProperty3( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue ) internal bool SetProperty1( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue )
{ {
var returnValue = _SetProperty3( Self, handle, nItemID, pchPropertyName, nValue ); var returnValue = _SetProperty1( Self, handle, nItemID, pchPropertyName, nValue );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetProperty2")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _SetProperty2( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue );
private FSetProperty4 _SetProperty4;
#endregion #endregion
internal bool SetProperty4( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue ) internal bool SetProperty2( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue )
{ {
var returnValue = _SetProperty4( Self, handle, nItemID, pchPropertyName, flValue ); var returnValue = _SetProperty2( Self, handle, nItemID, pchPropertyName, flValue );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SubmitUpdateProperties")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSubmitUpdateProperties( IntPtr self, SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle ); private static extern bool _SubmitUpdateProperties( IntPtr self, SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle );
private FSubmitUpdateProperties _SubmitUpdateProperties;
#endregion #endregion
internal bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle ) internal bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle )

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamMatchmaking : SteamInterface internal class ISteamMatchmaking : SteamInterface
{ {
public override string InterfaceName => "SteamMatchMaking009";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,9 +19,8 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGameCount")]
private delegate int FGetFavoriteGameCount( IntPtr self ); private static extern int _GetFavoriteGameCount( IntPtr self );
private FGetFavoriteGameCount _GetFavoriteGameCount;
#endregion #endregion
internal int GetFavoriteGameCount() internal int GetFavoriteGameCount()
@ -33,10 +30,9 @@ internal int GetFavoriteGameCount()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGame")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetFavoriteGame( IntPtr self, int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer );
private FGetFavoriteGame _GetFavoriteGame;
#endregion #endregion
internal bool GetFavoriteGame( int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer ) internal bool GetFavoriteGame( int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer )
@ -46,9 +42,8 @@ internal bool GetFavoriteGame( int iGame, ref AppId pnAppID, ref uint pnIP, ref
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddFavoriteGame")]
private delegate int FAddFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer ); private static extern int _AddFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer );
private FAddFavoriteGame _AddFavoriteGame;
#endregion #endregion
internal int AddFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer ) internal int AddFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer )
@ -58,10 +53,9 @@ internal int AddFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort n
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RemoveFavoriteGame")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRemoveFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags ); private static extern bool _RemoveFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags );
private FRemoveFavoriteGame _RemoveFavoriteGame;
#endregion #endregion
internal bool RemoveFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags ) internal bool RemoveFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags )
@ -71,21 +65,19 @@ internal bool RemoveFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, usho
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyList")]
private delegate SteamAPICall_t FRequestLobbyList( IntPtr self ); private static extern SteamAPICall_t _RequestLobbyList( IntPtr self );
private FRequestLobbyList _RequestLobbyList;
#endregion #endregion
internal async Task<LobbyMatchList_t?> RequestLobbyList() internal CallbackResult RequestLobbyList()
{ {
var returnValue = _RequestLobbyList( Self ); var returnValue = _RequestLobbyList( Self );
return await LobbyMatchList_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListStringFilter")]
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 static extern void _AddRequestLobbyListStringFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValueToMatch, LobbyComparison eComparisonType );
private FAddRequestLobbyListStringFilter _AddRequestLobbyListStringFilter;
#endregion #endregion
internal void AddRequestLobbyListStringFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValueToMatch, LobbyComparison eComparisonType ) internal void AddRequestLobbyListStringFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValueToMatch, LobbyComparison eComparisonType )
@ -94,9 +86,8 @@ internal void AddRequestLobbyListStringFilter( [MarshalAs( UnmanagedType.CustomM
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNumericalFilter")]
private delegate void FAddRequestLobbyListNumericalFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType ); private static extern void _AddRequestLobbyListNumericalFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType );
private FAddRequestLobbyListNumericalFilter _AddRequestLobbyListNumericalFilter;
#endregion #endregion
internal void AddRequestLobbyListNumericalFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType ) internal void AddRequestLobbyListNumericalFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType )
@ -105,9 +96,8 @@ internal void AddRequestLobbyListNumericalFilter( [MarshalAs( UnmanagedType.Cust
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNearValueFilter")]
private delegate void FAddRequestLobbyListNearValueFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo ); private static extern void _AddRequestLobbyListNearValueFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo );
private FAddRequestLobbyListNearValueFilter _AddRequestLobbyListNearValueFilter;
#endregion #endregion
internal void AddRequestLobbyListNearValueFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo ) internal void AddRequestLobbyListNearValueFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo )
@ -116,9 +106,8 @@ internal void AddRequestLobbyListNearValueFilter( [MarshalAs( UnmanagedType.Cust
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable")]
private delegate void FAddRequestLobbyListFilterSlotsAvailable( IntPtr self, int nSlotsAvailable ); private static extern void _AddRequestLobbyListFilterSlotsAvailable( IntPtr self, int nSlotsAvailable );
private FAddRequestLobbyListFilterSlotsAvailable _AddRequestLobbyListFilterSlotsAvailable;
#endregion #endregion
internal void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable ) internal void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable )
@ -127,9 +116,8 @@ internal void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListDistanceFilter")]
private delegate void FAddRequestLobbyListDistanceFilter( IntPtr self, LobbyDistanceFilter eLobbyDistanceFilter ); private static extern void _AddRequestLobbyListDistanceFilter( IntPtr self, LobbyDistanceFilter eLobbyDistanceFilter );
private FAddRequestLobbyListDistanceFilter _AddRequestLobbyListDistanceFilter;
#endregion #endregion
internal void AddRequestLobbyListDistanceFilter( LobbyDistanceFilter eLobbyDistanceFilter ) internal void AddRequestLobbyListDistanceFilter( LobbyDistanceFilter eLobbyDistanceFilter )
@ -138,9 +126,8 @@ internal void AddRequestLobbyListDistanceFilter( LobbyDistanceFilter eLobbyDista
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListResultCountFilter")]
private delegate void FAddRequestLobbyListResultCountFilter( IntPtr self, int cMaxResults ); private static extern void _AddRequestLobbyListResultCountFilter( IntPtr self, int cMaxResults );
private FAddRequestLobbyListResultCountFilter _AddRequestLobbyListResultCountFilter;
#endregion #endregion
internal void AddRequestLobbyListResultCountFilter( int cMaxResults ) internal void AddRequestLobbyListResultCountFilter( int cMaxResults )
@ -149,9 +136,8 @@ internal void AddRequestLobbyListResultCountFilter( int cMaxResults )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter")]
private delegate void FAddRequestLobbyListCompatibleMembersFilter( IntPtr self, SteamId steamIDLobby ); private static extern void _AddRequestLobbyListCompatibleMembersFilter( IntPtr self, SteamId steamIDLobby );
private FAddRequestLobbyListCompatibleMembersFilter _AddRequestLobbyListCompatibleMembersFilter;
#endregion #endregion
internal void AddRequestLobbyListCompatibleMembersFilter( SteamId steamIDLobby ) internal void AddRequestLobbyListCompatibleMembersFilter( SteamId steamIDLobby )
@ -160,55 +146,41 @@ internal void AddRequestLobbyListCompatibleMembersFilter( SteamId steamIDLobby )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyByIndex")]
#if PLATFORM_WIN private static extern SteamId _GetLobbyByIndex( IntPtr self, int iLobby );
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 #endregion
internal SteamId GetLobbyByIndex( int iLobby ) 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 ); var returnValue = _GetLobbyByIndex( Self, iLobby );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_CreateLobby")]
private delegate SteamAPICall_t FCreateLobby( IntPtr self, LobbyType eLobbyType, int cMaxMembers ); private static extern SteamAPICall_t _CreateLobby( IntPtr self, LobbyType eLobbyType, int cMaxMembers );
private FCreateLobby _CreateLobby;
#endregion #endregion
internal async Task<LobbyCreated_t?> CreateLobby( LobbyType eLobbyType, int cMaxMembers ) internal CallbackResult CreateLobby( LobbyType eLobbyType, int cMaxMembers )
{ {
var returnValue = _CreateLobby( Self, eLobbyType, cMaxMembers ); var returnValue = _CreateLobby( Self, eLobbyType, cMaxMembers );
return await LobbyCreated_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_JoinLobby")]
private delegate SteamAPICall_t FJoinLobby( IntPtr self, SteamId steamIDLobby ); private static extern SteamAPICall_t _JoinLobby( IntPtr self, SteamId steamIDLobby );
private FJoinLobby _JoinLobby;
#endregion #endregion
internal async Task<LobbyEnter_t?> JoinLobby( SteamId steamIDLobby ) internal CallbackResult JoinLobby( SteamId steamIDLobby )
{ {
var returnValue = _JoinLobby( Self, steamIDLobby ); var returnValue = _JoinLobby( Self, steamIDLobby );
return await LobbyEnter_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_LeaveLobby")]
private delegate void FLeaveLobby( IntPtr self, SteamId steamIDLobby ); private static extern void _LeaveLobby( IntPtr self, SteamId steamIDLobby );
private FLeaveLobby _LeaveLobby;
#endregion #endregion
internal void LeaveLobby( SteamId steamIDLobby ) internal void LeaveLobby( SteamId steamIDLobby )
@ -217,10 +189,9 @@ internal void LeaveLobby( SteamId steamIDLobby )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_InviteUserToLobby")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FInviteUserToLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDInvitee ); private static extern bool _InviteUserToLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDInvitee );
private FInviteUserToLobby _InviteUserToLobby;
#endregion #endregion
internal bool InviteUserToLobby( SteamId steamIDLobby, SteamId steamIDInvitee ) internal bool InviteUserToLobby( SteamId steamIDLobby, SteamId steamIDInvitee )
@ -230,9 +201,8 @@ internal bool InviteUserToLobby( SteamId steamIDLobby, SteamId steamIDInvitee )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetNumLobbyMembers")]
private delegate int FGetNumLobbyMembers( IntPtr self, SteamId steamIDLobby ); private static extern int _GetNumLobbyMembers( IntPtr self, SteamId steamIDLobby );
private FGetNumLobbyMembers _GetNumLobbyMembers;
#endregion #endregion
internal int GetNumLobbyMembers( SteamId steamIDLobby ) internal int GetNumLobbyMembers( SteamId steamIDLobby )
@ -242,31 +212,19 @@ internal int GetNumLobbyMembers( SteamId steamIDLobby )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberByIndex")]
#if PLATFORM_WIN private static extern SteamId _GetLobbyMemberByIndex( IntPtr self, SteamId steamIDLobby, int iMember );
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 #endregion
internal SteamId GetLobbyMemberByIndex( SteamId steamIDLobby, int iMember ) 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 ); var returnValue = _GetLobbyMemberByIndex( Self, steamIDLobby, iMember );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyData")]
private delegate Utf8StringPointer FGetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); private static extern Utf8StringPointer _GetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
private FGetLobbyData _GetLobbyData;
#endregion #endregion
internal string GetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) internal string GetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
@ -276,10 +234,9 @@ internal string GetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.Cu
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyData")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _SetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
private FSetLobbyData _SetLobbyData;
#endregion #endregion
internal bool SetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) internal bool SetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
@ -289,9 +246,8 @@ internal bool SetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.Cust
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyDataCount")]
private delegate int FGetLobbyDataCount( IntPtr self, SteamId steamIDLobby ); private static extern int _GetLobbyDataCount( IntPtr self, SteamId steamIDLobby );
private FGetLobbyDataCount _GetLobbyDataCount;
#endregion #endregion
internal int GetLobbyDataCount( SteamId steamIDLobby ) internal int GetLobbyDataCount( SteamId steamIDLobby )
@ -301,10 +257,9 @@ internal int GetLobbyDataCount( SteamId steamIDLobby )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyDataByIndex")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetLobbyDataByIndex( IntPtr self, SteamId steamIDLobby, int iLobbyData, IntPtr pchKey, int cchKeyBufferSize, IntPtr pchValue, int cchValueBufferSize ); private static extern bool _GetLobbyDataByIndex( IntPtr self, SteamId steamIDLobby, int iLobbyData, IntPtr pchKey, int cchKeyBufferSize, IntPtr pchValue, int cchValueBufferSize );
private FGetLobbyDataByIndex _GetLobbyDataByIndex;
#endregion #endregion
internal bool GetLobbyDataByIndex( SteamId steamIDLobby, int iLobbyData, out string pchKey, out string pchValue ) internal bool GetLobbyDataByIndex( SteamId steamIDLobby, int iLobbyData, out string pchKey, out string pchValue )
@ -318,10 +273,9 @@ internal bool GetLobbyDataByIndex( SteamId steamIDLobby, int iLobbyData, out str
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_DeleteLobbyData")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FDeleteLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); private static extern bool _DeleteLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
private FDeleteLobbyData _DeleteLobbyData;
#endregion #endregion
internal bool DeleteLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) internal bool DeleteLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
@ -331,9 +285,8 @@ internal bool DeleteLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.C
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberData")]
private delegate Utf8StringPointer FGetLobbyMemberData( IntPtr self, SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); private static extern Utf8StringPointer _GetLobbyMemberData( IntPtr self, SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
private FGetLobbyMemberData _GetLobbyMemberData;
#endregion #endregion
internal string GetLobbyMemberData( SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) internal string GetLobbyMemberData( SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
@ -343,9 +296,8 @@ internal string GetLobbyMemberData( SteamId steamIDLobby, SteamId steamIDUser, [
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberData")]
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 static extern void _SetLobbyMemberData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
private FSetLobbyMemberData _SetLobbyMemberData;
#endregion #endregion
internal void SetLobbyMemberData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) internal void SetLobbyMemberData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
@ -354,10 +306,9 @@ internal void SetLobbyMemberData( SteamId steamIDLobby, [MarshalAs( UnmanagedTyp
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SendLobbyChatMsg")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSendLobbyChatMsg( IntPtr self, SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody ); private static extern bool _SendLobbyChatMsg( IntPtr self, SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody );
private FSendLobbyChatMsg _SendLobbyChatMsg;
#endregion #endregion
internal bool SendLobbyChatMsg( SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody ) internal bool SendLobbyChatMsg( SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody )
@ -367,9 +318,8 @@ internal bool SendLobbyChatMsg( SteamId steamIDLobby, IntPtr pvMsgBody, int cubM
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyChatEntry")]
private delegate int FGetLobbyChatEntry( IntPtr self, SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType ); private static extern int _GetLobbyChatEntry( IntPtr self, SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType );
private FGetLobbyChatEntry _GetLobbyChatEntry;
#endregion #endregion
internal int GetLobbyChatEntry( SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType ) internal int GetLobbyChatEntry( SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType )
@ -379,10 +329,9 @@ internal int GetLobbyChatEntry( SteamId steamIDLobby, int iChatID, ref SteamId p
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyData")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRequestLobbyData( IntPtr self, SteamId steamIDLobby ); private static extern bool _RequestLobbyData( IntPtr self, SteamId steamIDLobby );
private FRequestLobbyData _RequestLobbyData;
#endregion #endregion
internal bool RequestLobbyData( SteamId steamIDLobby ) internal bool RequestLobbyData( SteamId steamIDLobby )
@ -392,9 +341,8 @@ internal bool RequestLobbyData( SteamId steamIDLobby )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyGameServer")]
private delegate void FSetLobbyGameServer( IntPtr self, SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer ); private static extern void _SetLobbyGameServer( IntPtr self, SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer );
private FSetLobbyGameServer _SetLobbyGameServer;
#endregion #endregion
internal void SetLobbyGameServer( SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer ) internal void SetLobbyGameServer( SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer )
@ -403,10 +351,9 @@ internal void SetLobbyGameServer( SteamId steamIDLobby, uint unGameServerIP, ush
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyGameServer")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetLobbyGameServer( IntPtr self, SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer ); private static extern bool _GetLobbyGameServer( IntPtr self, SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer );
private FGetLobbyGameServer _GetLobbyGameServer;
#endregion #endregion
internal bool GetLobbyGameServer( SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer ) internal bool GetLobbyGameServer( SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer )
@ -416,10 +363,9 @@ internal bool GetLobbyGameServer( SteamId steamIDLobby, ref uint punGameServerIP
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberLimit")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby, int cMaxMembers ); private static extern bool _SetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby, int cMaxMembers );
private FSetLobbyMemberLimit _SetLobbyMemberLimit;
#endregion #endregion
internal bool SetLobbyMemberLimit( SteamId steamIDLobby, int cMaxMembers ) internal bool SetLobbyMemberLimit( SteamId steamIDLobby, int cMaxMembers )
@ -429,9 +375,8 @@ internal bool SetLobbyMemberLimit( SteamId steamIDLobby, int cMaxMembers )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberLimit")]
private delegate int FGetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby ); private static extern int _GetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby );
private FGetLobbyMemberLimit _GetLobbyMemberLimit;
#endregion #endregion
internal int GetLobbyMemberLimit( SteamId steamIDLobby ) internal int GetLobbyMemberLimit( SteamId steamIDLobby )
@ -441,10 +386,9 @@ internal int GetLobbyMemberLimit( SteamId steamIDLobby )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyType")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetLobbyType( IntPtr self, SteamId steamIDLobby, LobbyType eLobbyType ); private static extern bool _SetLobbyType( IntPtr self, SteamId steamIDLobby, LobbyType eLobbyType );
private FSetLobbyType _SetLobbyType;
#endregion #endregion
internal bool SetLobbyType( SteamId steamIDLobby, LobbyType eLobbyType ) internal bool SetLobbyType( SteamId steamIDLobby, LobbyType eLobbyType )
@ -454,10 +398,9 @@ internal bool SetLobbyType( SteamId steamIDLobby, LobbyType eLobbyType )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyJoinable")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetLobbyJoinable( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable ); private static extern bool _SetLobbyJoinable( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable );
private FSetLobbyJoinable _SetLobbyJoinable;
#endregion #endregion
internal bool SetLobbyJoinable( SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable ) internal bool SetLobbyJoinable( SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable )
@ -467,32 +410,20 @@ internal bool SetLobbyJoinable( SteamId steamIDLobby, [MarshalAs( UnmanagedType.
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyOwner")]
#if PLATFORM_WIN private static extern SteamId _GetLobbyOwner( IntPtr self, SteamId steamIDLobby );
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 #endregion
internal SteamId GetLobbyOwner( SteamId steamIDLobby ) 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 ); var returnValue = _GetLobbyOwner( Self, steamIDLobby );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyOwner")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetLobbyOwner( IntPtr self, SteamId steamIDLobby, SteamId steamIDNewOwner ); private static extern bool _SetLobbyOwner( IntPtr self, SteamId steamIDLobby, SteamId steamIDNewOwner );
private FSetLobbyOwner _SetLobbyOwner;
#endregion #endregion
internal bool SetLobbyOwner( SteamId steamIDLobby, SteamId steamIDNewOwner ) internal bool SetLobbyOwner( SteamId steamIDLobby, SteamId steamIDNewOwner )
@ -502,10 +433,9 @@ internal bool SetLobbyOwner( SteamId steamIDLobby, SteamId steamIDNewOwner )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLinkedLobby")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetLinkedLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDLobbyDependent ); private static extern bool _SetLinkedLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDLobbyDependent );
private FSetLinkedLobby _SetLinkedLobby;
#endregion #endregion
internal bool SetLinkedLobby( SteamId steamIDLobby, SteamId steamIDLobbyDependent ) internal bool SetLinkedLobby( SteamId steamIDLobby, SteamId steamIDLobbyDependent )

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamMatchmakingServers : SteamInterface internal class ISteamMatchmakingServers : SteamInterface
{ {
public override string InterfaceName => "SteamMatchMakingServers002";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,9 +19,8 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestInternetServerList")]
private delegate HServerListRequest FRequestInternetServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ); private static extern HServerListRequest _RequestInternetServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
private FRequestInternetServerList _RequestInternetServerList;
#endregion #endregion
internal HServerListRequest RequestInternetServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ) internal HServerListRequest RequestInternetServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
@ -33,9 +30,8 @@ internal HServerListRequest RequestInternetServerList( AppId iApp, [In,Out] ref
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestLANServerList")]
private delegate HServerListRequest FRequestLANServerList( IntPtr self, AppId iApp, IntPtr pRequestServersResponse ); private static extern HServerListRequest _RequestLANServerList( IntPtr self, AppId iApp, IntPtr pRequestServersResponse );
private FRequestLANServerList _RequestLANServerList;
#endregion #endregion
internal HServerListRequest RequestLANServerList( AppId iApp, IntPtr pRequestServersResponse ) internal HServerListRequest RequestLANServerList( AppId iApp, IntPtr pRequestServersResponse )
@ -45,9 +41,8 @@ internal HServerListRequest RequestLANServerList( AppId iApp, IntPtr pRequestSer
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestFriendsServerList")]
private delegate HServerListRequest FRequestFriendsServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ); private static extern HServerListRequest _RequestFriendsServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
private FRequestFriendsServerList _RequestFriendsServerList;
#endregion #endregion
internal HServerListRequest RequestFriendsServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ) internal HServerListRequest RequestFriendsServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
@ -57,9 +52,8 @@ internal HServerListRequest RequestFriendsServerList( AppId iApp, [In,Out] ref M
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestFavoritesServerList")]
private delegate HServerListRequest FRequestFavoritesServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ); private static extern HServerListRequest _RequestFavoritesServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
private FRequestFavoritesServerList _RequestFavoritesServerList;
#endregion #endregion
internal HServerListRequest RequestFavoritesServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ) internal HServerListRequest RequestFavoritesServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
@ -69,9 +63,8 @@ internal HServerListRequest RequestFavoritesServerList( AppId iApp, [In,Out] ref
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestHistoryServerList")]
private delegate HServerListRequest FRequestHistoryServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ); private static extern HServerListRequest _RequestHistoryServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
private FRequestHistoryServerList _RequestHistoryServerList;
#endregion #endregion
internal HServerListRequest RequestHistoryServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ) internal HServerListRequest RequestHistoryServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
@ -81,9 +74,8 @@ internal HServerListRequest RequestHistoryServerList( AppId iApp, [In,Out] ref M
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestSpectatorServerList")]
private delegate HServerListRequest FRequestSpectatorServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ); private static extern HServerListRequest _RequestSpectatorServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
private FRequestSpectatorServerList _RequestSpectatorServerList;
#endregion #endregion
internal HServerListRequest RequestSpectatorServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse ) internal HServerListRequest RequestSpectatorServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
@ -93,9 +85,8 @@ internal HServerListRequest RequestSpectatorServerList( AppId iApp, [In,Out] ref
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_ReleaseRequest")]
private delegate void FReleaseRequest( IntPtr self, HServerListRequest hServerListRequest ); private static extern void _ReleaseRequest( IntPtr self, HServerListRequest hServerListRequest );
private FReleaseRequest _ReleaseRequest;
#endregion #endregion
internal void ReleaseRequest( HServerListRequest hServerListRequest ) internal void ReleaseRequest( HServerListRequest hServerListRequest )
@ -104,9 +95,8 @@ internal void ReleaseRequest( HServerListRequest hServerListRequest )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_GetServerDetails")]
private delegate IntPtr FGetServerDetails( IntPtr self, HServerListRequest hRequest, int iServer ); private static extern IntPtr _GetServerDetails( IntPtr self, HServerListRequest hRequest, int iServer );
private FGetServerDetails _GetServerDetails;
#endregion #endregion
internal gameserveritem_t GetServerDetails( HServerListRequest hRequest, int iServer ) internal gameserveritem_t GetServerDetails( HServerListRequest hRequest, int iServer )
@ -116,9 +106,8 @@ internal gameserveritem_t GetServerDetails( HServerListRequest hRequest, int iSe
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelQuery")]
private delegate void FCancelQuery( IntPtr self, HServerListRequest hRequest ); private static extern void _CancelQuery( IntPtr self, HServerListRequest hRequest );
private FCancelQuery _CancelQuery;
#endregion #endregion
internal void CancelQuery( HServerListRequest hRequest ) internal void CancelQuery( HServerListRequest hRequest )
@ -127,9 +116,8 @@ internal void CancelQuery( HServerListRequest hRequest )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RefreshQuery")]
private delegate void FRefreshQuery( IntPtr self, HServerListRequest hRequest ); private static extern void _RefreshQuery( IntPtr self, HServerListRequest hRequest );
private FRefreshQuery _RefreshQuery;
#endregion #endregion
internal void RefreshQuery( HServerListRequest hRequest ) internal void RefreshQuery( HServerListRequest hRequest )
@ -138,10 +126,9 @@ internal void RefreshQuery( HServerListRequest hRequest )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_IsRefreshing")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsRefreshing( IntPtr self, HServerListRequest hRequest ); private static extern bool _IsRefreshing( IntPtr self, HServerListRequest hRequest );
private FIsRefreshing _IsRefreshing;
#endregion #endregion
internal bool IsRefreshing( HServerListRequest hRequest ) internal bool IsRefreshing( HServerListRequest hRequest )
@ -151,9 +138,8 @@ internal bool IsRefreshing( HServerListRequest hRequest )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_GetServerCount")]
private delegate int FGetServerCount( IntPtr self, HServerListRequest hRequest ); private static extern int _GetServerCount( IntPtr self, HServerListRequest hRequest );
private FGetServerCount _GetServerCount;
#endregion #endregion
internal int GetServerCount( HServerListRequest hRequest ) internal int GetServerCount( HServerListRequest hRequest )
@ -163,9 +149,8 @@ internal int GetServerCount( HServerListRequest hRequest )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RefreshServer")]
private delegate void FRefreshServer( IntPtr self, HServerListRequest hRequest, int iServer ); private static extern void _RefreshServer( IntPtr self, HServerListRequest hRequest, int iServer );
private FRefreshServer _RefreshServer;
#endregion #endregion
internal void RefreshServer( HServerListRequest hRequest, int iServer ) internal void RefreshServer( HServerListRequest hRequest, int iServer )
@ -174,9 +159,8 @@ internal void RefreshServer( HServerListRequest hRequest, int iServer )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_PingServer")]
private delegate HServerQuery FPingServer( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse ); private static extern HServerQuery _PingServer( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
private FPingServer _PingServer;
#endregion #endregion
internal HServerQuery PingServer( uint unIP, ushort usPort, IntPtr pRequestServersResponse ) internal HServerQuery PingServer( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
@ -186,9 +170,8 @@ internal HServerQuery PingServer( uint unIP, ushort usPort, IntPtr pRequestServe
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_PlayerDetails")]
private delegate HServerQuery FPlayerDetails( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse ); private static extern HServerQuery _PlayerDetails( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
private FPlayerDetails _PlayerDetails;
#endregion #endregion
internal HServerQuery PlayerDetails( uint unIP, ushort usPort, IntPtr pRequestServersResponse ) internal HServerQuery PlayerDetails( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
@ -198,9 +181,8 @@ internal HServerQuery PlayerDetails( uint unIP, ushort usPort, IntPtr pRequestSe
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_ServerRules")]
private delegate HServerQuery FServerRules( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse ); private static extern HServerQuery _ServerRules( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
private FServerRules _ServerRules;
#endregion #endregion
internal HServerQuery ServerRules( uint unIP, ushort usPort, IntPtr pRequestServersResponse ) internal HServerQuery ServerRules( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
@ -210,9 +192,8 @@ internal HServerQuery ServerRules( uint unIP, ushort usPort, IntPtr pRequestServ
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelServerQuery")]
private delegate void FCancelServerQuery( IntPtr self, HServerQuery hServerQuery ); private static extern void _CancelServerQuery( IntPtr self, HServerQuery hServerQuery );
private FCancelServerQuery _CancelServerQuery;
#endregion #endregion
internal void CancelServerQuery( HServerQuery hServerQuery ) internal void CancelServerQuery( HServerQuery hServerQuery )

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamMusic : SteamInterface internal class ISteamMusic : SteamInterface
{ {
public override string InterfaceName => "STEAMMUSIC_INTERFACE_VERSION001";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,10 +19,9 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_BIsEnabled")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsEnabled( IntPtr self ); private static extern bool _BIsEnabled( IntPtr self );
private FBIsEnabled _BIsEnabled;
#endregion #endregion
internal bool BIsEnabled() internal bool BIsEnabled()
@ -34,10 +31,9 @@ internal bool BIsEnabled()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_BIsPlaying")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsPlaying( IntPtr self ); private static extern bool _BIsPlaying( IntPtr self );
private FBIsPlaying _BIsPlaying;
#endregion #endregion
internal bool BIsPlaying() internal bool BIsPlaying()
@ -47,9 +43,8 @@ internal bool BIsPlaying()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_GetPlaybackStatus")]
private delegate MusicStatus FGetPlaybackStatus( IntPtr self ); private static extern MusicStatus _GetPlaybackStatus( IntPtr self );
private FGetPlaybackStatus _GetPlaybackStatus;
#endregion #endregion
internal MusicStatus GetPlaybackStatus() internal MusicStatus GetPlaybackStatus()
@ -59,9 +54,8 @@ internal MusicStatus GetPlaybackStatus()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_Play")]
private delegate void FPlay( IntPtr self ); private static extern void _Play( IntPtr self );
private FPlay _Play;
#endregion #endregion
internal void Play() internal void Play()
@ -70,9 +64,8 @@ internal void Play()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_Pause")]
private delegate void FPause( IntPtr self ); private static extern void _Pause( IntPtr self );
private FPause _Pause;
#endregion #endregion
internal void Pause() internal void Pause()
@ -81,9 +74,8 @@ internal void Pause()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_PlayPrevious")]
private delegate void FPlayPrevious( IntPtr self ); private static extern void _PlayPrevious( IntPtr self );
private FPlayPrevious _PlayPrevious;
#endregion #endregion
internal void PlayPrevious() internal void PlayPrevious()
@ -92,9 +84,8 @@ internal void PlayPrevious()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_PlayNext")]
private delegate void FPlayNext( IntPtr self ); private static extern void _PlayNext( IntPtr self );
private FPlayNext _PlayNext;
#endregion #endregion
internal void PlayNext() internal void PlayNext()
@ -103,9 +94,8 @@ internal void PlayNext()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_SetVolume")]
private delegate void FSetVolume( IntPtr self, float flVolume ); private static extern void _SetVolume( IntPtr self, float flVolume );
private FSetVolume _SetVolume;
#endregion #endregion
internal void SetVolume( float flVolume ) internal void SetVolume( float flVolume )
@ -114,9 +104,8 @@ internal void SetVolume( float flVolume )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_GetVolume")]
private delegate float FGetVolume( IntPtr self ); private static extern float _GetVolume( IntPtr self );
private FGetVolume _GetVolume;
#endregion #endregion
internal float GetVolume() internal float GetVolume()

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamNetworking : SteamInterface internal class ISteamNetworking : SteamInterface
{ {
public override string InterfaceName => "SteamNetworking005";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,10 +19,9 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_SendP2PPacket")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSendP2PPacket( IntPtr self, SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel ); private static extern bool _SendP2PPacket( IntPtr self, SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel );
private FSendP2PPacket _SendP2PPacket;
#endregion #endregion
internal bool SendP2PPacket( SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel ) internal bool SendP2PPacket( SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel )
@ -34,10 +31,9 @@ internal bool SendP2PPacket( SteamId steamIDRemote, IntPtr pubData, uint cubData
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_IsP2PPacketAvailable")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsP2PPacketAvailable( IntPtr self, ref uint pcubMsgSize, int nChannel ); private static extern bool _IsP2PPacketAvailable( IntPtr self, ref uint pcubMsgSize, int nChannel );
private FIsP2PPacketAvailable _IsP2PPacketAvailable;
#endregion #endregion
internal bool IsP2PPacketAvailable( ref uint pcubMsgSize, int nChannel ) internal bool IsP2PPacketAvailable( ref uint pcubMsgSize, int nChannel )
@ -47,10 +43,9 @@ internal bool IsP2PPacketAvailable( ref uint pcubMsgSize, int nChannel )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_ReadP2PPacket")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FReadP2PPacket( IntPtr self, IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref SteamId psteamIDRemote, int nChannel ); private static extern bool _ReadP2PPacket( IntPtr self, IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref SteamId psteamIDRemote, int nChannel );
private FReadP2PPacket _ReadP2PPacket;
#endregion #endregion
internal bool ReadP2PPacket( IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref SteamId psteamIDRemote, int nChannel ) internal bool ReadP2PPacket( IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref SteamId psteamIDRemote, int nChannel )
@ -60,10 +55,9 @@ internal bool ReadP2PPacket( IntPtr pubDest, uint cubDest, ref uint pcubMsgSize,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_AcceptP2PSessionWithUser")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAcceptP2PSessionWithUser( IntPtr self, SteamId steamIDRemote ); private static extern bool _AcceptP2PSessionWithUser( IntPtr self, SteamId steamIDRemote );
private FAcceptP2PSessionWithUser _AcceptP2PSessionWithUser;
#endregion #endregion
internal bool AcceptP2PSessionWithUser( SteamId steamIDRemote ) internal bool AcceptP2PSessionWithUser( SteamId steamIDRemote )
@ -73,10 +67,9 @@ internal bool AcceptP2PSessionWithUser( SteamId steamIDRemote )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CloseP2PSessionWithUser")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FCloseP2PSessionWithUser( IntPtr self, SteamId steamIDRemote ); private static extern bool _CloseP2PSessionWithUser( IntPtr self, SteamId steamIDRemote );
private FCloseP2PSessionWithUser _CloseP2PSessionWithUser;
#endregion #endregion
internal bool CloseP2PSessionWithUser( SteamId steamIDRemote ) internal bool CloseP2PSessionWithUser( SteamId steamIDRemote )
@ -86,10 +79,9 @@ internal bool CloseP2PSessionWithUser( SteamId steamIDRemote )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CloseP2PChannelWithUser")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FCloseP2PChannelWithUser( IntPtr self, SteamId steamIDRemote, int nChannel ); private static extern bool _CloseP2PChannelWithUser( IntPtr self, SteamId steamIDRemote, int nChannel );
private FCloseP2PChannelWithUser _CloseP2PChannelWithUser;
#endregion #endregion
internal bool CloseP2PChannelWithUser( SteamId steamIDRemote, int nChannel ) internal bool CloseP2PChannelWithUser( SteamId steamIDRemote, int nChannel )
@ -99,10 +91,9 @@ internal bool CloseP2PChannelWithUser( SteamId steamIDRemote, int nChannel )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetP2PSessionState")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetP2PSessionState( IntPtr self, SteamId steamIDRemote, ref P2PSessionState_t pConnectionState ); private static extern bool _GetP2PSessionState( IntPtr self, SteamId steamIDRemote, ref P2PSessionState_t pConnectionState );
private FGetP2PSessionState _GetP2PSessionState;
#endregion #endregion
internal bool GetP2PSessionState( SteamId steamIDRemote, ref P2PSessionState_t pConnectionState ) internal bool GetP2PSessionState( SteamId steamIDRemote, ref P2PSessionState_t pConnectionState )
@ -112,10 +103,9 @@ internal bool GetP2PSessionState( SteamId steamIDRemote, ref P2PSessionState_t p
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_AllowP2PPacketRelay")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAllowP2PPacketRelay( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllow ); private static extern bool _AllowP2PPacketRelay( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllow );
private FAllowP2PPacketRelay _AllowP2PPacketRelay;
#endregion #endregion
internal bool AllowP2PPacketRelay( [MarshalAs( UnmanagedType.U1 )] bool bAllow ) internal bool AllowP2PPacketRelay( [MarshalAs( UnmanagedType.U1 )] bool bAllow )
@ -125,9 +115,8 @@ internal bool AllowP2PPacketRelay( [MarshalAs( UnmanagedType.U1 )] bool bAllow )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CreateListenSocket")]
private delegate SNetListenSocket_t FCreateListenSocket( IntPtr self, int nVirtualP2PPort, uint nIP, ushort nPort, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay ); private static extern SNetListenSocket_t _CreateListenSocket( IntPtr self, int nVirtualP2PPort, uint nIP, ushort nPort, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay );
private FCreateListenSocket _CreateListenSocket;
#endregion #endregion
internal SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint nIP, ushort nPort, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay ) internal SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint nIP, ushort nPort, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay )
@ -137,9 +126,8 @@ internal SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint nIP, u
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CreateP2PConnectionSocket")]
private delegate SNetSocket_t FCreateP2PConnectionSocket( IntPtr self, SteamId steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay ); private static extern SNetSocket_t _CreateP2PConnectionSocket( IntPtr self, SteamId steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay );
private FCreateP2PConnectionSocket _CreateP2PConnectionSocket;
#endregion #endregion
internal SNetSocket_t CreateP2PConnectionSocket( SteamId steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay ) internal SNetSocket_t CreateP2PConnectionSocket( SteamId steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay )
@ -149,9 +137,8 @@ internal SNetSocket_t CreateP2PConnectionSocket( SteamId steamIDTarget, int nVir
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CreateConnectionSocket")]
private delegate SNetSocket_t FCreateConnectionSocket( IntPtr self, uint nIP, ushort nPort, int nTimeoutSec ); private static extern SNetSocket_t _CreateConnectionSocket( IntPtr self, uint nIP, ushort nPort, int nTimeoutSec );
private FCreateConnectionSocket _CreateConnectionSocket;
#endregion #endregion
internal SNetSocket_t CreateConnectionSocket( uint nIP, ushort nPort, int nTimeoutSec ) internal SNetSocket_t CreateConnectionSocket( uint nIP, ushort nPort, int nTimeoutSec )
@ -161,10 +148,9 @@ internal SNetSocket_t CreateConnectionSocket( uint nIP, ushort nPort, int nTimeo
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_DestroySocket")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FDestroySocket( IntPtr self, SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd ); private static extern bool _DestroySocket( IntPtr self, SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd );
private FDestroySocket _DestroySocket;
#endregion #endregion
internal bool DestroySocket( SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd ) internal bool DestroySocket( SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd )
@ -174,10 +160,9 @@ internal bool DestroySocket( SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_DestroyListenSocket")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FDestroyListenSocket( IntPtr self, SNetListenSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd ); private static extern bool _DestroyListenSocket( IntPtr self, SNetListenSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd );
private FDestroyListenSocket _DestroyListenSocket;
#endregion #endregion
internal bool DestroyListenSocket( SNetListenSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd ) internal bool DestroyListenSocket( SNetListenSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd )
@ -187,10 +172,9 @@ internal bool DestroyListenSocket( SNetListenSocket_t hSocket, [MarshalAs( Unman
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_SendDataOnSocket")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _SendDataOnSocket( IntPtr self, SNetSocket_t hSocket, [In,Out] IntPtr[] pubData, uint cubData, [MarshalAs( UnmanagedType.U1 )] bool bReliable );
private FSendDataOnSocket _SendDataOnSocket;
#endregion #endregion
internal bool SendDataOnSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] pubData, uint cubData, [MarshalAs( UnmanagedType.U1 )] bool bReliable ) internal bool SendDataOnSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] pubData, uint cubData, [MarshalAs( UnmanagedType.U1 )] bool bReliable )
@ -200,10 +184,9 @@ internal bool SendDataOnSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] pubData
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_IsDataAvailableOnSocket")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsDataAvailableOnSocket( IntPtr self, SNetSocket_t hSocket, ref uint pcubMsgSize ); private static extern bool _IsDataAvailableOnSocket( IntPtr self, SNetSocket_t hSocket, ref uint pcubMsgSize );
private FIsDataAvailableOnSocket _IsDataAvailableOnSocket;
#endregion #endregion
internal bool IsDataAvailableOnSocket( SNetSocket_t hSocket, ref uint pcubMsgSize ) internal bool IsDataAvailableOnSocket( SNetSocket_t hSocket, ref uint pcubMsgSize )
@ -213,10 +196,9 @@ internal bool IsDataAvailableOnSocket( SNetSocket_t hSocket, ref uint pcubMsgSiz
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_RetrieveDataFromSocket")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRetrieveDataFromSocket( IntPtr self, SNetSocket_t hSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize ); private static extern bool _RetrieveDataFromSocket( IntPtr self, SNetSocket_t hSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize );
private FRetrieveDataFromSocket _RetrieveDataFromSocket;
#endregion #endregion
internal bool RetrieveDataFromSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize ) internal bool RetrieveDataFromSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize )
@ -226,10 +208,9 @@ internal bool RetrieveDataFromSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] p
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_IsDataAvailable")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsDataAvailable( IntPtr self, SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket ); private static extern bool _IsDataAvailable( IntPtr self, SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket );
private FIsDataAvailable _IsDataAvailable;
#endregion #endregion
internal bool IsDataAvailable( SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket ) internal bool IsDataAvailable( SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket )
@ -239,10 +220,9 @@ internal bool IsDataAvailable( SNetListenSocket_t hListenSocket, ref uint pcubMs
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_RetrieveData")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _RetrieveData( IntPtr self, SNetListenSocket_t hListenSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize, ref SNetSocket_t phSocket );
private FRetrieveData _RetrieveData;
#endregion #endregion
internal bool RetrieveData( SNetListenSocket_t hListenSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize, ref SNetSocket_t phSocket ) internal bool RetrieveData( SNetListenSocket_t hListenSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize, ref SNetSocket_t phSocket )
@ -252,10 +232,9 @@ internal bool RetrieveData( SNetListenSocket_t hListenSocket, [In,Out] IntPtr[]
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetSocketInfo")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetSocketInfo( IntPtr self, SNetSocket_t hSocket, ref SteamId pSteamIDRemote, ref int peSocketStatus, ref uint punIPRemote, ref ushort punPortRemote );
private FGetSocketInfo _GetSocketInfo;
#endregion #endregion
internal bool GetSocketInfo( SNetSocket_t hSocket, ref SteamId pSteamIDRemote, ref int peSocketStatus, ref uint punIPRemote, ref ushort punPortRemote ) internal bool GetSocketInfo( SNetSocket_t hSocket, ref SteamId pSteamIDRemote, ref int peSocketStatus, ref uint punIPRemote, ref ushort punPortRemote )
@ -265,10 +244,9 @@ internal bool GetSocketInfo( SNetSocket_t hSocket, ref SteamId pSteamIDRemote, r
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetListenSocketInfo")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetListenSocketInfo( IntPtr self, SNetListenSocket_t hListenSocket, ref uint pnIP, ref ushort pnPort ); private static extern bool _GetListenSocketInfo( IntPtr self, SNetListenSocket_t hListenSocket, ref uint pnIP, ref ushort pnPort );
private FGetListenSocketInfo _GetListenSocketInfo;
#endregion #endregion
internal bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, ref uint pnIP, ref ushort pnPort ) internal bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, ref uint pnIP, ref ushort pnPort )
@ -278,9 +256,8 @@ internal bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, ref uint pn
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetSocketConnectionType")]
private delegate SNetSocketConnectionType FGetSocketConnectionType( IntPtr self, SNetSocket_t hSocket ); private static extern SNetSocketConnectionType _GetSocketConnectionType( IntPtr self, SNetSocket_t hSocket );
private FGetSocketConnectionType _GetSocketConnectionType;
#endregion #endregion
internal SNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket ) internal SNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket )
@ -290,9 +267,8 @@ internal SNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetMaxPacketSize")]
private delegate int FGetMaxPacketSize( IntPtr self, SNetSocket_t hSocket ); private static extern int _GetMaxPacketSize( IntPtr self, SNetSocket_t hSocket );
private FGetMaxPacketSize _GetMaxPacketSize;
#endregion #endregion
internal int GetMaxPacketSize( SNetSocket_t hSocket ) internal int GetMaxPacketSize( SNetSocket_t hSocket )

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamNetworkingSockets : SteamInterface internal class ISteamNetworkingSockets : SteamInterface
{ {
public override string InterfaceName => "SteamNetworkingSockets002";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -20,366 +18,5 @@ internal override void Shutdown()
} }
#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 );
}
} }
} }

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamNetworkingUtils : SteamInterface internal class ISteamNetworkingUtils : SteamInterface
{ {
public override string InterfaceName => "SteamNetworkingUtils001";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -20,214 +18,5 @@ internal override void Shutdown()
} }
#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;
}
} }
} }

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamParentalSettings : SteamInterface internal class ISteamParentalSettings : SteamInterface
{ {
public override string InterfaceName => "STEAMPARENTALSETTINGS_INTERFACE_VERSION001";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,10 +19,9 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsParentalLockEnabled")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsParentalLockEnabled( IntPtr self ); private static extern bool _BIsParentalLockEnabled( IntPtr self );
private FBIsParentalLockEnabled _BIsParentalLockEnabled;
#endregion #endregion
internal bool BIsParentalLockEnabled() internal bool BIsParentalLockEnabled()
@ -34,10 +31,9 @@ internal bool BIsParentalLockEnabled()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsParentalLockLocked")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsParentalLockLocked( IntPtr self ); private static extern bool _BIsParentalLockLocked( IntPtr self );
private FBIsParentalLockLocked _BIsParentalLockLocked;
#endregion #endregion
internal bool BIsParentalLockLocked() internal bool BIsParentalLockLocked()
@ -47,10 +43,9 @@ internal bool BIsParentalLockLocked()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsAppBlocked")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsAppBlocked( IntPtr self, AppId nAppID ); private static extern bool _BIsAppBlocked( IntPtr self, AppId nAppID );
private FBIsAppBlocked _BIsAppBlocked;
#endregion #endregion
internal bool BIsAppBlocked( AppId nAppID ) internal bool BIsAppBlocked( AppId nAppID )
@ -60,10 +55,9 @@ internal bool BIsAppBlocked( AppId nAppID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsAppInBlockList")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsAppInBlockList( IntPtr self, AppId nAppID ); private static extern bool _BIsAppInBlockList( IntPtr self, AppId nAppID );
private FBIsAppInBlockList _BIsAppInBlockList;
#endregion #endregion
internal bool BIsAppInBlockList( AppId nAppID ) internal bool BIsAppInBlockList( AppId nAppID )
@ -73,10 +67,9 @@ internal bool BIsAppInBlockList( AppId nAppID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsFeatureBlocked")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsFeatureBlocked( IntPtr self, ParentalFeature eFeature ); private static extern bool _BIsFeatureBlocked( IntPtr self, ParentalFeature eFeature );
private FBIsFeatureBlocked _BIsFeatureBlocked;
#endregion #endregion
internal bool BIsFeatureBlocked( ParentalFeature eFeature ) internal bool BIsFeatureBlocked( ParentalFeature eFeature )
@ -86,10 +79,9 @@ internal bool BIsFeatureBlocked( ParentalFeature eFeature )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsFeatureInBlockList( IntPtr self, ParentalFeature eFeature ); private static extern bool _BIsFeatureInBlockList( IntPtr self, ParentalFeature eFeature );
private FBIsFeatureInBlockList _BIsFeatureInBlockList;
#endregion #endregion
internal bool BIsFeatureInBlockList( ParentalFeature eFeature ) internal bool BIsFeatureInBlockList( ParentalFeature eFeature )

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamParties : SteamInterface internal class ISteamParties : SteamInterface
{ {
public override string InterfaceName => "SteamParties002";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,9 +19,8 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetNumActiveBeacons")]
private delegate uint FGetNumActiveBeacons( IntPtr self ); private static extern uint _GetNumActiveBeacons( IntPtr self );
private FGetNumActiveBeacons _GetNumActiveBeacons;
#endregion #endregion
internal uint GetNumActiveBeacons() internal uint GetNumActiveBeacons()
@ -33,9 +30,8 @@ internal uint GetNumActiveBeacons()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconByIndex")]
private delegate PartyBeaconID_t FGetBeaconByIndex( IntPtr self, uint unIndex ); private static extern PartyBeaconID_t _GetBeaconByIndex( IntPtr self, uint unIndex );
private FGetBeaconByIndex _GetBeaconByIndex;
#endregion #endregion
internal PartyBeaconID_t GetBeaconByIndex( uint unIndex ) internal PartyBeaconID_t GetBeaconByIndex( uint unIndex )
@ -45,10 +41,9 @@ internal PartyBeaconID_t GetBeaconByIndex( uint unIndex )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconDetails")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetBeaconDetails( IntPtr self, PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, IntPtr pchMetadata, int cchMetadata );
private FGetBeaconDetails _GetBeaconDetails;
#endregion #endregion
internal bool GetBeaconDetails( PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, out string pchMetadata ) internal bool GetBeaconDetails( PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, out string pchMetadata )
@ -60,22 +55,20 @@ internal bool GetBeaconDetails( PartyBeaconID_t ulBeaconID, ref SteamId pSteamID
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_JoinParty")]
private delegate SteamAPICall_t FJoinParty( IntPtr self, PartyBeaconID_t ulBeaconID ); private static extern SteamAPICall_t _JoinParty( IntPtr self, PartyBeaconID_t ulBeaconID );
private FJoinParty _JoinParty;
#endregion #endregion
internal async Task<JoinPartyCallback_t?> JoinParty( PartyBeaconID_t ulBeaconID ) internal CallbackResult JoinParty( PartyBeaconID_t ulBeaconID )
{ {
var returnValue = _JoinParty( Self, ulBeaconID ); var returnValue = _JoinParty( Self, ulBeaconID );
return await JoinPartyCallback_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetNumAvailableBeaconLocations")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetNumAvailableBeaconLocations( IntPtr self, ref uint puNumLocations ); private static extern bool _GetNumAvailableBeaconLocations( IntPtr self, ref uint puNumLocations );
private FGetNumAvailableBeaconLocations _GetNumAvailableBeaconLocations;
#endregion #endregion
internal bool GetNumAvailableBeaconLocations( ref uint puNumLocations ) internal bool GetNumAvailableBeaconLocations( ref uint puNumLocations )
@ -85,10 +78,9 @@ internal bool GetNumAvailableBeaconLocations( ref uint puNumLocations )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetAvailableBeaconLocations")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetAvailableBeaconLocations( IntPtr self, ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations ); private static extern bool _GetAvailableBeaconLocations( IntPtr self, ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations );
private FGetAvailableBeaconLocations _GetAvailableBeaconLocations;
#endregion #endregion
internal bool GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations ) internal bool GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations )
@ -98,21 +90,19 @@ internal bool GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t pLocat
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_CreateBeacon")]
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 static extern SteamAPICall_t _CreateBeacon( IntPtr self, uint unOpenSlots, ref SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetadata );
private FCreateBeacon _CreateBeacon;
#endregion #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 ) internal CallbackResult 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 ); var returnValue = _CreateBeacon( Self, unOpenSlots, ref pBeaconLocation, pchConnectString, pchMetadata );
return await CreateBeaconCallback_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_OnReservationCompleted")]
private delegate void FOnReservationCompleted( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser ); private static extern void _OnReservationCompleted( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser );
private FOnReservationCompleted _OnReservationCompleted;
#endregion #endregion
internal void OnReservationCompleted( PartyBeaconID_t ulBeacon, SteamId steamIDUser ) internal void OnReservationCompleted( PartyBeaconID_t ulBeacon, SteamId steamIDUser )
@ -121,9 +111,8 @@ internal void OnReservationCompleted( PartyBeaconID_t ulBeacon, SteamId steamIDU
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_CancelReservation")]
private delegate void FCancelReservation( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser ); private static extern void _CancelReservation( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser );
private FCancelReservation _CancelReservation;
#endregion #endregion
internal void CancelReservation( PartyBeaconID_t ulBeacon, SteamId steamIDUser ) internal void CancelReservation( PartyBeaconID_t ulBeacon, SteamId steamIDUser )
@ -132,22 +121,20 @@ internal void CancelReservation( PartyBeaconID_t ulBeacon, SteamId steamIDUser )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_ChangeNumOpenSlots")]
private delegate SteamAPICall_t FChangeNumOpenSlots( IntPtr self, PartyBeaconID_t ulBeacon, uint unOpenSlots ); private static extern SteamAPICall_t _ChangeNumOpenSlots( IntPtr self, PartyBeaconID_t ulBeacon, uint unOpenSlots );
private FChangeNumOpenSlots _ChangeNumOpenSlots;
#endregion #endregion
internal async Task<ChangeNumOpenSlotsCallback_t?> ChangeNumOpenSlots( PartyBeaconID_t ulBeacon, uint unOpenSlots ) internal CallbackResult ChangeNumOpenSlots( PartyBeaconID_t ulBeacon, uint unOpenSlots )
{ {
var returnValue = _ChangeNumOpenSlots( Self, ulBeacon, unOpenSlots ); var returnValue = _ChangeNumOpenSlots( Self, ulBeacon, unOpenSlots );
return await ChangeNumOpenSlotsCallback_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_DestroyBeacon")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FDestroyBeacon( IntPtr self, PartyBeaconID_t ulBeacon ); private static extern bool _DestroyBeacon( IntPtr self, PartyBeaconID_t ulBeacon );
private FDestroyBeacon _DestroyBeacon;
#endregion #endregion
internal bool DestroyBeacon( PartyBeaconID_t ulBeacon ) internal bool DestroyBeacon( PartyBeaconID_t ulBeacon )
@ -157,10 +144,9 @@ internal bool DestroyBeacon( PartyBeaconID_t ulBeacon )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconLocationData")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetBeaconLocationData( IntPtr self, SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, IntPtr pchDataStringOut, int cchDataStringOut ); private static extern bool _GetBeaconLocationData( IntPtr self, SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, IntPtr pchDataStringOut, int cchDataStringOut );
private FGetBeaconLocationData _GetBeaconLocationData;
#endregion #endregion
internal bool GetBeaconLocationData( SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, out string pchDataStringOut ) internal bool GetBeaconLocationData( SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, out string pchDataStringOut )

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamRemoteStorage : SteamInterface internal class ISteamRemoteStorage : SteamInterface
{ {
public override string InterfaceName => "STEAMREMOTESTORAGE_INTERFACE_VERSION014";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,10 +19,9 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWrite")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FFileWrite( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData ); private static extern bool _FileWrite( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData );
private FFileWrite _FileWrite;
#endregion #endregion
internal bool FileWrite( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData ) internal bool FileWrite( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData )
@ -34,9 +31,8 @@ internal bool FileWrite( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeR
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileRead")]
private delegate int FFileRead( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead ); private static extern int _FileRead( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead );
private FFileRead _FileRead;
#endregion #endregion
internal int FileRead( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead ) internal int FileRead( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead )
@ -46,34 +42,31 @@ internal int FileRead( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteAsync")]
private delegate SteamAPICall_t FFileWriteAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData ); private static extern SteamAPICall_t _FileWriteAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData );
private FFileWriteAsync _FileWriteAsync;
#endregion #endregion
internal async Task<RemoteStorageFileWriteAsyncComplete_t?> FileWriteAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData ) internal CallbackResult FileWriteAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData )
{ {
var returnValue = _FileWriteAsync( Self, pchFile, pvData, cubData ); var returnValue = _FileWriteAsync( Self, pchFile, pvData, cubData );
return await RemoteStorageFileWriteAsyncComplete_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsync")]
private delegate SteamAPICall_t FFileReadAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead ); private static extern SteamAPICall_t _FileReadAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead );
private FFileReadAsync _FileReadAsync;
#endregion #endregion
internal async Task<RemoteStorageFileReadAsyncComplete_t?> FileReadAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead ) internal CallbackResult FileReadAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead )
{ {
var returnValue = _FileReadAsync( Self, pchFile, nOffset, cubToRead ); var returnValue = _FileReadAsync( Self, pchFile, nOffset, cubToRead );
return await RemoteStorageFileReadAsyncComplete_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsyncComplete")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FFileReadAsyncComplete( IntPtr self, SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead ); private static extern bool _FileReadAsyncComplete( IntPtr self, SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead );
private FFileReadAsyncComplete _FileReadAsyncComplete;
#endregion #endregion
internal bool FileReadAsyncComplete( SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead ) internal bool FileReadAsyncComplete( SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead )
@ -83,10 +76,9 @@ internal bool FileReadAsyncComplete( SteamAPICall_t hReadCall, IntPtr pvBuffer,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileForget")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FFileForget( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); private static extern bool _FileForget( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
private FFileForget _FileForget;
#endregion #endregion
internal bool FileForget( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) internal bool FileForget( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
@ -96,10 +88,9 @@ internal bool FileForget( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileDelete")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FFileDelete( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); private static extern bool _FileDelete( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
private FFileDelete _FileDelete;
#endregion #endregion
internal bool FileDelete( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) internal bool FileDelete( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
@ -109,22 +100,20 @@ internal bool FileDelete( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileShare")]
private delegate SteamAPICall_t FFileShare( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); private static extern SteamAPICall_t _FileShare( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
private FFileShare _FileShare;
#endregion #endregion
internal async Task<RemoteStorageFileShareResult_t?> FileShare( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) internal CallbackResult FileShare( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
{ {
var returnValue = _FileShare( Self, pchFile ); var returnValue = _FileShare( Self, pchFile );
return await RemoteStorageFileShareResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetSyncPlatforms")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform ); private static extern bool _SetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform );
private FSetSyncPlatforms _SetSyncPlatforms;
#endregion #endregion
internal bool SetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform ) internal bool SetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform )
@ -134,9 +123,8 @@ internal bool SetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, Marsh
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamOpen")]
private delegate UGCFileWriteStreamHandle_t FFileWriteStreamOpen( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); private static extern UGCFileWriteStreamHandle_t _FileWriteStreamOpen( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
private FFileWriteStreamOpen _FileWriteStreamOpen;
#endregion #endregion
internal UGCFileWriteStreamHandle_t FileWriteStreamOpen( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) internal UGCFileWriteStreamHandle_t FileWriteStreamOpen( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
@ -146,10 +134,9 @@ internal UGCFileWriteStreamHandle_t FileWriteStreamOpen( [MarshalAs( UnmanagedTy
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamWriteChunk")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FFileWriteStreamWriteChunk( IntPtr self, UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData ); private static extern bool _FileWriteStreamWriteChunk( IntPtr self, UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData );
private FFileWriteStreamWriteChunk _FileWriteStreamWriteChunk;
#endregion #endregion
internal bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData ) internal bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData )
@ -159,10 +146,9 @@ internal bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamClose")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FFileWriteStreamClose( IntPtr self, UGCFileWriteStreamHandle_t writeHandle ); private static extern bool _FileWriteStreamClose( IntPtr self, UGCFileWriteStreamHandle_t writeHandle );
private FFileWriteStreamClose _FileWriteStreamClose;
#endregion #endregion
internal bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle ) internal bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle )
@ -172,10 +158,9 @@ internal bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamCancel")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FFileWriteStreamCancel( IntPtr self, UGCFileWriteStreamHandle_t writeHandle ); private static extern bool _FileWriteStreamCancel( IntPtr self, UGCFileWriteStreamHandle_t writeHandle );
private FFileWriteStreamCancel _FileWriteStreamCancel;
#endregion #endregion
internal bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle ) internal bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle )
@ -185,10 +170,9 @@ internal bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileExists")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FFileExists( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); private static extern bool _FileExists( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
private FFileExists _FileExists;
#endregion #endregion
internal bool FileExists( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) internal bool FileExists( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
@ -198,10 +182,9 @@ internal bool FileExists( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FilePersisted")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FFilePersisted( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); private static extern bool _FilePersisted( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
private FFilePersisted _FilePersisted;
#endregion #endregion
internal bool FilePersisted( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) internal bool FilePersisted( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
@ -211,9 +194,8 @@ internal bool FilePersisted( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalT
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileSize")]
private delegate int FGetFileSize( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); private static extern int _GetFileSize( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
private FGetFileSize _GetFileSize;
#endregion #endregion
internal int GetFileSize( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) internal int GetFileSize( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
@ -223,9 +205,8 @@ internal int GetFileSize( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileTimestamp")]
private delegate long FGetFileTimestamp( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); private static extern long _GetFileTimestamp( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
private FGetFileTimestamp _GetFileTimestamp;
#endregion #endregion
internal long GetFileTimestamp( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) internal long GetFileTimestamp( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
@ -235,9 +216,8 @@ internal long GetFileTimestamp( [MarshalAs( UnmanagedType.CustomMarshaler, Marsh
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetSyncPlatforms")]
private delegate RemoteStoragePlatform FGetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ); private static extern RemoteStoragePlatform _GetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
private FGetSyncPlatforms _GetSyncPlatforms;
#endregion #endregion
internal RemoteStoragePlatform GetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile ) internal RemoteStoragePlatform GetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
@ -247,9 +227,8 @@ internal RemoteStoragePlatform GetSyncPlatforms( [MarshalAs( UnmanagedType.Custo
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileCount")]
private delegate int FGetFileCount( IntPtr self ); private static extern int _GetFileCount( IntPtr self );
private FGetFileCount _GetFileCount;
#endregion #endregion
internal int GetFileCount() internal int GetFileCount()
@ -259,9 +238,8 @@ internal int GetFileCount()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileNameAndSize")]
private delegate Utf8StringPointer FGetFileNameAndSize( IntPtr self, int iFile, ref int pnFileSizeInBytes ); private static extern Utf8StringPointer _GetFileNameAndSize( IntPtr self, int iFile, ref int pnFileSizeInBytes );
private FGetFileNameAndSize _GetFileNameAndSize;
#endregion #endregion
internal string GetFileNameAndSize( int iFile, ref int pnFileSizeInBytes ) internal string GetFileNameAndSize( int iFile, ref int pnFileSizeInBytes )
@ -271,10 +249,9 @@ internal string GetFileNameAndSize( int iFile, ref int pnFileSizeInBytes )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetQuota")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQuota( IntPtr self, ref ulong pnTotalBytes, ref ulong puAvailableBytes ); private static extern bool _GetQuota( IntPtr self, ref ulong pnTotalBytes, ref ulong puAvailableBytes );
private FGetQuota _GetQuota;
#endregion #endregion
internal bool GetQuota( ref ulong pnTotalBytes, ref ulong puAvailableBytes ) internal bool GetQuota( ref ulong pnTotalBytes, ref ulong puAvailableBytes )
@ -284,10 +261,9 @@ internal bool GetQuota( ref ulong pnTotalBytes, ref ulong puAvailableBytes )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForAccount")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsCloudEnabledForAccount( IntPtr self ); private static extern bool _IsCloudEnabledForAccount( IntPtr self );
private FIsCloudEnabledForAccount _IsCloudEnabledForAccount;
#endregion #endregion
internal bool IsCloudEnabledForAccount() internal bool IsCloudEnabledForAccount()
@ -297,10 +273,9 @@ internal bool IsCloudEnabledForAccount()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForApp")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsCloudEnabledForApp( IntPtr self ); private static extern bool _IsCloudEnabledForApp( IntPtr self );
private FIsCloudEnabledForApp _IsCloudEnabledForApp;
#endregion #endregion
internal bool IsCloudEnabledForApp() internal bool IsCloudEnabledForApp()
@ -310,9 +285,8 @@ internal bool IsCloudEnabledForApp()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetCloudEnabledForApp")]
private delegate void FSetCloudEnabledForApp( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled ); private static extern void _SetCloudEnabledForApp( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled );
private FSetCloudEnabledForApp _SetCloudEnabledForApp;
#endregion #endregion
internal void SetCloudEnabledForApp( [MarshalAs( UnmanagedType.U1 )] bool bEnabled ) internal void SetCloudEnabledForApp( [MarshalAs( UnmanagedType.U1 )] bool bEnabled )
@ -321,22 +295,20 @@ internal void SetCloudEnabledForApp( [MarshalAs( UnmanagedType.U1 )] bool bEnabl
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownload")]
private delegate SteamAPICall_t FUGCDownload( IntPtr self, UGCHandle_t hContent, uint unPriority ); private static extern SteamAPICall_t _UGCDownload( IntPtr self, UGCHandle_t hContent, uint unPriority );
private FUGCDownload _UGCDownload;
#endregion #endregion
internal async Task<RemoteStorageDownloadUGCResult_t?> UGCDownload( UGCHandle_t hContent, uint unPriority ) internal CallbackResult UGCDownload( UGCHandle_t hContent, uint unPriority )
{ {
var returnValue = _UGCDownload( Self, hContent, unPriority ); var returnValue = _UGCDownload( Self, hContent, unPriority );
return await RemoteStorageDownloadUGCResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDownloadProgress")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUGCDownloadProgress( IntPtr self, UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected ); private static extern bool _GetUGCDownloadProgress( IntPtr self, UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected );
private FGetUGCDownloadProgress _GetUGCDownloadProgress;
#endregion #endregion
internal bool GetUGCDownloadProgress( UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected ) internal bool GetUGCDownloadProgress( UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected )
@ -346,10 +318,9 @@ internal bool GetUGCDownloadProgress( UGCHandle_t hContent, ref int pnBytesDownl
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDetails")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetUGCDetails( IntPtr self, UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner );
private FGetUGCDetails _GetUGCDetails;
#endregion #endregion
internal bool GetUGCDetails( UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner ) internal bool GetUGCDetails( UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner )
@ -359,9 +330,8 @@ internal bool GetUGCDetails( UGCHandle_t hContent, ref AppId pnAppID, [In,Out] r
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCRead")]
private delegate int FUGCRead( IntPtr self, UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction ); private static extern int _UGCRead( IntPtr self, UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction );
private FUGCRead _UGCRead;
#endregion #endregion
internal int UGCRead( UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction ) internal int UGCRead( UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction )
@ -371,9 +341,8 @@ internal int UGCRead( UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, ui
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCCount")]
private delegate int FGetCachedUGCCount( IntPtr self ); private static extern int _GetCachedUGCCount( IntPtr self );
private FGetCachedUGCCount _GetCachedUGCCount;
#endregion #endregion
internal int GetCachedUGCCount() internal int GetCachedUGCCount()
@ -383,15 +352,25 @@ internal int GetCachedUGCCount()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCHandle")]
private delegate SteamAPICall_t FUGCDownloadToLocation( IntPtr self, UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority ); private static extern UGCHandle_t _GetCachedUGCHandle( IntPtr self, int iCachedContent );
private FUGCDownloadToLocation _UGCDownloadToLocation;
#endregion #endregion
internal async Task<RemoteStorageDownloadUGCResult_t?> UGCDownloadToLocation( UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority ) internal UGCHandle_t GetCachedUGCHandle( int iCachedContent )
{
var returnValue = _GetCachedUGCHandle( Self, iCachedContent );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation")]
private static extern SteamAPICall_t _UGCDownloadToLocation( IntPtr self, UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority );
#endregion
internal CallbackResult UGCDownloadToLocation( UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority )
{ {
var returnValue = _UGCDownloadToLocation( Self, hContent, pchLocation, unPriority ); var returnValue = _UGCDownloadToLocation( Self, hContent, pchLocation, unPriority );
return await RemoteStorageDownloadUGCResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
} }

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamScreenshots : SteamInterface internal class ISteamScreenshots : SteamInterface
{ {
public override string InterfaceName => "STEAMSCREENSHOTS_INTERFACE_VERSION003";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,9 +19,8 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_WriteScreenshot")]
private delegate ScreenshotHandle FWriteScreenshot( IntPtr self, IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight ); private static extern ScreenshotHandle _WriteScreenshot( IntPtr self, IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight );
private FWriteScreenshot _WriteScreenshot;
#endregion #endregion
internal ScreenshotHandle WriteScreenshot( IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight ) internal ScreenshotHandle WriteScreenshot( IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight )
@ -33,9 +30,8 @@ internal ScreenshotHandle WriteScreenshot( IntPtr pubRGB, uint cubRGB, int nWidt
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_AddScreenshotToLibrary")]
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 static extern ScreenshotHandle _AddScreenshotToLibrary( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight );
private FAddScreenshotToLibrary _AddScreenshotToLibrary;
#endregion #endregion
internal ScreenshotHandle AddScreenshotToLibrary( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight ) internal ScreenshotHandle AddScreenshotToLibrary( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight )
@ -45,9 +41,8 @@ internal ScreenshotHandle AddScreenshotToLibrary( [MarshalAs( UnmanagedType.Cust
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TriggerScreenshot")]
private delegate void FTriggerScreenshot( IntPtr self ); private static extern void _TriggerScreenshot( IntPtr self );
private FTriggerScreenshot _TriggerScreenshot;
#endregion #endregion
internal void TriggerScreenshot() internal void TriggerScreenshot()
@ -56,9 +51,8 @@ internal void TriggerScreenshot()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_HookScreenshots")]
private delegate void FHookScreenshots( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bHook ); private static extern void _HookScreenshots( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bHook );
private FHookScreenshots _HookScreenshots;
#endregion #endregion
internal void HookScreenshots( [MarshalAs( UnmanagedType.U1 )] bool bHook ) internal void HookScreenshots( [MarshalAs( UnmanagedType.U1 )] bool bHook )
@ -67,10 +61,9 @@ internal void HookScreenshots( [MarshalAs( UnmanagedType.U1 )] bool bHook )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_SetLocation")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetLocation( IntPtr self, ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation ); private static extern bool _SetLocation( IntPtr self, ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation );
private FSetLocation _SetLocation;
#endregion #endregion
internal bool SetLocation( ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation ) internal bool SetLocation( ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation )
@ -80,10 +73,9 @@ internal bool SetLocation( ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedTy
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TagUser")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FTagUser( IntPtr self, ScreenshotHandle hScreenshot, SteamId steamID ); private static extern bool _TagUser( IntPtr self, ScreenshotHandle hScreenshot, SteamId steamID );
private FTagUser _TagUser;
#endregion #endregion
internal bool TagUser( ScreenshotHandle hScreenshot, SteamId steamID ) internal bool TagUser( ScreenshotHandle hScreenshot, SteamId steamID )
@ -93,10 +85,9 @@ internal bool TagUser( ScreenshotHandle hScreenshot, SteamId steamID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TagPublishedFile")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FTagPublishedFile( IntPtr self, ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID ); private static extern bool _TagPublishedFile( IntPtr self, ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID );
private FTagPublishedFile _TagPublishedFile;
#endregion #endregion
internal bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID ) internal bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID )
@ -106,10 +97,9 @@ internal bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId un
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_IsScreenshotsHooked")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsScreenshotsHooked( IntPtr self ); private static extern bool _IsScreenshotsHooked( IntPtr self );
private FIsScreenshotsHooked _IsScreenshotsHooked;
#endregion #endregion
internal bool IsScreenshotsHooked() internal bool IsScreenshotsHooked()
@ -119,9 +109,8 @@ internal bool IsScreenshotsHooked()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_AddVRScreenshotToLibrary")]
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 static extern ScreenshotHandle _AddVRScreenshotToLibrary( IntPtr self, VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename );
private FAddVRScreenshotToLibrary _AddVRScreenshotToLibrary;
#endregion #endregion
internal ScreenshotHandle AddVRScreenshotToLibrary( VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename ) internal ScreenshotHandle AddVRScreenshotToLibrary( VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename )

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamUGC : SteamInterface internal class ISteamUGC : SteamInterface
{ {
public override string InterfaceName => "STEAMUGC_INTERFACE_VERSION012";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,9 +19,8 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUserUGCRequest")]
private delegate UGCQueryHandle_t FCreateQueryUserUGCRequest( IntPtr self, AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage ); private static extern UGCQueryHandle_t _CreateQueryUserUGCRequest( IntPtr self, AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage );
private FCreateQueryUserUGCRequest _CreateQueryUserUGCRequest;
#endregion #endregion
internal UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage ) internal UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage )
@ -33,33 +30,30 @@ internal UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, Us
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequest")]
private delegate UGCQueryHandle_t FCreateQueryAllUGCRequest1( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage ); private static extern UGCQueryHandle_t _CreateQueryAllUGCRequest( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage );
private FCreateQueryAllUGCRequest1 _CreateQueryAllUGCRequest1;
#endregion #endregion
internal UGCQueryHandle_t CreateQueryAllUGCRequest1( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage ) internal UGCQueryHandle_t CreateQueryAllUGCRequest( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage )
{ {
var returnValue = _CreateQueryAllUGCRequest1( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage ); var returnValue = _CreateQueryAllUGCRequest( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0")]
private delegate UGCQueryHandle_t FCreateQueryAllUGCRequest2( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor ); private static extern UGCQueryHandle_t _CreateQueryAllUGCRequest0( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor );
private FCreateQueryAllUGCRequest2 _CreateQueryAllUGCRequest2;
#endregion #endregion
internal UGCQueryHandle_t CreateQueryAllUGCRequest2( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor ) internal UGCQueryHandle_t CreateQueryAllUGCRequest0( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor )
{ {
var returnValue = _CreateQueryAllUGCRequest2( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor ); var returnValue = _CreateQueryAllUGCRequest0( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest")]
private delegate UGCQueryHandle_t FCreateQueryUGCDetailsRequest( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ); private static extern UGCQueryHandle_t _CreateQueryUGCDetailsRequest( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
private FCreateQueryUGCDetailsRequest _CreateQueryUGCDetailsRequest;
#endregion #endregion
internal UGCQueryHandle_t CreateQueryUGCDetailsRequest( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ) internal UGCQueryHandle_t CreateQueryUGCDetailsRequest( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs )
@ -69,22 +63,20 @@ internal UGCQueryHandle_t CreateQueryUGCDetailsRequest( [In,Out] PublishedFileId
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SendQueryUGCRequest")]
private delegate SteamAPICall_t FSendQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle ); private static extern SteamAPICall_t _SendQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle );
private FSendQueryUGCRequest _SendQueryUGCRequest;
#endregion #endregion
internal async Task<SteamUGCQueryCompleted_t?> SendQueryUGCRequest( UGCQueryHandle_t handle ) internal CallbackResult SendQueryUGCRequest( UGCQueryHandle_t handle )
{ {
var returnValue = _SendQueryUGCRequest( Self, handle ); var returnValue = _SendQueryUGCRequest( Self, handle );
return await SteamUGCQueryCompleted_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCResult")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCResult( IntPtr self, UGCQueryHandle_t handle, uint index, ref SteamUGCDetails_t pDetails ); private static extern bool _GetQueryUGCResult( IntPtr self, UGCQueryHandle_t handle, uint index, ref SteamUGCDetails_t pDetails );
private FGetQueryUGCResult _GetQueryUGCResult;
#endregion #endregion
internal bool GetQueryUGCResult( UGCQueryHandle_t handle, uint index, ref SteamUGCDetails_t pDetails ) internal bool GetQueryUGCResult( UGCQueryHandle_t handle, uint index, ref SteamUGCDetails_t pDetails )
@ -94,10 +86,9 @@ internal bool GetQueryUGCResult( UGCQueryHandle_t handle, uint index, ref SteamU
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCPreviewURL")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCPreviewURL( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchURL, uint cchURLSize ); private static extern bool _GetQueryUGCPreviewURL( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchURL, uint cchURLSize );
private FGetQueryUGCPreviewURL _GetQueryUGCPreviewURL;
#endregion #endregion
internal bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint index, out string pchURL ) internal bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint index, out string pchURL )
@ -109,10 +100,9 @@ internal bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint index, out st
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCMetadata")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCMetadata( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchMetadata, uint cchMetadatasize ); private static extern bool _GetQueryUGCMetadata( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchMetadata, uint cchMetadatasize );
private FGetQueryUGCMetadata _GetQueryUGCMetadata;
#endregion #endregion
internal bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint index, out string pchMetadata ) internal bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint index, out string pchMetadata )
@ -124,10 +114,9 @@ internal bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint index, out stri
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCChildren")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCChildren( IntPtr self, UGCQueryHandle_t handle, uint index, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries ); private static extern bool _GetQueryUGCChildren( IntPtr self, UGCQueryHandle_t handle, uint index, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries );
private FGetQueryUGCChildren _GetQueryUGCChildren;
#endregion #endregion
internal bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint index, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries ) internal bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint index, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries )
@ -137,10 +126,9 @@ internal bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint index, [In,Out]
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCStatistic")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCStatistic( IntPtr self, UGCQueryHandle_t handle, uint index, ItemStatistic eStatType, ref ulong pStatValue ); private static extern bool _GetQueryUGCStatistic( IntPtr self, UGCQueryHandle_t handle, uint index, ItemStatistic eStatType, ref ulong pStatValue );
private FGetQueryUGCStatistic _GetQueryUGCStatistic;
#endregion #endregion
internal bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint index, ItemStatistic eStatType, ref ulong pStatValue ) internal bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint index, ItemStatistic eStatType, ref ulong pStatValue )
@ -150,9 +138,8 @@ internal bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint index, ItemSta
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumAdditionalPreviews")]
private delegate uint FGetQueryUGCNumAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, uint index ); private static extern uint _GetQueryUGCNumAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, uint index );
private FGetQueryUGCNumAdditionalPreviews _GetQueryUGCNumAdditionalPreviews;
#endregion #endregion
internal uint GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint index ) internal uint GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint index )
@ -162,10 +149,9 @@ internal uint GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint in
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCAdditionalPreview( IntPtr self, UGCQueryHandle_t handle, uint index, uint previewIndex, IntPtr pchURLOrVideoID, uint cchURLSize, IntPtr pchOriginalFileName, uint cchOriginalFileNameSize, ref ItemPreviewType pPreviewType ); private static extern bool _GetQueryUGCAdditionalPreview( IntPtr self, UGCQueryHandle_t handle, uint index, uint previewIndex, IntPtr pchURLOrVideoID, uint cchURLSize, IntPtr pchOriginalFileName, uint cchOriginalFileNameSize, ref ItemPreviewType pPreviewType );
private FGetQueryUGCAdditionalPreview _GetQueryUGCAdditionalPreview;
#endregion #endregion
internal bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint index, uint previewIndex, out string pchURLOrVideoID, out string pchOriginalFileName, ref ItemPreviewType pPreviewType ) internal bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint index, uint previewIndex, out string pchURLOrVideoID, out string pchOriginalFileName, ref ItemPreviewType pPreviewType )
@ -179,9 +165,8 @@ internal bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint index,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumKeyValueTags")]
private delegate uint FGetQueryUGCNumKeyValueTags( IntPtr self, UGCQueryHandle_t handle, uint index ); private static extern uint _GetQueryUGCNumKeyValueTags( IntPtr self, UGCQueryHandle_t handle, uint index );
private FGetQueryUGCNumKeyValueTags _GetQueryUGCNumKeyValueTags;
#endregion #endregion
internal uint GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint index ) internal uint GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint index )
@ -191,10 +176,9 @@ internal uint GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint index )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCKeyValueTag( IntPtr self, UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, IntPtr pchKey, uint cchKeySize, IntPtr pchValue, uint cchValueSize ); private static extern bool _GetQueryUGCKeyValueTag( IntPtr self, UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, IntPtr pchKey, uint cchKeySize, IntPtr pchValue, uint cchValueSize );
private FGetQueryUGCKeyValueTag _GetQueryUGCKeyValueTag;
#endregion #endregion
internal bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, out string pchKey, out string pchValue ) internal bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, out string pchKey, out string pchValue )
@ -208,10 +192,9 @@ internal bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint index, uint
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_ReleaseQueryUGCRequest")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FReleaseQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle ); private static extern bool _ReleaseQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle );
private FReleaseQueryUGCRequest _ReleaseQueryUGCRequest;
#endregion #endregion
internal bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle ) internal bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle )
@ -221,10 +204,9 @@ internal bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredTag")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddRequiredTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName ); private static extern bool _AddRequiredTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName );
private FAddRequiredTag _AddRequiredTag;
#endregion #endregion
internal bool AddRequiredTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName ) internal bool AddRequiredTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName )
@ -234,10 +216,9 @@ internal bool AddRequiredTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddExcludedTag")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddExcludedTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName ); private static extern bool _AddExcludedTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName );
private FAddExcludedTag _AddExcludedTag;
#endregion #endregion
internal bool AddExcludedTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName ) internal bool AddExcludedTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName )
@ -247,10 +228,9 @@ internal bool AddExcludedTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnOnlyIDs")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnOnlyIDs( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnOnlyIDs ); private static extern bool _SetReturnOnlyIDs( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnOnlyIDs );
private FSetReturnOnlyIDs _SetReturnOnlyIDs;
#endregion #endregion
internal bool SetReturnOnlyIDs( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnOnlyIDs ) internal bool SetReturnOnlyIDs( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnOnlyIDs )
@ -260,10 +240,9 @@ internal bool SetReturnOnlyIDs( UGCQueryHandle_t handle, [MarshalAs( UnmanagedTy
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnKeyValueTags")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnKeyValueTags( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnKeyValueTags ); private static extern bool _SetReturnKeyValueTags( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnKeyValueTags );
private FSetReturnKeyValueTags _SetReturnKeyValueTags;
#endregion #endregion
internal bool SetReturnKeyValueTags( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnKeyValueTags ) internal bool SetReturnKeyValueTags( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnKeyValueTags )
@ -273,10 +252,9 @@ internal bool SetReturnKeyValueTags( UGCQueryHandle_t handle, [MarshalAs( Unmana
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnLongDescription")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnLongDescription( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnLongDescription ); private static extern bool _SetReturnLongDescription( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnLongDescription );
private FSetReturnLongDescription _SetReturnLongDescription;
#endregion #endregion
internal bool SetReturnLongDescription( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnLongDescription ) internal bool SetReturnLongDescription( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnLongDescription )
@ -286,10 +264,9 @@ internal bool SetReturnLongDescription( UGCQueryHandle_t handle, [MarshalAs( Unm
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnMetadata")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnMetadata( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnMetadata ); private static extern bool _SetReturnMetadata( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnMetadata );
private FSetReturnMetadata _SetReturnMetadata;
#endregion #endregion
internal bool SetReturnMetadata( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnMetadata ) internal bool SetReturnMetadata( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnMetadata )
@ -299,10 +276,9 @@ internal bool SetReturnMetadata( UGCQueryHandle_t handle, [MarshalAs( UnmanagedT
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnChildren")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnChildren( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnChildren ); private static extern bool _SetReturnChildren( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnChildren );
private FSetReturnChildren _SetReturnChildren;
#endregion #endregion
internal bool SetReturnChildren( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnChildren ) internal bool SetReturnChildren( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnChildren )
@ -312,10 +288,9 @@ internal bool SetReturnChildren( UGCQueryHandle_t handle, [MarshalAs( UnmanagedT
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnAdditionalPreviews")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnAdditionalPreviews ); private static extern bool _SetReturnAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnAdditionalPreviews );
private FSetReturnAdditionalPreviews _SetReturnAdditionalPreviews;
#endregion #endregion
internal bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnAdditionalPreviews ) internal bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnAdditionalPreviews )
@ -325,10 +300,9 @@ internal bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, [MarshalAs(
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnTotalOnly")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnTotalOnly( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnTotalOnly ); private static extern bool _SetReturnTotalOnly( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnTotalOnly );
private FSetReturnTotalOnly _SetReturnTotalOnly;
#endregion #endregion
internal bool SetReturnTotalOnly( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnTotalOnly ) internal bool SetReturnTotalOnly( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnTotalOnly )
@ -338,10 +312,9 @@ internal bool SetReturnTotalOnly( UGCQueryHandle_t handle, [MarshalAs( Unmanaged
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnPlaytimeStats")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnPlaytimeStats( IntPtr self, UGCQueryHandle_t handle, uint unDays ); private static extern bool _SetReturnPlaytimeStats( IntPtr self, UGCQueryHandle_t handle, uint unDays );
private FSetReturnPlaytimeStats _SetReturnPlaytimeStats;
#endregion #endregion
internal bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint unDays ) internal bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint unDays )
@ -351,10 +324,9 @@ internal bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint unDays )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetLanguage")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetLanguage( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage ); private static extern bool _SetLanguage( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage );
private FSetLanguage _SetLanguage;
#endregion #endregion
internal bool SetLanguage( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage ) internal bool SetLanguage( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage )
@ -364,10 +336,9 @@ internal bool SetLanguage( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.Cu
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetAllowCachedResponse")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetAllowCachedResponse( IntPtr self, UGCQueryHandle_t handle, uint unMaxAgeSeconds ); private static extern bool _SetAllowCachedResponse( IntPtr self, UGCQueryHandle_t handle, uint unMaxAgeSeconds );
private FSetAllowCachedResponse _SetAllowCachedResponse;
#endregion #endregion
internal bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint unMaxAgeSeconds ) internal bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint unMaxAgeSeconds )
@ -377,10 +348,9 @@ internal bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint unMaxAgeSeco
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetCloudFileNameFilter")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetCloudFileNameFilter( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pMatchCloudFileName ); private static extern bool _SetCloudFileNameFilter( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pMatchCloudFileName );
private FSetCloudFileNameFilter _SetCloudFileNameFilter;
#endregion #endregion
internal bool SetCloudFileNameFilter( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pMatchCloudFileName ) internal bool SetCloudFileNameFilter( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pMatchCloudFileName )
@ -390,10 +360,9 @@ internal bool SetCloudFileNameFilter( UGCQueryHandle_t handle, [MarshalAs( Unman
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetMatchAnyTag")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetMatchAnyTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bMatchAnyTag ); private static extern bool _SetMatchAnyTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bMatchAnyTag );
private FSetMatchAnyTag _SetMatchAnyTag;
#endregion #endregion
internal bool SetMatchAnyTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bMatchAnyTag ) internal bool SetMatchAnyTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bMatchAnyTag )
@ -403,10 +372,9 @@ internal bool SetMatchAnyTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetSearchText")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetSearchText( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pSearchText ); private static extern bool _SetSearchText( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pSearchText );
private FSetSearchText _SetSearchText;
#endregion #endregion
internal bool SetSearchText( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pSearchText ) internal bool SetSearchText( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pSearchText )
@ -416,10 +384,9 @@ internal bool SetSearchText( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetRankedByTrendDays")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetRankedByTrendDays( IntPtr self, UGCQueryHandle_t handle, uint unDays ); private static extern bool _SetRankedByTrendDays( IntPtr self, UGCQueryHandle_t handle, uint unDays );
private FSetRankedByTrendDays _SetRankedByTrendDays;
#endregion #endregion
internal bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint unDays ) internal bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint unDays )
@ -429,10 +396,9 @@ internal bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint unDays )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredKeyValueTag")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddRequiredKeyValueTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue ); private static extern bool _AddRequiredKeyValueTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue );
private FAddRequiredKeyValueTag _AddRequiredKeyValueTag;
#endregion #endregion
internal bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue ) internal bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue )
@ -442,33 +408,30 @@ internal bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, [MarshalAs( Unman
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RequestUGCDetails")]
private delegate SteamAPICall_t FRequestUGCDetails( IntPtr self, PublishedFileId nPublishedFileID, uint unMaxAgeSeconds ); private static extern SteamAPICall_t _RequestUGCDetails( IntPtr self, PublishedFileId nPublishedFileID, uint unMaxAgeSeconds );
private FRequestUGCDetails _RequestUGCDetails;
#endregion #endregion
internal async Task<SteamUGCRequestUGCDetailsResult_t?> RequestUGCDetails( PublishedFileId nPublishedFileID, uint unMaxAgeSeconds ) internal CallbackResult RequestUGCDetails( PublishedFileId nPublishedFileID, uint unMaxAgeSeconds )
{ {
var returnValue = _RequestUGCDetails( Self, nPublishedFileID, unMaxAgeSeconds ); var returnValue = _RequestUGCDetails( Self, nPublishedFileID, unMaxAgeSeconds );
return await SteamUGCRequestUGCDetailsResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateItem")]
private delegate SteamAPICall_t FCreateItem( IntPtr self, AppId nConsumerAppId, WorkshopFileType eFileType ); private static extern SteamAPICall_t _CreateItem( IntPtr self, AppId nConsumerAppId, WorkshopFileType eFileType );
private FCreateItem _CreateItem;
#endregion #endregion
internal async Task<CreateItemResult_t?> CreateItem( AppId nConsumerAppId, WorkshopFileType eFileType ) internal CallbackResult CreateItem( AppId nConsumerAppId, WorkshopFileType eFileType )
{ {
var returnValue = _CreateItem( Self, nConsumerAppId, eFileType ); var returnValue = _CreateItem( Self, nConsumerAppId, eFileType );
return await CreateItemResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StartItemUpdate")]
private delegate UGCUpdateHandle_t FStartItemUpdate( IntPtr self, AppId nConsumerAppId, PublishedFileId nPublishedFileID ); private static extern UGCUpdateHandle_t _StartItemUpdate( IntPtr self, AppId nConsumerAppId, PublishedFileId nPublishedFileID );
private FStartItemUpdate _StartItemUpdate;
#endregion #endregion
internal UGCUpdateHandle_t StartItemUpdate( AppId nConsumerAppId, PublishedFileId nPublishedFileID ) internal UGCUpdateHandle_t StartItemUpdate( AppId nConsumerAppId, PublishedFileId nPublishedFileID )
@ -478,10 +441,9 @@ internal UGCUpdateHandle_t StartItemUpdate( AppId nConsumerAppId, PublishedFileI
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemTitle")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemTitle( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTitle ); private static extern bool _SetItemTitle( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTitle );
private FSetItemTitle _SetItemTitle;
#endregion #endregion
internal bool SetItemTitle( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTitle ) internal bool SetItemTitle( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTitle )
@ -491,10 +453,9 @@ internal bool SetItemTitle( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemDescription")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemDescription( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription ); private static extern bool _SetItemDescription( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription );
private FSetItemDescription _SetItemDescription;
#endregion #endregion
internal bool SetItemDescription( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription ) internal bool SetItemDescription( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription )
@ -504,10 +465,9 @@ internal bool SetItemDescription( UGCUpdateHandle_t handle, [MarshalAs( Unmanage
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemUpdateLanguage")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemUpdateLanguage( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage ); private static extern bool _SetItemUpdateLanguage( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage );
private FSetItemUpdateLanguage _SetItemUpdateLanguage;
#endregion #endregion
internal bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage ) internal bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage )
@ -517,10 +477,9 @@ internal bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, [MarshalAs( Unman
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemMetadata")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemMetadata( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetaData ); private static extern bool _SetItemMetadata( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetaData );
private FSetItemMetadata _SetItemMetadata;
#endregion #endregion
internal bool SetItemMetadata( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetaData ) internal bool SetItemMetadata( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetaData )
@ -530,10 +489,9 @@ internal bool SetItemMetadata( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedTy
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemVisibility")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemVisibility( IntPtr self, UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility ); private static extern bool _SetItemVisibility( IntPtr self, UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility );
private FSetItemVisibility _SetItemVisibility;
#endregion #endregion
internal bool SetItemVisibility( UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility ) internal bool SetItemVisibility( UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility )
@ -543,10 +501,9 @@ internal bool SetItemVisibility( UGCUpdateHandle_t handle, RemoteStoragePublishe
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemTags")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemTags( IntPtr self, UGCUpdateHandle_t updateHandle, ref SteamParamStringArray_t pTags ); private static extern bool _SetItemTags( IntPtr self, UGCUpdateHandle_t updateHandle, ref SteamParamStringArray_t pTags );
private FSetItemTags _SetItemTags;
#endregion #endregion
internal bool SetItemTags( UGCUpdateHandle_t updateHandle, ref SteamParamStringArray_t pTags ) internal bool SetItemTags( UGCUpdateHandle_t updateHandle, ref SteamParamStringArray_t pTags )
@ -556,10 +513,9 @@ internal bool SetItemTags( UGCUpdateHandle_t updateHandle, ref SteamParamStringA
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemContent")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemContent( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszContentFolder ); private static extern bool _SetItemContent( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszContentFolder );
private FSetItemContent _SetItemContent;
#endregion #endregion
internal bool SetItemContent( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszContentFolder ) internal bool SetItemContent( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszContentFolder )
@ -569,10 +525,9 @@ internal bool SetItemContent( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedTyp
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemPreview")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemPreview( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile ); private static extern bool _SetItemPreview( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile );
private FSetItemPreview _SetItemPreview;
#endregion #endregion
internal bool SetItemPreview( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile ) internal bool SetItemPreview( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile )
@ -582,10 +537,9 @@ internal bool SetItemPreview( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedTyp
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetAllowLegacyUpload")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetAllowLegacyUpload( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bAllowLegacyUpload ); private static extern bool _SetAllowLegacyUpload( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bAllowLegacyUpload );
private FSetAllowLegacyUpload _SetAllowLegacyUpload;
#endregion #endregion
internal bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bAllowLegacyUpload ) internal bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bAllowLegacyUpload )
@ -595,10 +549,9 @@ internal bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, [MarshalAs( Unmana
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemKeyValueTags")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRemoveItemKeyValueTags( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); private static extern bool _RemoveItemKeyValueTags( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
private FRemoveItemKeyValueTags _RemoveItemKeyValueTags;
#endregion #endregion
internal bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) internal bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
@ -608,10 +561,9 @@ internal bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, [MarshalAs( Unma
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemKeyValueTag")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddItemKeyValueTag( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ); private static extern bool _AddItemKeyValueTag( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
private FAddItemKeyValueTag _AddItemKeyValueTag;
#endregion #endregion
internal bool AddItemKeyValueTag( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue ) internal bool AddItemKeyValueTag( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
@ -621,10 +573,9 @@ internal bool AddItemKeyValueTag( UGCUpdateHandle_t handle, [MarshalAs( Unmanage
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemPreviewFile")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile, ItemPreviewType type ); private static extern bool _AddItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile, ItemPreviewType type );
private FAddItemPreviewFile _AddItemPreviewFile;
#endregion #endregion
internal bool AddItemPreviewFile( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile, ItemPreviewType type ) internal bool AddItemPreviewFile( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile, ItemPreviewType type )
@ -634,10 +585,9 @@ internal bool AddItemPreviewFile( UGCUpdateHandle_t handle, [MarshalAs( Unmanage
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemPreviewVideo")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID ); private static extern bool _AddItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID );
private FAddItemPreviewVideo _AddItemPreviewVideo;
#endregion #endregion
internal bool AddItemPreviewVideo( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID ) internal bool AddItemPreviewVideo( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID )
@ -647,10 +597,9 @@ internal bool AddItemPreviewVideo( UGCUpdateHandle_t handle, [MarshalAs( Unmanag
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UpdateItemPreviewFile")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FUpdateItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile ); private static extern bool _UpdateItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile );
private FUpdateItemPreviewFile _UpdateItemPreviewFile;
#endregion #endregion
internal bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile ) internal bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile )
@ -660,10 +609,9 @@ internal bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint index, [Mars
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UpdateItemPreviewVideo")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FUpdateItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID ); private static extern bool _UpdateItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID );
private FUpdateItemPreviewVideo _UpdateItemPreviewVideo;
#endregion #endregion
internal bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID ) internal bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID )
@ -673,10 +621,9 @@ internal bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint index, [Mar
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemPreview")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRemoveItemPreview( IntPtr self, UGCUpdateHandle_t handle, uint index ); private static extern bool _RemoveItemPreview( IntPtr self, UGCUpdateHandle_t handle, uint index );
private FRemoveItemPreview _RemoveItemPreview;
#endregion #endregion
internal bool RemoveItemPreview( UGCUpdateHandle_t handle, uint index ) internal bool RemoveItemPreview( UGCUpdateHandle_t handle, uint index )
@ -686,21 +633,19 @@ internal bool RemoveItemPreview( UGCUpdateHandle_t handle, uint index )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SubmitItemUpdate")]
private delegate SteamAPICall_t FSubmitItemUpdate( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote ); private static extern SteamAPICall_t _SubmitItemUpdate( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote );
private FSubmitItemUpdate _SubmitItemUpdate;
#endregion #endregion
internal async Task<SubmitItemUpdateResult_t?> SubmitItemUpdate( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote ) internal CallbackResult SubmitItemUpdate( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote )
{ {
var returnValue = _SubmitItemUpdate( Self, handle, pchChangeNote ); var returnValue = _SubmitItemUpdate( Self, handle, pchChangeNote );
return await SubmitItemUpdateResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemUpdateProgress")]
private delegate ItemUpdateStatus FGetItemUpdateProgress( IntPtr self, UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal ); private static extern ItemUpdateStatus _GetItemUpdateProgress( IntPtr self, UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal );
private FGetItemUpdateProgress _GetItemUpdateProgress;
#endregion #endregion
internal ItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal ) internal ItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal )
@ -710,81 +655,74 @@ internal ItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, ref u
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetUserItemVote")]
private delegate SteamAPICall_t FSetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp ); private static extern SteamAPICall_t _SetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp );
private FSetUserItemVote _SetUserItemVote;
#endregion #endregion
internal async Task<SetUserItemVoteResult_t?> SetUserItemVote( PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp ) internal CallbackResult SetUserItemVote( PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp )
{ {
var returnValue = _SetUserItemVote( Self, nPublishedFileID, bVoteUp ); var returnValue = _SetUserItemVote( Self, nPublishedFileID, bVoteUp );
return await SetUserItemVoteResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetUserItemVote")]
private delegate SteamAPICall_t FGetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID ); private static extern SteamAPICall_t _GetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID );
private FGetUserItemVote _GetUserItemVote;
#endregion #endregion
internal async Task<GetUserItemVoteResult_t?> GetUserItemVote( PublishedFileId nPublishedFileID ) internal CallbackResult GetUserItemVote( PublishedFileId nPublishedFileID )
{ {
var returnValue = _GetUserItemVote( Self, nPublishedFileID ); var returnValue = _GetUserItemVote( Self, nPublishedFileID );
return await GetUserItemVoteResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemToFavorites")]
private delegate SteamAPICall_t FAddItemToFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID ); private static extern SteamAPICall_t _AddItemToFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID );
private FAddItemToFavorites _AddItemToFavorites;
#endregion #endregion
internal async Task<UserFavoriteItemsListChanged_t?> AddItemToFavorites( AppId nAppId, PublishedFileId nPublishedFileID ) internal CallbackResult AddItemToFavorites( AppId nAppId, PublishedFileId nPublishedFileID )
{ {
var returnValue = _AddItemToFavorites( Self, nAppId, nPublishedFileID ); var returnValue = _AddItemToFavorites( Self, nAppId, nPublishedFileID );
return await UserFavoriteItemsListChanged_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemFromFavorites")]
private delegate SteamAPICall_t FRemoveItemFromFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID ); private static extern SteamAPICall_t _RemoveItemFromFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID );
private FRemoveItemFromFavorites _RemoveItemFromFavorites;
#endregion #endregion
internal async Task<UserFavoriteItemsListChanged_t?> RemoveItemFromFavorites( AppId nAppId, PublishedFileId nPublishedFileID ) internal CallbackResult RemoveItemFromFavorites( AppId nAppId, PublishedFileId nPublishedFileID )
{ {
var returnValue = _RemoveItemFromFavorites( Self, nAppId, nPublishedFileID ); var returnValue = _RemoveItemFromFavorites( Self, nAppId, nPublishedFileID );
return await UserFavoriteItemsListChanged_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SubscribeItem")]
private delegate SteamAPICall_t FSubscribeItem( IntPtr self, PublishedFileId nPublishedFileID ); private static extern SteamAPICall_t _SubscribeItem( IntPtr self, PublishedFileId nPublishedFileID );
private FSubscribeItem _SubscribeItem;
#endregion #endregion
internal async Task<RemoteStorageSubscribePublishedFileResult_t?> SubscribeItem( PublishedFileId nPublishedFileID ) internal CallbackResult SubscribeItem( PublishedFileId nPublishedFileID )
{ {
var returnValue = _SubscribeItem( Self, nPublishedFileID ); var returnValue = _SubscribeItem( Self, nPublishedFileID );
return await RemoteStorageSubscribePublishedFileResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UnsubscribeItem")]
private delegate SteamAPICall_t FUnsubscribeItem( IntPtr self, PublishedFileId nPublishedFileID ); private static extern SteamAPICall_t _UnsubscribeItem( IntPtr self, PublishedFileId nPublishedFileID );
private FUnsubscribeItem _UnsubscribeItem;
#endregion #endregion
internal async Task<RemoteStorageUnsubscribePublishedFileResult_t?> UnsubscribeItem( PublishedFileId nPublishedFileID ) internal CallbackResult UnsubscribeItem( PublishedFileId nPublishedFileID )
{ {
var returnValue = _UnsubscribeItem( Self, nPublishedFileID ); var returnValue = _UnsubscribeItem( Self, nPublishedFileID );
return await RemoteStorageUnsubscribePublishedFileResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetNumSubscribedItems")]
private delegate uint FGetNumSubscribedItems( IntPtr self ); private static extern uint _GetNumSubscribedItems( IntPtr self );
private FGetNumSubscribedItems _GetNumSubscribedItems;
#endregion #endregion
internal uint GetNumSubscribedItems() internal uint GetNumSubscribedItems()
@ -794,9 +732,8 @@ internal uint GetNumSubscribedItems()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetSubscribedItems")]
private delegate uint FGetSubscribedItems( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries ); private static extern uint _GetSubscribedItems( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries );
private FGetSubscribedItems _GetSubscribedItems;
#endregion #endregion
internal uint GetSubscribedItems( [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries ) internal uint GetSubscribedItems( [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries )
@ -806,9 +743,8 @@ internal uint GetSubscribedItems( [In,Out] PublishedFileId[] pvecPublishedFileI
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemState")]
private delegate uint FGetItemState( IntPtr self, PublishedFileId nPublishedFileID ); private static extern uint _GetItemState( IntPtr self, PublishedFileId nPublishedFileID );
private FGetItemState _GetItemState;
#endregion #endregion
internal uint GetItemState( PublishedFileId nPublishedFileID ) internal uint GetItemState( PublishedFileId nPublishedFileID )
@ -818,10 +754,9 @@ internal uint GetItemState( PublishedFileId nPublishedFileID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemInstallInfo")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemInstallInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punSizeOnDisk, IntPtr pchFolder, uint cchFolderSize, ref uint punTimeStamp ); private static extern bool _GetItemInstallInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punSizeOnDisk, IntPtr pchFolder, uint cchFolderSize, ref uint punTimeStamp );
private FGetItemInstallInfo _GetItemInstallInfo;
#endregion #endregion
internal bool GetItemInstallInfo( PublishedFileId nPublishedFileID, ref ulong punSizeOnDisk, out string pchFolder, ref uint punTimeStamp ) internal bool GetItemInstallInfo( PublishedFileId nPublishedFileID, ref ulong punSizeOnDisk, out string pchFolder, ref uint punTimeStamp )
@ -833,10 +768,9 @@ internal bool GetItemInstallInfo( PublishedFileId nPublishedFileID, ref ulong pu
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemDownloadInfo")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemDownloadInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punBytesDownloaded, ref ulong punBytesTotal ); private static extern bool _GetItemDownloadInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punBytesDownloaded, ref ulong punBytesTotal );
private FGetItemDownloadInfo _GetItemDownloadInfo;
#endregion #endregion
internal bool GetItemDownloadInfo( PublishedFileId nPublishedFileID, ref ulong punBytesDownloaded, ref ulong punBytesTotal ) internal bool GetItemDownloadInfo( PublishedFileId nPublishedFileID, ref ulong punBytesDownloaded, ref ulong punBytesTotal )
@ -846,10 +780,9 @@ internal bool GetItemDownloadInfo( PublishedFileId nPublishedFileID, ref ulong p
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_DownloadItem")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FDownloadItem( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bHighPriority ); private static extern bool _DownloadItem( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bHighPriority );
private FDownloadItem _DownloadItem;
#endregion #endregion
internal bool DownloadItem( PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bHighPriority ) internal bool DownloadItem( PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bHighPriority )
@ -859,10 +792,9 @@ internal bool DownloadItem( PublishedFileId nPublishedFileID, [MarshalAs( Unmana
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_BInitWorkshopForGameServer")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBInitWorkshopForGameServer( IntPtr self, DepotId_t unWorkshopDepotID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFolder ); private static extern bool _BInitWorkshopForGameServer( IntPtr self, DepotId_t unWorkshopDepotID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFolder );
private FBInitWorkshopForGameServer _BInitWorkshopForGameServer;
#endregion #endregion
internal bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFolder ) internal bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFolder )
@ -872,9 +804,8 @@ internal bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, [MarshalA
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SuspendDownloads")]
private delegate void FSuspendDownloads( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bSuspend ); private static extern void _SuspendDownloads( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bSuspend );
private FSuspendDownloads _SuspendDownloads;
#endregion #endregion
internal void SuspendDownloads( [MarshalAs( UnmanagedType.U1 )] bool bSuspend ) internal void SuspendDownloads( [MarshalAs( UnmanagedType.U1 )] bool bSuspend )
@ -883,111 +814,102 @@ internal void SuspendDownloads( [MarshalAs( UnmanagedType.U1 )] bool bSuspend )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StartPlaytimeTracking")]
private delegate SteamAPICall_t FStartPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ); private static extern SteamAPICall_t _StartPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
private FStartPlaytimeTracking _StartPlaytimeTracking;
#endregion #endregion
internal async Task<StartPlaytimeTrackingResult_t?> StartPlaytimeTracking( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ) internal CallbackResult StartPlaytimeTracking( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs )
{ {
var returnValue = _StartPlaytimeTracking( Self, pvecPublishedFileID, unNumPublishedFileIDs ); var returnValue = _StartPlaytimeTracking( Self, pvecPublishedFileID, unNumPublishedFileIDs );
return await StartPlaytimeTrackingResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StopPlaytimeTracking")]
private delegate SteamAPICall_t FStopPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ); private static extern SteamAPICall_t _StopPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
private FStopPlaytimeTracking _StopPlaytimeTracking;
#endregion #endregion
internal async Task<StopPlaytimeTrackingResult_t?> StopPlaytimeTracking( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs ) internal CallbackResult StopPlaytimeTracking( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs )
{ {
var returnValue = _StopPlaytimeTracking( Self, pvecPublishedFileID, unNumPublishedFileIDs ); var returnValue = _StopPlaytimeTracking( Self, pvecPublishedFileID, unNumPublishedFileIDs );
return await StopPlaytimeTrackingResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems")]
private delegate SteamAPICall_t FStopPlaytimeTrackingForAllItems( IntPtr self ); private static extern SteamAPICall_t _StopPlaytimeTrackingForAllItems( IntPtr self );
private FStopPlaytimeTrackingForAllItems _StopPlaytimeTrackingForAllItems;
#endregion #endregion
internal async Task<StopPlaytimeTrackingResult_t?> StopPlaytimeTrackingForAllItems() internal CallbackResult StopPlaytimeTrackingForAllItems()
{ {
var returnValue = _StopPlaytimeTrackingForAllItems( Self ); var returnValue = _StopPlaytimeTrackingForAllItems( Self );
return await StopPlaytimeTrackingResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddDependency")]
private delegate SteamAPICall_t FAddDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ); private static extern SteamAPICall_t _AddDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID );
private FAddDependency _AddDependency;
#endregion #endregion
internal async Task<AddUGCDependencyResult_t?> AddDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ) internal CallbackResult AddDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID )
{ {
var returnValue = _AddDependency( Self, nParentPublishedFileID, nChildPublishedFileID ); var returnValue = _AddDependency( Self, nParentPublishedFileID, nChildPublishedFileID );
return await AddUGCDependencyResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveDependency")]
private delegate SteamAPICall_t FRemoveDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ); private static extern SteamAPICall_t _RemoveDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID );
private FRemoveDependency _RemoveDependency;
#endregion #endregion
internal async Task<RemoveUGCDependencyResult_t?> RemoveDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID ) internal CallbackResult RemoveDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID )
{ {
var returnValue = _RemoveDependency( Self, nParentPublishedFileID, nChildPublishedFileID ); var returnValue = _RemoveDependency( Self, nParentPublishedFileID, nChildPublishedFileID );
return await RemoveUGCDependencyResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddAppDependency")]
private delegate SteamAPICall_t FAddAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID ); private static extern SteamAPICall_t _AddAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID );
private FAddAppDependency _AddAppDependency;
#endregion #endregion
internal async Task<AddAppDependencyResult_t?> AddAppDependency( PublishedFileId nPublishedFileID, AppId nAppID ) internal CallbackResult AddAppDependency( PublishedFileId nPublishedFileID, AppId nAppID )
{ {
var returnValue = _AddAppDependency( Self, nPublishedFileID, nAppID ); var returnValue = _AddAppDependency( Self, nPublishedFileID, nAppID );
return await AddAppDependencyResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveAppDependency")]
private delegate SteamAPICall_t FRemoveAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID ); private static extern SteamAPICall_t _RemoveAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID );
private FRemoveAppDependency _RemoveAppDependency;
#endregion #endregion
internal async Task<RemoveAppDependencyResult_t?> RemoveAppDependency( PublishedFileId nPublishedFileID, AppId nAppID ) internal CallbackResult RemoveAppDependency( PublishedFileId nPublishedFileID, AppId nAppID )
{ {
var returnValue = _RemoveAppDependency( Self, nPublishedFileID, nAppID ); var returnValue = _RemoveAppDependency( Self, nPublishedFileID, nAppID );
return await RemoveAppDependencyResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetAppDependencies")]
private delegate SteamAPICall_t FGetAppDependencies( IntPtr self, PublishedFileId nPublishedFileID ); private static extern SteamAPICall_t _GetAppDependencies( IntPtr self, PublishedFileId nPublishedFileID );
private FGetAppDependencies _GetAppDependencies;
#endregion #endregion
internal async Task<GetAppDependenciesResult_t?> GetAppDependencies( PublishedFileId nPublishedFileID ) internal CallbackResult GetAppDependencies( PublishedFileId nPublishedFileID )
{ {
var returnValue = _GetAppDependencies( Self, nPublishedFileID ); var returnValue = _GetAppDependencies( Self, nPublishedFileID );
return await GetAppDependenciesResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_DeleteItem")]
private delegate SteamAPICall_t FDeleteItem( IntPtr self, PublishedFileId nPublishedFileID ); private static extern SteamAPICall_t _DeleteItem( IntPtr self, PublishedFileId nPublishedFileID );
private FDeleteItem _DeleteItem;
#endregion #endregion
internal async Task<DeleteItemResult_t?> DeleteItem( PublishedFileId nPublishedFileID ) internal CallbackResult DeleteItem( PublishedFileId nPublishedFileID )
{ {
var returnValue = _DeleteItem( Self, nPublishedFileID ); var returnValue = _DeleteItem( Self, nPublishedFileID );
return await DeleteItemResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
} }

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamUser : SteamInterface internal class ISteamUser : SteamInterface
{ {
public override string InterfaceName => "SteamUser020";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,9 +19,8 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetHSteamUser")]
private delegate HSteamUser FGetHSteamUser( IntPtr self ); private static extern HSteamUser _GetHSteamUser( IntPtr self );
private FGetHSteamUser _GetHSteamUser;
#endregion #endregion
internal HSteamUser GetHSteamUser() internal HSteamUser GetHSteamUser()
@ -33,10 +30,9 @@ internal HSteamUser GetHSteamUser()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BLoggedOn")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBLoggedOn( IntPtr self ); private static extern bool _BLoggedOn( IntPtr self );
private FBLoggedOn _BLoggedOn;
#endregion #endregion
internal bool BLoggedOn() internal bool BLoggedOn()
@ -46,31 +42,19 @@ internal bool BLoggedOn()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetSteamID")]
#if PLATFORM_WIN private static extern SteamId _GetSteamID( IntPtr self );
private delegate void FGetSteamID( IntPtr self, ref SteamId retVal );
#else
private delegate SteamId FGetSteamID( IntPtr self );
#endif
private FGetSteamID _GetSteamID;
#endregion #endregion
internal SteamId GetSteamID() internal SteamId GetSteamID()
{ {
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetSteamID( Self, ref retVal );
return retVal;
#else
var returnValue = _GetSteamID( Self ); var returnValue = _GetSteamID( Self );
return returnValue; return returnValue;
#endif
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_InitiateGameConnection")]
private delegate int FInitiateGameConnection( IntPtr self, IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure ); private static extern int _InitiateGameConnection( IntPtr self, IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure );
private FInitiateGameConnection _InitiateGameConnection;
#endregion #endregion
internal int InitiateGameConnection( IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure ) internal int InitiateGameConnection( IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure )
@ -80,9 +64,8 @@ internal int InitiateGameConnection( IntPtr pAuthBlob, int cbMaxAuthBlob, SteamI
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_TerminateGameConnection")]
private delegate void FTerminateGameConnection( IntPtr self, uint unIPServer, ushort usPortServer ); private static extern void _TerminateGameConnection( IntPtr self, uint unIPServer, ushort usPortServer );
private FTerminateGameConnection _TerminateGameConnection;
#endregion #endregion
internal void TerminateGameConnection( uint unIPServer, ushort usPortServer ) internal void TerminateGameConnection( uint unIPServer, ushort usPortServer )
@ -91,9 +74,8 @@ internal void TerminateGameConnection( uint unIPServer, ushort usPortServer )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_TrackAppUsageEvent")]
private delegate void FTrackAppUsageEvent( IntPtr self, GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo ); private static extern void _TrackAppUsageEvent( IntPtr self, GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo );
private FTrackAppUsageEvent _TrackAppUsageEvent;
#endregion #endregion
internal void TrackAppUsageEvent( GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo ) internal void TrackAppUsageEvent( GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo )
@ -102,10 +84,9 @@ internal void TrackAppUsageEvent( GameId gameID, int eAppUsageEvent, [MarshalAs(
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetUserDataFolder")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserDataFolder( IntPtr self, IntPtr pchBuffer, int cubBuffer ); private static extern bool _GetUserDataFolder( IntPtr self, IntPtr pchBuffer, int cubBuffer );
private FGetUserDataFolder _GetUserDataFolder;
#endregion #endregion
internal bool GetUserDataFolder( out string pchBuffer ) internal bool GetUserDataFolder( out string pchBuffer )
@ -117,9 +98,8 @@ internal bool GetUserDataFolder( out string pchBuffer )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_StartVoiceRecording")]
private delegate void FStartVoiceRecording( IntPtr self ); private static extern void _StartVoiceRecording( IntPtr self );
private FStartVoiceRecording _StartVoiceRecording;
#endregion #endregion
internal void StartVoiceRecording() internal void StartVoiceRecording()
@ -128,9 +108,8 @@ internal void StartVoiceRecording()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_StopVoiceRecording")]
private delegate void FStopVoiceRecording( IntPtr self ); private static extern void _StopVoiceRecording( IntPtr self );
private FStopVoiceRecording _StopVoiceRecording;
#endregion #endregion
internal void StopVoiceRecording() internal void StopVoiceRecording()
@ -139,9 +118,8 @@ internal void StopVoiceRecording()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetAvailableVoice")]
private delegate VoiceResult FGetAvailableVoice( IntPtr self, ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated ); private static extern VoiceResult _GetAvailableVoice( IntPtr self, ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
private FGetAvailableVoice _GetAvailableVoice;
#endregion #endregion
internal VoiceResult GetAvailableVoice( ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated ) internal VoiceResult GetAvailableVoice( ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated )
@ -151,9 +129,8 @@ internal VoiceResult GetAvailableVoice( ref uint pcbCompressed, ref uint pcbUnco
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetVoice")]
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 static extern VoiceResult _GetVoice( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
private FGetVoice _GetVoice;
#endregion #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 ) 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 )
@ -163,9 +140,8 @@ internal VoiceResult GetVoice( [MarshalAs( UnmanagedType.U1 )] bool bWantCompres
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_DecompressVoice")]
private delegate VoiceResult FDecompressVoice( IntPtr self, IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate ); private static extern VoiceResult _DecompressVoice( IntPtr self, IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate );
private FDecompressVoice _DecompressVoice;
#endregion #endregion
internal VoiceResult DecompressVoice( IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate ) internal VoiceResult DecompressVoice( IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate )
@ -175,9 +151,8 @@ internal VoiceResult DecompressVoice( IntPtr pCompressed, uint cbCompressed, Int
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetVoiceOptimalSampleRate")]
private delegate uint FGetVoiceOptimalSampleRate( IntPtr self ); private static extern uint _GetVoiceOptimalSampleRate( IntPtr self );
private FGetVoiceOptimalSampleRate _GetVoiceOptimalSampleRate;
#endregion #endregion
internal uint GetVoiceOptimalSampleRate() internal uint GetVoiceOptimalSampleRate()
@ -187,9 +162,8 @@ internal uint GetVoiceOptimalSampleRate()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetAuthSessionTicket")]
private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ); private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
private FGetAuthSessionTicket _GetAuthSessionTicket;
#endregion #endregion
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ) internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
@ -199,9 +173,8 @@ internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BeginAuthSession")]
private delegate BeginAuthResult FBeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID ); private static extern BeginAuthResult _BeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
private FBeginAuthSession _BeginAuthSession;
#endregion #endregion
internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID ) internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID )
@ -211,9 +184,8 @@ internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_EndAuthSession")]
private delegate void FEndAuthSession( IntPtr self, SteamId steamID ); private static extern void _EndAuthSession( IntPtr self, SteamId steamID );
private FEndAuthSession _EndAuthSession;
#endregion #endregion
internal void EndAuthSession( SteamId steamID ) internal void EndAuthSession( SteamId steamID )
@ -222,9 +194,8 @@ internal void EndAuthSession( SteamId steamID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_CancelAuthTicket")]
private delegate void FCancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket ); private static extern void _CancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
private FCancelAuthTicket _CancelAuthTicket;
#endregion #endregion
internal void CancelAuthTicket( HAuthTicket hAuthTicket ) internal void CancelAuthTicket( HAuthTicket hAuthTicket )
@ -233,9 +204,8 @@ internal void CancelAuthTicket( HAuthTicket hAuthTicket )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_UserHasLicenseForApp")]
private delegate UserHasLicenseForAppResult FUserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID ); private static extern UserHasLicenseForAppResult _UserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
private FUserHasLicenseForApp _UserHasLicenseForApp;
#endregion #endregion
internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID ) internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID )
@ -245,10 +215,9 @@ internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsBehindNAT")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsBehindNAT( IntPtr self ); private static extern bool _BIsBehindNAT( IntPtr self );
private FBIsBehindNAT _BIsBehindNAT;
#endregion #endregion
internal bool BIsBehindNAT() internal bool BIsBehindNAT()
@ -258,9 +227,8 @@ internal bool BIsBehindNAT()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_AdvertiseGame")]
private delegate void FAdvertiseGame( IntPtr self, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer ); private static extern void _AdvertiseGame( IntPtr self, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer );
private FAdvertiseGame _AdvertiseGame;
#endregion #endregion
internal void AdvertiseGame( SteamId steamIDGameServer, uint unIPServer, ushort usPortServer ) internal void AdvertiseGame( SteamId steamIDGameServer, uint unIPServer, ushort usPortServer )
@ -269,22 +237,20 @@ internal void AdvertiseGame( SteamId steamIDGameServer, uint unIPServer, ushort
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_RequestEncryptedAppTicket")]
private delegate SteamAPICall_t FRequestEncryptedAppTicket( IntPtr self, IntPtr pDataToInclude, int cbDataToInclude ); private static extern SteamAPICall_t _RequestEncryptedAppTicket( IntPtr self, IntPtr pDataToInclude, int cbDataToInclude );
private FRequestEncryptedAppTicket _RequestEncryptedAppTicket;
#endregion #endregion
internal async Task<EncryptedAppTicketResponse_t?> RequestEncryptedAppTicket( IntPtr pDataToInclude, int cbDataToInclude ) internal CallbackResult RequestEncryptedAppTicket( IntPtr pDataToInclude, int cbDataToInclude )
{ {
var returnValue = _RequestEncryptedAppTicket( Self, pDataToInclude, cbDataToInclude ); var returnValue = _RequestEncryptedAppTicket( Self, pDataToInclude, cbDataToInclude );
return await EncryptedAppTicketResponse_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetEncryptedAppTicket")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetEncryptedAppTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ); private static extern bool _GetEncryptedAppTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
private FGetEncryptedAppTicket _GetEncryptedAppTicket;
#endregion #endregion
internal bool GetEncryptedAppTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket ) internal bool GetEncryptedAppTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
@ -294,9 +260,8 @@ internal bool GetEncryptedAppTicket( IntPtr pTicket, int cbMaxTicket, ref uint p
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetGameBadgeLevel")]
private delegate int FGetGameBadgeLevel( IntPtr self, int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil ); private static extern int _GetGameBadgeLevel( IntPtr self, int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil );
private FGetGameBadgeLevel _GetGameBadgeLevel;
#endregion #endregion
internal int GetGameBadgeLevel( int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil ) internal int GetGameBadgeLevel( int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil )
@ -306,9 +271,8 @@ internal int GetGameBadgeLevel( int nSeries, [MarshalAs( UnmanagedType.U1 )] boo
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetPlayerSteamLevel")]
private delegate int FGetPlayerSteamLevel( IntPtr self ); private static extern int _GetPlayerSteamLevel( IntPtr self );
private FGetPlayerSteamLevel _GetPlayerSteamLevel;
#endregion #endregion
internal int GetPlayerSteamLevel() internal int GetPlayerSteamLevel()
@ -318,22 +282,20 @@ internal int GetPlayerSteamLevel()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_RequestStoreAuthURL")]
private delegate SteamAPICall_t FRequestStoreAuthURL( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL ); private static extern SteamAPICall_t _RequestStoreAuthURL( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL );
private FRequestStoreAuthURL _RequestStoreAuthURL;
#endregion #endregion
internal async Task<StoreAuthURLResponse_t?> RequestStoreAuthURL( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL ) internal CallbackResult RequestStoreAuthURL( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL )
{ {
var returnValue = _RequestStoreAuthURL( Self, pchRedirectURL ); var returnValue = _RequestStoreAuthURL( Self, pchRedirectURL );
return await StoreAuthURLResponse_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneVerified")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsPhoneVerified( IntPtr self ); private static extern bool _BIsPhoneVerified( IntPtr self );
private FBIsPhoneVerified _BIsPhoneVerified;
#endregion #endregion
internal bool BIsPhoneVerified() internal bool BIsPhoneVerified()
@ -343,10 +305,9 @@ internal bool BIsPhoneVerified()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsTwoFactorEnabled")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsTwoFactorEnabled( IntPtr self ); private static extern bool _BIsTwoFactorEnabled( IntPtr self );
private FBIsTwoFactorEnabled _BIsTwoFactorEnabled;
#endregion #endregion
internal bool BIsTwoFactorEnabled() internal bool BIsTwoFactorEnabled()
@ -356,10 +317,9 @@ internal bool BIsTwoFactorEnabled()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneIdentifying")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsPhoneIdentifying( IntPtr self ); private static extern bool _BIsPhoneIdentifying( IntPtr self );
private FBIsPhoneIdentifying _BIsPhoneIdentifying;
#endregion #endregion
internal bool BIsPhoneIdentifying() internal bool BIsPhoneIdentifying()
@ -369,10 +329,9 @@ internal bool BIsPhoneIdentifying()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneRequiringVerification")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsPhoneRequiringVerification( IntPtr self ); private static extern bool _BIsPhoneRequiringVerification( IntPtr self );
private FBIsPhoneRequiringVerification _BIsPhoneRequiringVerification;
#endregion #endregion
internal bool BIsPhoneRequiringVerification() internal bool BIsPhoneRequiringVerification()
@ -382,15 +341,14 @@ internal bool BIsPhoneRequiringVerification()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetMarketEligibility")]
private delegate SteamAPICall_t FGetMarketEligibility( IntPtr self ); private static extern SteamAPICall_t _GetMarketEligibility( IntPtr self );
private FGetMarketEligibility _GetMarketEligibility;
#endregion #endregion
internal async Task<MarketEligibilityResponse_t?> GetMarketEligibility() internal CallbackResult GetMarketEligibility()
{ {
var returnValue = _GetMarketEligibility( Self ); var returnValue = _GetMarketEligibility( Self );
return await MarketEligibilityResponse_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
} }

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamUserStats : SteamInterface internal class ISteamUserStats : SteamInterface
{ {
public override string InterfaceName => "STEAMUSERSTATS_INTERFACE_VERSION011";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,10 +19,9 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestCurrentStats")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRequestCurrentStats( IntPtr self ); private static extern bool _RequestCurrentStats( IntPtr self );
private FRequestCurrentStats _RequestCurrentStats;
#endregion #endregion
internal bool RequestCurrentStats() internal bool RequestCurrentStats()
@ -34,62 +31,57 @@ internal bool RequestCurrentStats()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetStat")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ); private static extern bool _GetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
private FGetStat1 _GetStat1;
#endregion #endregion
internal bool GetStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ) internal bool GetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
{ {
var returnValue = _GetStat1( Self, pchName, ref pData ); var returnValue = _GetStat( Self, pchName, ref pData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetStat0")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ); private static extern bool _GetStat0( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
private FGetStat2 _GetStat2;
#endregion #endregion
internal bool GetStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ) internal bool GetStat0( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
{ {
var returnValue = _GetStat2( Self, pchName, ref pData ); var returnValue = _GetStat0( Self, pchName, ref pData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetStat")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ); private static extern bool _SetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
private FSetStat1 _SetStat1;
#endregion #endregion
internal bool SetStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData ) internal bool SetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
{ {
var returnValue = _SetStat1( Self, pchName, nData ); var returnValue = _SetStat( Self, pchName, nData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetStat")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ); private static extern bool _SetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
private FSetStat2 _SetStat2;
#endregion #endregion
internal bool SetStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData ) internal bool SetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
{ {
var returnValue = _SetStat2( Self, pchName, fData ); var returnValue = _SetStat( Self, pchName, fData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_UpdateAvgRateStat")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FUpdateAvgRateStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength ); private static extern bool _UpdateAvgRateStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
private FUpdateAvgRateStat _UpdateAvgRateStat;
#endregion #endregion
internal bool UpdateAvgRateStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength ) internal bool UpdateAvgRateStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength )
@ -99,10 +91,9 @@ internal bool UpdateAvgRateStat( [MarshalAs( UnmanagedType.CustomMarshaler, Mars
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievement")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
private FGetAchievement _GetAchievement;
#endregion #endregion
internal bool GetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ) internal bool GetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
@ -112,10 +103,9 @@ internal bool GetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, Marshal
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetAchievement")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); private static extern bool _SetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
private FSetAchievement _SetAchievement;
#endregion #endregion
internal bool SetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ) internal bool SetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@ -125,10 +115,9 @@ internal bool SetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, Marshal
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_ClearAchievement")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FClearAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); private static extern bool _ClearAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
private FClearAchievement _ClearAchievement;
#endregion #endregion
internal bool ClearAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ) internal bool ClearAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@ -138,10 +127,9 @@ internal bool ClearAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, Marsh
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAndUnlockTime")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetAchievementAndUnlockTime( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime );
private FGetAchievementAndUnlockTime _GetAchievementAndUnlockTime;
#endregion #endregion
internal bool GetAchievementAndUnlockTime( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime ) internal bool GetAchievementAndUnlockTime( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime )
@ -151,10 +139,9 @@ internal bool GetAchievementAndUnlockTime( [MarshalAs( UnmanagedType.CustomMarsh
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_StoreStats")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FStoreStats( IntPtr self ); private static extern bool _StoreStats( IntPtr self );
private FStoreStats _StoreStats;
#endregion #endregion
internal bool StoreStats() internal bool StoreStats()
@ -164,9 +151,8 @@ internal bool StoreStats()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementIcon")]
private delegate int FGetAchievementIcon( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ); private static extern int _GetAchievementIcon( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
private FGetAchievementIcon _GetAchievementIcon;
#endregion #endregion
internal int GetAchievementIcon( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName ) internal int GetAchievementIcon( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@ -176,9 +162,8 @@ internal int GetAchievementIcon( [MarshalAs( UnmanagedType.CustomMarshaler, Mars
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementDisplayAttribute")]
private delegate Utf8StringPointer FGetAchievementDisplayAttribute( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ); private static extern Utf8StringPointer _GetAchievementDisplayAttribute( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
private FGetAchievementDisplayAttribute _GetAchievementDisplayAttribute;
#endregion #endregion
internal string GetAchievementDisplayAttribute( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey ) internal string GetAchievementDisplayAttribute( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
@ -188,10 +173,9 @@ internal string GetAchievementDisplayAttribute( [MarshalAs( UnmanagedType.Custom
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_IndicateAchievementProgress")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIndicateAchievementProgress( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress ); private static extern bool _IndicateAchievementProgress( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress );
private FIndicateAchievementProgress _IndicateAchievementProgress;
#endregion #endregion
internal bool IndicateAchievementProgress( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress ) internal bool IndicateAchievementProgress( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress )
@ -201,9 +185,8 @@ internal bool IndicateAchievementProgress( [MarshalAs( UnmanagedType.CustomMarsh
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNumAchievements")]
private delegate uint FGetNumAchievements( IntPtr self ); private static extern uint _GetNumAchievements( IntPtr self );
private FGetNumAchievements _GetNumAchievements;
#endregion #endregion
internal uint GetNumAchievements() internal uint GetNumAchievements()
@ -213,9 +196,8 @@ internal uint GetNumAchievements()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementName")]
private delegate Utf8StringPointer FGetAchievementName( IntPtr self, uint iAchievement ); private static extern Utf8StringPointer _GetAchievementName( IntPtr self, uint iAchievement );
private FGetAchievementName _GetAchievementName;
#endregion #endregion
internal string GetAchievementName( uint iAchievement ) internal string GetAchievementName( uint iAchievement )
@ -225,48 +207,44 @@ internal string GetAchievementName( uint iAchievement )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestUserStats")]
private delegate SteamAPICall_t FRequestUserStats( IntPtr self, SteamId steamIDUser ); private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser );
private FRequestUserStats _RequestUserStats;
#endregion #endregion
internal async Task<UserStatsReceived_t?> RequestUserStats( SteamId steamIDUser ) internal CallbackResult RequestUserStats( SteamId steamIDUser )
{ {
var returnValue = _RequestUserStats( Self, steamIDUser ); var returnValue = _RequestUserStats( Self, steamIDUser );
return await UserStatsReceived_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStat")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ); private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
private FGetUserStat1 _GetUserStat1;
#endregion #endregion
internal bool GetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData ) internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
{ {
var returnValue = _GetUserStat1( Self, steamIDUser, pchName, ref pData ); var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStat0")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ); private static extern bool _GetUserStat0( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
private FGetUserStat2 _GetUserStat2;
#endregion #endregion
internal bool GetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData ) internal bool GetUserStat0( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
{ {
var returnValue = _GetUserStat2( Self, steamIDUser, pchName, ref pData ); var returnValue = _GetUserStat0( Self, steamIDUser, pchName, ref pData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievement")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
private FGetUserAchievement _GetUserAchievement;
#endregion #endregion
internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ) internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
@ -276,10 +254,9 @@ internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievementAndUnlockTime")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetUserAchievementAndUnlockTime( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime );
private FGetUserAchievementAndUnlockTime _GetUserAchievementAndUnlockTime;
#endregion #endregion
internal bool GetUserAchievementAndUnlockTime( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime ) internal bool GetUserAchievementAndUnlockTime( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime )
@ -289,10 +266,9 @@ internal bool GetUserAchievementAndUnlockTime( SteamId steamIDUser, [MarshalAs(
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_ResetAllStats")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FResetAllStats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo ); private static extern bool _ResetAllStats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo );
private FResetAllStats _ResetAllStats;
#endregion #endregion
internal bool ResetAllStats( [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo ) internal bool ResetAllStats( [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo )
@ -302,33 +278,30 @@ internal bool ResetAllStats( [MarshalAs( UnmanagedType.U1 )] bool bAchievementsT
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_FindOrCreateLeaderboard")]
private delegate SteamAPICall_t FFindOrCreateLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType ); private static extern SteamAPICall_t _FindOrCreateLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType );
private FFindOrCreateLeaderboard _FindOrCreateLeaderboard;
#endregion #endregion
internal async Task<LeaderboardFindResult_t?> FindOrCreateLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType ) internal CallbackResult FindOrCreateLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType )
{ {
var returnValue = _FindOrCreateLeaderboard( Self, pchLeaderboardName, eLeaderboardSortMethod, eLeaderboardDisplayType ); var returnValue = _FindOrCreateLeaderboard( Self, pchLeaderboardName, eLeaderboardSortMethod, eLeaderboardDisplayType );
return await LeaderboardFindResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_FindLeaderboard")]
private delegate SteamAPICall_t FFindLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName ); private static extern SteamAPICall_t _FindLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName );
private FFindLeaderboard _FindLeaderboard;
#endregion #endregion
internal async Task<LeaderboardFindResult_t?> FindLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName ) internal CallbackResult FindLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName )
{ {
var returnValue = _FindLeaderboard( Self, pchLeaderboardName ); var returnValue = _FindLeaderboard( Self, pchLeaderboardName );
return await LeaderboardFindResult_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardName")]
private delegate Utf8StringPointer FGetLeaderboardName( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); private static extern Utf8StringPointer _GetLeaderboardName( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
private FGetLeaderboardName _GetLeaderboardName;
#endregion #endregion
internal string GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard ) internal string GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard )
@ -338,9 +311,8 @@ internal string GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardEntryCount")]
private delegate int FGetLeaderboardEntryCount( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); private static extern int _GetLeaderboardEntryCount( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
private FGetLeaderboardEntryCount _GetLeaderboardEntryCount;
#endregion #endregion
internal int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard ) internal int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard )
@ -350,9 +322,8 @@ internal int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardSortMethod")]
private delegate LeaderboardSort FGetLeaderboardSortMethod( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); private static extern LeaderboardSort _GetLeaderboardSortMethod( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
private FGetLeaderboardSortMethod _GetLeaderboardSortMethod;
#endregion #endregion
internal LeaderboardSort GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard ) internal LeaderboardSort GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard )
@ -362,9 +333,8 @@ internal LeaderboardSort GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLead
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardDisplayType")]
private delegate LeaderboardDisplay FGetLeaderboardDisplayType( IntPtr self, SteamLeaderboard_t hSteamLeaderboard ); private static extern LeaderboardDisplay _GetLeaderboardDisplayType( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
private FGetLeaderboardDisplayType _GetLeaderboardDisplayType;
#endregion #endregion
internal LeaderboardDisplay GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard ) internal LeaderboardDisplay GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard )
@ -374,34 +344,31 @@ internal LeaderboardDisplay GetLeaderboardDisplayType( SteamLeaderboard_t hSteam
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntries")]
private delegate SteamAPICall_t FDownloadLeaderboardEntries( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ); private static extern SteamAPICall_t _DownloadLeaderboardEntries( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd );
private FDownloadLeaderboardEntries _DownloadLeaderboardEntries;
#endregion #endregion
internal async Task<LeaderboardScoresDownloaded_t?> DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) internal CallbackResult DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd )
{ {
var returnValue = _DownloadLeaderboardEntries( Self, hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd ); var returnValue = _DownloadLeaderboardEntries( Self, hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd );
return await LeaderboardScoresDownloaded_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntriesForUsers")]
private delegate SteamAPICall_t FDownloadLeaderboardEntriesForUsers( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers ); private static extern SteamAPICall_t _DownloadLeaderboardEntriesForUsers( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers );
private FDownloadLeaderboardEntriesForUsers _DownloadLeaderboardEntriesForUsers;
#endregion #endregion
internal async Task<LeaderboardScoresDownloaded_t?> DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers ) internal CallbackResult DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers )
{ {
var returnValue = _DownloadLeaderboardEntriesForUsers( Self, hSteamLeaderboard, prgUsers, cUsers ); var returnValue = _DownloadLeaderboardEntriesForUsers( Self, hSteamLeaderboard, prgUsers, cUsers );
return await LeaderboardScoresDownloaded_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetDownloadedLeaderboardEntry")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetDownloadedLeaderboardEntry( IntPtr self, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax );
private FGetDownloadedLeaderboardEntry _GetDownloadedLeaderboardEntry;
#endregion #endregion
internal bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax ) internal bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax )
@ -411,57 +378,52 @@ internal bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLea
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_UploadLeaderboardScore")]
private delegate SteamAPICall_t FUploadLeaderboardScore( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount ); private static extern SteamAPICall_t _UploadLeaderboardScore( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount );
private FUploadLeaderboardScore _UploadLeaderboardScore;
#endregion #endregion
internal async Task<LeaderboardScoreUploaded_t?> UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount ) internal CallbackResult UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount )
{ {
var returnValue = _UploadLeaderboardScore( Self, hSteamLeaderboard, eLeaderboardUploadScoreMethod, nScore, pScoreDetails, cScoreDetailsCount ); var returnValue = _UploadLeaderboardScore( Self, hSteamLeaderboard, eLeaderboardUploadScoreMethod, nScore, pScoreDetails, cScoreDetailsCount );
return await LeaderboardScoreUploaded_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_AttachLeaderboardUGC")]
private delegate SteamAPICall_t FAttachLeaderboardUGC( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ); private static extern SteamAPICall_t _AttachLeaderboardUGC( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC );
private FAttachLeaderboardUGC _AttachLeaderboardUGC;
#endregion #endregion
internal async Task<LeaderboardUGCSet_t?> AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) internal CallbackResult AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC )
{ {
var returnValue = _AttachLeaderboardUGC( Self, hSteamLeaderboard, hUGC ); var returnValue = _AttachLeaderboardUGC( Self, hSteamLeaderboard, hUGC );
return await LeaderboardUGCSet_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNumberOfCurrentPlayers")]
private delegate SteamAPICall_t FGetNumberOfCurrentPlayers( IntPtr self ); private static extern SteamAPICall_t _GetNumberOfCurrentPlayers( IntPtr self );
private FGetNumberOfCurrentPlayers _GetNumberOfCurrentPlayers;
#endregion #endregion
internal async Task<NumberOfCurrentPlayers_t?> GetNumberOfCurrentPlayers() internal CallbackResult GetNumberOfCurrentPlayers()
{ {
var returnValue = _GetNumberOfCurrentPlayers( Self ); var returnValue = _GetNumberOfCurrentPlayers( Self );
return await NumberOfCurrentPlayers_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalAchievementPercentages")]
private delegate SteamAPICall_t FRequestGlobalAchievementPercentages( IntPtr self ); private static extern SteamAPICall_t _RequestGlobalAchievementPercentages( IntPtr self );
private FRequestGlobalAchievementPercentages _RequestGlobalAchievementPercentages;
#endregion #endregion
internal async Task<GlobalAchievementPercentagesReady_t?> RequestGlobalAchievementPercentages() internal CallbackResult RequestGlobalAchievementPercentages()
{ {
var returnValue = _RequestGlobalAchievementPercentages( Self ); var returnValue = _RequestGlobalAchievementPercentages( Self );
return await GlobalAchievementPercentagesReady_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetMostAchievedAchievementInfo")]
private delegate int FGetMostAchievedAchievementInfo( IntPtr self, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); private static extern int _GetMostAchievedAchievementInfo( IntPtr self, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
private FGetMostAchievedAchievementInfo _GetMostAchievedAchievementInfo;
#endregion #endregion
internal int GetMostAchievedAchievementInfo( out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ) internal int GetMostAchievedAchievementInfo( out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
@ -473,9 +435,8 @@ internal int GetMostAchievedAchievementInfo( out string pchName, ref float pflPe
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNextMostAchievedAchievementInfo")]
private delegate int FGetNextMostAchievedAchievementInfo( IntPtr self, int iIteratorPrevious, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ); private static extern int _GetNextMostAchievedAchievementInfo( IntPtr self, int iIteratorPrevious, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
private FGetNextMostAchievedAchievementInfo _GetNextMostAchievedAchievementInfo;
#endregion #endregion
internal int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved ) internal int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
@ -487,10 +448,9 @@ internal int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, out stri
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAchievedPercent")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetAchievementAchievedPercent( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent ); private static extern bool _GetAchievementAchievedPercent( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent );
private FGetAchievementAchievedPercent _GetAchievementAchievedPercent;
#endregion #endregion
internal bool GetAchievementAchievedPercent( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent ) internal bool GetAchievementAchievedPercent( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent )
@ -500,64 +460,59 @@ internal bool GetAchievementAchievedPercent( [MarshalAs( UnmanagedType.CustomMar
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalStats")]
private delegate SteamAPICall_t FRequestGlobalStats( IntPtr self, int nHistoryDays ); private static extern SteamAPICall_t _RequestGlobalStats( IntPtr self, int nHistoryDays );
private FRequestGlobalStats _RequestGlobalStats;
#endregion #endregion
internal async Task<GlobalStatsReceived_t?> RequestGlobalStats( int nHistoryDays ) internal CallbackResult RequestGlobalStats( int nHistoryDays )
{ {
var returnValue = _RequestGlobalStats( Self, nHistoryDays ); var returnValue = _RequestGlobalStats( Self, nHistoryDays );
return await GlobalStatsReceived_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStat")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetGlobalStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData ); private static extern bool _GetGlobalStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData );
private FGetGlobalStat1 _GetGlobalStat1;
#endregion #endregion
internal bool GetGlobalStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData ) internal bool GetGlobalStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData )
{ {
var returnValue = _GetGlobalStat1( Self, pchStatName, ref pData ); var returnValue = _GetGlobalStat( Self, pchStatName, ref pData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStat0")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetGlobalStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData ); private static extern bool _GetGlobalStat0( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData );
private FGetGlobalStat2 _GetGlobalStat2;
#endregion #endregion
internal bool GetGlobalStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData ) internal bool GetGlobalStat0( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData )
{ {
var returnValue = _GetGlobalStat2( Self, pchStatName, ref pData ); var returnValue = _GetGlobalStat0( Self, pchStatName, ref pData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistory")]
private delegate int FGetGlobalStatHistory1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData ); private static extern int _GetGlobalStatHistory( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData );
private FGetGlobalStatHistory1 _GetGlobalStatHistory1;
#endregion #endregion
internal int GetGlobalStatHistory1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData ) internal int GetGlobalStatHistory( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData )
{ {
var returnValue = _GetGlobalStatHistory1( Self, pchStatName, pData, cubData ); var returnValue = _GetGlobalStatHistory( Self, pchStatName, pData, cubData );
return returnValue; return returnValue;
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistory0")]
private delegate int FGetGlobalStatHistory2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData ); private static extern int _GetGlobalStatHistory0( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData );
private FGetGlobalStatHistory2 _GetGlobalStatHistory2;
#endregion #endregion
internal int GetGlobalStatHistory2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData ) internal int GetGlobalStatHistory0( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData )
{ {
var returnValue = _GetGlobalStatHistory2( Self, pchStatName, pData, cubData ); var returnValue = _GetGlobalStatHistory0( Self, pchStatName, pData, cubData );
return returnValue; return returnValue;
} }

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamUtils : SteamInterface internal class ISteamUtils : SteamInterface
{ {
public override string InterfaceName => "SteamUtils009";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,9 +19,8 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceAppActive")]
private delegate uint FGetSecondsSinceAppActive( IntPtr self ); private static extern uint _GetSecondsSinceAppActive( IntPtr self );
private FGetSecondsSinceAppActive _GetSecondsSinceAppActive;
#endregion #endregion
internal uint GetSecondsSinceAppActive() internal uint GetSecondsSinceAppActive()
@ -33,9 +30,8 @@ internal uint GetSecondsSinceAppActive()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceComputerActive")]
private delegate uint FGetSecondsSinceComputerActive( IntPtr self ); private static extern uint _GetSecondsSinceComputerActive( IntPtr self );
private FGetSecondsSinceComputerActive _GetSecondsSinceComputerActive;
#endregion #endregion
internal uint GetSecondsSinceComputerActive() internal uint GetSecondsSinceComputerActive()
@ -45,9 +41,8 @@ internal uint GetSecondsSinceComputerActive()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetConnectedUniverse")]
private delegate Universe FGetConnectedUniverse( IntPtr self ); private static extern Universe _GetConnectedUniverse( IntPtr self );
private FGetConnectedUniverse _GetConnectedUniverse;
#endregion #endregion
internal Universe GetConnectedUniverse() internal Universe GetConnectedUniverse()
@ -57,9 +52,8 @@ internal Universe GetConnectedUniverse()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetServerRealTime")]
private delegate uint FGetServerRealTime( IntPtr self ); private static extern uint _GetServerRealTime( IntPtr self );
private FGetServerRealTime _GetServerRealTime;
#endregion #endregion
internal uint GetServerRealTime() internal uint GetServerRealTime()
@ -69,9 +63,8 @@ internal uint GetServerRealTime()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetIPCountry")]
private delegate Utf8StringPointer FGetIPCountry( IntPtr self ); private static extern Utf8StringPointer _GetIPCountry( IntPtr self );
private FGetIPCountry _GetIPCountry;
#endregion #endregion
internal string GetIPCountry() internal string GetIPCountry()
@ -81,10 +74,9 @@ internal string GetIPCountry()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetImageSize")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetImageSize( IntPtr self, int iImage, ref uint pnWidth, ref uint pnHeight ); private static extern bool _GetImageSize( IntPtr self, int iImage, ref uint pnWidth, ref uint pnHeight );
private FGetImageSize _GetImageSize;
#endregion #endregion
internal bool GetImageSize( int iImage, ref uint pnWidth, ref uint pnHeight ) internal bool GetImageSize( int iImage, ref uint pnWidth, ref uint pnHeight )
@ -94,10 +86,9 @@ internal bool GetImageSize( int iImage, ref uint pnWidth, ref uint pnHeight )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetImageRGBA")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetImageRGBA( IntPtr self, int iImage, [In,Out] byte[] pubDest, int nDestBufferSize ); private static extern bool _GetImageRGBA( IntPtr self, int iImage, [In,Out] byte[] pubDest, int nDestBufferSize );
private FGetImageRGBA _GetImageRGBA;
#endregion #endregion
internal bool GetImageRGBA( int iImage, [In,Out] byte[] pubDest, int nDestBufferSize ) internal bool GetImageRGBA( int iImage, [In,Out] byte[] pubDest, int nDestBufferSize )
@ -107,10 +98,9 @@ internal bool GetImageRGBA( int iImage, [In,Out] byte[] pubDest, int nDestBuffe
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetCSERIPPort")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetCSERIPPort( IntPtr self, ref uint unIP, ref ushort usPort ); private static extern bool _GetCSERIPPort( IntPtr self, ref uint unIP, ref ushort usPort );
private FGetCSERIPPort _GetCSERIPPort;
#endregion #endregion
internal bool GetCSERIPPort( ref uint unIP, ref ushort usPort ) internal bool GetCSERIPPort( ref uint unIP, ref ushort usPort )
@ -120,9 +110,8 @@ internal bool GetCSERIPPort( ref uint unIP, ref ushort usPort )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetCurrentBatteryPower")]
private delegate byte FGetCurrentBatteryPower( IntPtr self ); private static extern byte _GetCurrentBatteryPower( IntPtr self );
private FGetCurrentBatteryPower _GetCurrentBatteryPower;
#endregion #endregion
internal byte GetCurrentBatteryPower() internal byte GetCurrentBatteryPower()
@ -132,9 +121,8 @@ internal byte GetCurrentBatteryPower()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAppID")]
private delegate uint FGetAppID( IntPtr self ); private static extern uint _GetAppID( IntPtr self );
private FGetAppID _GetAppID;
#endregion #endregion
internal uint GetAppID() internal uint GetAppID()
@ -144,9 +132,8 @@ internal uint GetAppID()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetOverlayNotificationPosition")]
private delegate void FSetOverlayNotificationPosition( IntPtr self, NotificationPosition eNotificationPosition ); private static extern void _SetOverlayNotificationPosition( IntPtr self, NotificationPosition eNotificationPosition );
private FSetOverlayNotificationPosition _SetOverlayNotificationPosition;
#endregion #endregion
internal void SetOverlayNotificationPosition( NotificationPosition eNotificationPosition ) internal void SetOverlayNotificationPosition( NotificationPosition eNotificationPosition )
@ -155,10 +142,9 @@ internal void SetOverlayNotificationPosition( NotificationPosition eNotification
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsAPICallCompleted")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsAPICallCompleted( IntPtr self, SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed ); private static extern bool _IsAPICallCompleted( IntPtr self, SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed );
private FIsAPICallCompleted _IsAPICallCompleted;
#endregion #endregion
internal bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed ) internal bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed )
@ -168,9 +154,8 @@ internal bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, [MarshalAs( Unma
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAPICallFailureReason")]
private delegate SteamAPICallFailure FGetAPICallFailureReason( IntPtr self, SteamAPICall_t hSteamAPICall ); private static extern SteamAPICallFailure _GetAPICallFailureReason( IntPtr self, SteamAPICall_t hSteamAPICall );
private FGetAPICallFailureReason _GetAPICallFailureReason;
#endregion #endregion
internal SteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall ) internal SteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall )
@ -180,10 +165,9 @@ internal SteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICa
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAPICallResult")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _GetAPICallResult( IntPtr self, SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed );
private FGetAPICallResult _GetAPICallResult;
#endregion #endregion
internal bool GetAPICallResult( SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed ) internal bool GetAPICallResult( SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed )
@ -193,20 +177,8 @@ internal bool GetAPICallResult( SteamAPICall_t hSteamAPICall, IntPtr pCallback,
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetIPCCallCount")]
private delegate void FRunFrame( IntPtr self ); private static extern uint _GetIPCCallCount( 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 #endregion
internal uint GetIPCCallCount() internal uint GetIPCCallCount()
@ -216,9 +188,8 @@ internal uint GetIPCCallCount()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetWarningMessageHook")]
private delegate void FSetWarningMessageHook( IntPtr self, IntPtr pFunction ); private static extern void _SetWarningMessageHook( IntPtr self, IntPtr pFunction );
private FSetWarningMessageHook _SetWarningMessageHook;
#endregion #endregion
internal void SetWarningMessageHook( IntPtr pFunction ) internal void SetWarningMessageHook( IntPtr pFunction )
@ -227,10 +198,9 @@ internal void SetWarningMessageHook( IntPtr pFunction )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsOverlayEnabled")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsOverlayEnabled( IntPtr self ); private static extern bool _IsOverlayEnabled( IntPtr self );
private FIsOverlayEnabled _IsOverlayEnabled;
#endregion #endregion
internal bool IsOverlayEnabled() internal bool IsOverlayEnabled()
@ -240,10 +210,9 @@ internal bool IsOverlayEnabled()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_BOverlayNeedsPresent")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBOverlayNeedsPresent( IntPtr self ); private static extern bool _BOverlayNeedsPresent( IntPtr self );
private FBOverlayNeedsPresent _BOverlayNeedsPresent;
#endregion #endregion
internal bool BOverlayNeedsPresent() internal bool BOverlayNeedsPresent()
@ -253,22 +222,20 @@ internal bool BOverlayNeedsPresent()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_CheckFileSignature")]
private delegate SteamAPICall_t FCheckFileSignature( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName ); private static extern SteamAPICall_t _CheckFileSignature( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName );
private FCheckFileSignature _CheckFileSignature;
#endregion #endregion
internal async Task<CheckFileSignature_t?> CheckFileSignature( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName ) internal CallbackResult CheckFileSignature( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName )
{ {
var returnValue = _CheckFileSignature( Self, szFileName ); var returnValue = _CheckFileSignature( Self, szFileName );
return await CheckFileSignature_t.GetResultAsync( returnValue ); return new CallbackResult( returnValue );
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_ShowGamepadTextInput")]
[return: MarshalAs( UnmanagedType.I1 )] [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 static extern bool _ShowGamepadTextInput( IntPtr self, GamepadTextInputMode eInputMode, GamepadTextInputLineMode eLineInputMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription, uint unCharMax, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExistingText );
private FShowGamepadTextInput _ShowGamepadTextInput;
#endregion #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 ) 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 )
@ -278,9 +245,8 @@ internal bool ShowGamepadTextInput( GamepadTextInputMode eInputMode, GamepadText
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetEnteredGamepadTextLength")]
private delegate uint FGetEnteredGamepadTextLength( IntPtr self ); private static extern uint _GetEnteredGamepadTextLength( IntPtr self );
private FGetEnteredGamepadTextLength _GetEnteredGamepadTextLength;
#endregion #endregion
internal uint GetEnteredGamepadTextLength() internal uint GetEnteredGamepadTextLength()
@ -290,10 +256,9 @@ internal uint GetEnteredGamepadTextLength()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetEnteredGamepadTextInput")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetEnteredGamepadTextInput( IntPtr self, IntPtr pchText, uint cchText ); private static extern bool _GetEnteredGamepadTextInput( IntPtr self, IntPtr pchText, uint cchText );
private FGetEnteredGamepadTextInput _GetEnteredGamepadTextInput;
#endregion #endregion
internal bool GetEnteredGamepadTextInput( out string pchText ) internal bool GetEnteredGamepadTextInput( out string pchText )
@ -305,9 +270,8 @@ internal bool GetEnteredGamepadTextInput( out string pchText )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSteamUILanguage")]
private delegate Utf8StringPointer FGetSteamUILanguage( IntPtr self ); private static extern Utf8StringPointer _GetSteamUILanguage( IntPtr self );
private FGetSteamUILanguage _GetSteamUILanguage;
#endregion #endregion
internal string GetSteamUILanguage() internal string GetSteamUILanguage()
@ -317,10 +281,9 @@ internal string GetSteamUILanguage()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamRunningInVR")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsSteamRunningInVR( IntPtr self ); private static extern bool _IsSteamRunningInVR( IntPtr self );
private FIsSteamRunningInVR _IsSteamRunningInVR;
#endregion #endregion
internal bool IsSteamRunningInVR() internal bool IsSteamRunningInVR()
@ -330,9 +293,8 @@ internal bool IsSteamRunningInVR()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetOverlayNotificationInset")]
private delegate void FSetOverlayNotificationInset( IntPtr self, int nHorizontalInset, int nVerticalInset ); private static extern void _SetOverlayNotificationInset( IntPtr self, int nHorizontalInset, int nVerticalInset );
private FSetOverlayNotificationInset _SetOverlayNotificationInset;
#endregion #endregion
internal void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset ) internal void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset )
@ -341,10 +303,9 @@ internal void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalIn
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamInBigPictureMode")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsSteamInBigPictureMode( IntPtr self ); private static extern bool _IsSteamInBigPictureMode( IntPtr self );
private FIsSteamInBigPictureMode _IsSteamInBigPictureMode;
#endregion #endregion
internal bool IsSteamInBigPictureMode() internal bool IsSteamInBigPictureMode()
@ -354,9 +315,8 @@ internal bool IsSteamInBigPictureMode()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_StartVRDashboard")]
private delegate void FStartVRDashboard( IntPtr self ); private static extern void _StartVRDashboard( IntPtr self );
private FStartVRDashboard _StartVRDashboard;
#endregion #endregion
internal void StartVRDashboard() internal void StartVRDashboard()
@ -365,10 +325,9 @@ internal void StartVRDashboard()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsVRHeadsetStreamingEnabled")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsVRHeadsetStreamingEnabled( IntPtr self ); private static extern bool _IsVRHeadsetStreamingEnabled( IntPtr self );
private FIsVRHeadsetStreamingEnabled _IsVRHeadsetStreamingEnabled;
#endregion #endregion
internal bool IsVRHeadsetStreamingEnabled() internal bool IsVRHeadsetStreamingEnabled()
@ -378,9 +337,8 @@ internal bool IsVRHeadsetStreamingEnabled()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetVRHeadsetStreamingEnabled")]
private delegate void FSetVRHeadsetStreamingEnabled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled ); private static extern void _SetVRHeadsetStreamingEnabled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled );
private FSetVRHeadsetStreamingEnabled _SetVRHeadsetStreamingEnabled;
#endregion #endregion
internal void SetVRHeadsetStreamingEnabled( [MarshalAs( UnmanagedType.U1 )] bool bEnabled ) internal void SetVRHeadsetStreamingEnabled( [MarshalAs( UnmanagedType.U1 )] bool bEnabled )

View File

@ -9,8 +9,6 @@ namespace Steamworks
{ {
internal class ISteamVideo : SteamInterface internal class ISteamVideo : SteamInterface
{ {
public override string InterfaceName => "STEAMVIDEO_INTERFACE_V002";
public override void InitInternals() public override void InitInternals()
{ {
} }
@ -21,9 +19,8 @@ internal override void Shutdown()
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetVideoURL")]
private delegate void FGetVideoURL( IntPtr self, AppId unVideoAppID ); private static extern void _GetVideoURL( IntPtr self, AppId unVideoAppID );
private FGetVideoURL _GetVideoURL;
#endregion #endregion
internal void GetVideoURL( AppId unVideoAppID ) internal void GetVideoURL( AppId unVideoAppID )
@ -32,10 +29,9 @@ internal void GetVideoURL( AppId unVideoAppID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_IsBroadcasting")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIsBroadcasting( IntPtr self, ref int pnNumViewers ); private static extern bool _IsBroadcasting( IntPtr self, ref int pnNumViewers );
private FIsBroadcasting _IsBroadcasting;
#endregion #endregion
internal bool IsBroadcasting( ref int pnNumViewers ) internal bool IsBroadcasting( ref int pnNumViewers )
@ -45,9 +41,8 @@ internal bool IsBroadcasting( ref int pnNumViewers )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetOPFSettings")]
private delegate void FGetOPFSettings( IntPtr self, AppId unVideoAppID ); private static extern void _GetOPFSettings( IntPtr self, AppId unVideoAppID );
private FGetOPFSettings _GetOPFSettings;
#endregion #endregion
internal void GetOPFSettings( AppId unVideoAppID ) internal void GetOPFSettings( AppId unVideoAppID )
@ -56,10 +51,9 @@ internal void GetOPFSettings( AppId unVideoAppID )
} }
#region FunctionMeta #region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )] [DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetOPFStringForApp")]
[return: MarshalAs( UnmanagedType.I1 )] [return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetOPFStringForApp( IntPtr self, AppId unVideoAppID, IntPtr pchBuffer, ref int pnBufferSize ); private static extern bool _GetOPFStringForApp( IntPtr self, AppId unVideoAppID, IntPtr pchBuffer, ref int pnBufferSize );
private FGetOPFStringForApp _GetOPFStringForApp;
#endregion #endregion
internal bool GetOPFStringForApp( AppId unVideoAppID, out string pchBuffer, ref int pnBufferSize ) internal bool GetOPFStringForApp( AppId unVideoAppID, out string pchBuffer, ref int pnBufferSize )

File diff suppressed because it is too large Load Diff

View File

@ -251,7 +251,7 @@ public static DownloadProgress DlcDownloadProgress( AppId appid )
/// </summary> /// </summary>
public static async Task<FileDetails?> GetFileDetailsAsync( string filename ) public static async Task<FileDetails?> GetFileDetailsAsync( string filename )
{ {
var r = await Internal.GetFileDetails( filename ); var r = await Internal.GetFileDetails( filename ).GetAsync<FileDetailsResult_t>();
if ( !r.HasValue || r.Value.Result != Result.OK ) if ( !r.HasValue || r.Value.Result != Result.OK )
return null; return null;

View File

@ -300,13 +300,13 @@ public static bool ListenForFriendsMessages
public static async Task<bool> IsFollowing(SteamId steamID) public static async Task<bool> IsFollowing(SteamId steamID)
{ {
var r = await Internal.IsFollowing(steamID); var r = await Internal.IsFollowing(steamID).GetAsync<FriendsIsFollowing_t>();
return r.Value.IsFollowing; return r.Value.IsFollowing;
} }
public static async Task<int> GetFollowerCount(SteamId steamID) public static async Task<int> GetFollowerCount(SteamId steamID)
{ {
var r = await Internal.GetFollowerCount(steamID); var r = await Internal.GetFollowerCount(steamID).GetAsync<FriendsGetFollowerCount_t>();
return r.Value.Count; return r.Value.Count;
} }
@ -319,7 +319,7 @@ public static async Task<SteamId[]> GetFollowingList()
do do
{ {
if ((result = await Internal.EnumerateFollowingList((uint)resultCount)) != null) if ( (result = await Internal.EnumerateFollowingList((uint)resultCount).GetAsync<FriendsEnumerateFollowingList_t>()) != null)
{ {
resultCount += result.Value.ResultsReturned; resultCount += result.Value.ResultsReturned;

View File

@ -28,7 +28,7 @@ internal static void Shutdown()
{ {
if ( _internal != null && _internal.IsValid ) if ( _internal != null && _internal.IsValid )
{ {
_internal.DoShutdown(); _internal.Shutdown();
} }
_internal = null; _internal = null;
@ -36,7 +36,7 @@ internal static void Shutdown()
internal static void InstallEvents() internal static void InstallEvents()
{ {
Internal.DoInit(); Internal.Init();
Internal.RunFrame(); Internal.RunFrame();
// None? // None?

View File

@ -47,7 +47,7 @@ public static async Task<Result> RequestUserStats( SteamId steamid )
/// </summary> /// </summary>
public static bool SetInt( SteamId steamid, string name, int stat ) public static bool SetInt( SteamId steamid, string name, int stat )
{ {
return Internal.SetUserStat1( steamid, name, stat ); return Internal.SetUserStat( steamid, name, stat );
} }
/// <summary> /// <summary>
@ -56,7 +56,7 @@ public static bool SetInt( SteamId steamid, string name, int stat )
/// </summary> /// </summary>
public static bool SetFloat( SteamId steamid, string name, float stat ) public static bool SetFloat( SteamId steamid, string name, float stat )
{ {
return Internal.SetUserStat2( steamid, name, stat ); return Internal.SetUserStat( steamid, name, stat );
} }
/// <summary> /// <summary>

View File

@ -130,8 +130,8 @@ public DateTime Acquired
{ {
if ( Properties == null ) return DateTime.UtcNow; if ( Properties == null ) return DateTime.UtcNow;
var str = Properties["acquired"]; if ( Properties.TryGetValue( "acquired", out var str ) )
{
var y = int.Parse( str.Substring( 0, 4 ) ); var y = int.Parse( str.Substring( 0, 4 ) );
var m = int.Parse( str.Substring( 4, 2 ) ); var m = int.Parse( str.Substring( 4, 2 ) );
var d = int.Parse( str.Substring( 6, 2 ) ); var d = int.Parse( str.Substring( 6, 2 ) );
@ -142,6 +142,9 @@ public DateTime Acquired
return new DateTime( y, m, d, h, mn, s, DateTimeKind.Utc ); return new DateTime( y, m, d, h, mn, s, DateTimeKind.Utc );
} }
return DateTime.UtcNow;
}
} }
/// <summary> /// <summary>
@ -153,7 +156,11 @@ public string Origin
get get
{ {
if ( Properties == null ) return null; if ( Properties == null ) return null;
return Properties["origin"];
if ( Properties.TryGetValue( "origin", out var str ) )
return str;
return null;
} }
} }

View File

@ -28,7 +28,7 @@ public struct Leaderboard
{ {
if ( details == null ) details = noDetails; if ( details == null ) details = noDetails;
var r = await SteamUserStats.Internal.UploadLeaderboardScore( Id, LeaderboardUploadScoreMethod.ForceUpdate, score, details, details.Length ); var r = await SteamUserStats.Internal.UploadLeaderboardScore( Id, LeaderboardUploadScoreMethod.ForceUpdate, score, details, details.Length ).GetAsync<LeaderboardScoreUploaded_t>();
if ( !r.HasValue ) return null; if ( !r.HasValue ) return null;
return LeaderboardUpdate.From( r.Value ); return LeaderboardUpdate.From( r.Value );
@ -41,7 +41,7 @@ public struct Leaderboard
{ {
if ( details == null ) details = noDetails; if ( details == null ) details = noDetails;
var r = await SteamUserStats.Internal.UploadLeaderboardScore( Id, LeaderboardUploadScoreMethod.KeepBest, score, details, details.Length ); var r = await SteamUserStats.Internal.UploadLeaderboardScore( Id, LeaderboardUploadScoreMethod.KeepBest, score, details, details.Length ).GetAsync<LeaderboardScoreUploaded_t>();
if ( !r.HasValue ) return null; if ( !r.HasValue ) return null;
return LeaderboardUpdate.From( r.Value ); return LeaderboardUpdate.From( r.Value );
@ -52,7 +52,7 @@ public struct Leaderboard
/// </summary> /// </summary>
public async Task<Result> AttachUgc( Ugc file ) public async Task<Result> AttachUgc( Ugc file )
{ {
var r = await SteamUserStats.Internal.AttachLeaderboardUGC( Id, file.Handle ); var r = await SteamUserStats.Internal.AttachLeaderboardUGC( Id, file.Handle ).GetAsync<LeaderboardUGCSet_t>();
if ( !r.HasValue ) return Result.Fail; if ( !r.HasValue ) return Result.Fail;
return r.Value.Result; return r.Value.Result;
@ -65,7 +65,7 @@ public async Task<LeaderboardEntry[]> GetScoresAsync( int count, int offset = 1
{ {
if ( offset <= 0 ) throw new System.ArgumentException( "Should be 1+", nameof( offset ) ); if ( offset <= 0 ) throw new System.ArgumentException( "Should be 1+", nameof( offset ) );
var r = await SteamUserStats.Internal.DownloadLeaderboardEntries( Id, LeaderboardDataRequest.Global, offset, offset + count ); var r = await SteamUserStats.Internal.DownloadLeaderboardEntries( Id, LeaderboardDataRequest.Global, offset, offset + count ).GetAsync<LeaderboardScoresDownloaded_t>();
if ( !r.HasValue ) if ( !r.HasValue )
return null; return null;
@ -80,7 +80,7 @@ public async Task<LeaderboardEntry[]> GetScoresAsync( int count, int offset = 1
/// </summary> /// </summary>
public async Task<LeaderboardEntry[]> GetScoresAroundUserAsync( int start = -10, int end = 10 ) public async Task<LeaderboardEntry[]> GetScoresAroundUserAsync( int start = -10, int end = 10 )
{ {
var r = await SteamUserStats.Internal.DownloadLeaderboardEntries( Id, LeaderboardDataRequest.GlobalAroundUser, start, end ); var r = await SteamUserStats.Internal.DownloadLeaderboardEntries( Id, LeaderboardDataRequest.GlobalAroundUser, start, end ).GetAsync<LeaderboardScoresDownloaded_t>();
if ( !r.HasValue ) if ( !r.HasValue )
return null; return null;
@ -92,7 +92,7 @@ public async Task<LeaderboardEntry[]> GetScoresAroundUserAsync( int start = -10,
/// </summary> /// </summary>
public async Task<LeaderboardEntry[]> GetScoresFromFriendsAsync() public async Task<LeaderboardEntry[]> GetScoresFromFriendsAsync()
{ {
var r = await SteamUserStats.Internal.DownloadLeaderboardEntries( Id, LeaderboardDataRequest.Friends, 0, 0 ); var r = await SteamUserStats.Internal.DownloadLeaderboardEntries( Id, LeaderboardDataRequest.Friends, 0, 0 ).GetAsync<LeaderboardScoresDownloaded_t>();
if ( !r.HasValue ) if ( !r.HasValue )
return null; return null;

View File

@ -10,6 +10,9 @@ public static class Cleanup
{ {
public static string ConvertType( string type ) public static string ConvertType( string type )
{ {
type = type.Replace( "class ", "" );
type = type.Replace( "struct ", "" );
type = type.Replace( "CSteamID", "SteamId" ); type = type.Replace( "CSteamID", "SteamId" );
type = type.Replace( "CGameID", "GameId" ); type = type.Replace( "CGameID", "GameId" );
type = type.Replace( "PersonaState", "FriendState" ); type = type.Replace( "PersonaState", "FriendState" );

View File

@ -1,76 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace Generator
{
partial class CodeParser
{
public class Class
{
public string Name;
public string InterfaceString;
public class Function
{
public string Name;
public string DuplicateName;
public Dictionary<string, string> Arguments = new Dictionary<string, string>();
public string ReturnType;
public string CallResult;
}
public List<Function> Functions = new List<Function>();
internal Function AddFunction( string funcName, string returnType, string args )
{
if ( funcName == "Init" ) funcName = "DoInit";
if ( funcName == "Shutdown" ) funcName = "DoShutdown";
var f = new Function
{
Name = funcName,
ReturnType = returnType
};
args = Regex.Replace( args, "", "" );
foreach ( var arg in args.Split( new[] { ',' }, StringSplitOptions.RemoveEmptyEntries ) )
{
var m = Regex.Match( arg.Trim(), @"(.+?[ |\*|\&])?([a-zA-Z0-9_]+?)( = (.+?))?$" );
var t = m.Groups[1].Value.Trim();
var n = m.Groups[2].Value.Trim();
t = Cleanup.ConvertType( t );
f.Arguments.Add( n, t );
}
Functions.Add( f );
return f;
}
public void PostProcess()
{
var duplicateFunctions = Functions
.GroupBy( x => x.Name )
.Where( x => x.Count() > 1 );
foreach ( var group in duplicateFunctions )
{
var g = group.ToArray();
for ( int i=0; i< g.Count(); i++ )
{
g[i].DuplicateName = g[i].Name;
g[i].Name = $"{g[i].Name}{i+1}";
}
}
}
}
}
}

View File

@ -1,155 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Generator
{
partial class CodeParser
{
public List<Class> Classes = new List<Class>();
public void ParseClasses()
{
var source = RemoveAnnotations( Content );
{
var r = new Regex( @"class ([a-zA-Z]+)[\r|\n]+{[\r|\n]((?s).*?)};" );
var ma = r.Matches( source );
foreach ( Match m in ma )
{
ProcessClass( m.Groups[0].Value.Trim(), m.Groups[1].Value.Trim(), m.Groups[2].Value.Trim() );
//def.CallbackIds.Add( m.Groups[1].Value.Substring( 3 ).Replace( "Callbacks", "" ), int.Parse( m.Groups[2].Value ) );
}
}
Console.WriteLine( "OKay" );
}
public void ProcessClass( string fulldef, string classname, string inner )
{
Console.WriteLine( $"Class: {classname} " );
var lines = inner.Split( new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries );
var func = new Regex( @"virtual (.+[\t |\*])([a-z0-9A-Z]+?)\((.+?)?\) = 0 ?;$" );
var c = new Class();
c.Name = classname;
var interfaceMatch = Regex.Match( Content, $"#define {classname.ToUpper().Substring( 1 )}_INTERFACE_VERSION \"(.+?)\"" );
if ( interfaceMatch.Success )
{
c.InterfaceString = interfaceMatch.Groups[1].Value;
}
var lastCallResult = "";
var partialLine = "";
var needsEndIf = false;
foreach ( var linestr in lines )
{
var line = linestr.Trim();
var commentPos = line.IndexOf( "//" );
if ( commentPos > 0 )
line = line.Substring( 0, commentPos-1 ).Trim();
if ( line.Trim().Length < 4 ) continue;
if ( line.Trim().StartsWith( "public:" ) ) continue;
if ( line.Trim().StartsWith( "//" ) ) continue;
if ( line.Trim().StartsWith( "#ifdef _PS3" ) || line.Trim().StartsWith( "#if defined(_PS3)" ) )
{
needsEndIf = true;
continue;
}
if ( needsEndIf )
{
needsEndIf = !line.Trim().StartsWith( "#endif" );
continue;
}
var callresult = Regex.Match( line, @"STEAM_CALL_RESULT\((.+?)\)" );
if ( callresult.Success )
{
partialLine = "";
lastCallResult = callresult.Groups[1].Value.Trim();
continue;
}
if ( !string.IsNullOrEmpty( partialLine ) )
{
partialLine += " " + line.Trim();
if ( !partialLine.Trim().EndsWith( ";" ) )
continue;
line = partialLine;
partialLine = "";
}
var f = func.Match( line );
if ( f.Success )
{
var returnType = f.Groups[1].Value.Trim();
var funcName = f.Groups[2].Value.Trim();
var args = f.Groups[3].Value.Trim();
// Console.WriteLine( $"Function: {funcName} returns {returnType} with args {args}" );
if ( funcName == "RequestUGCDetails" ) lastCallResult = "SteamUGCRequestUGCDetailsResult_t";
if ( funcName == "DownloadClanActivityCounts" ) lastCallResult = "DownloadClanActivityCountsResult_t";
if ( funcName.Contains( ' ' ) || funcName.Contains( '*' ) )
throw new System.Exception( "Parsing Error!" );
var fnc = c.AddFunction( funcName, returnType, args );
fnc.CallResult = lastCallResult;
lastCallResult = null;
partialLine = "";
}
else
{
if ( line.Trim().StartsWith( "virtual " ) )
{
partialLine = line;
}
Console.WriteLine( $"Unknown Line: {line}" );
}
}
c.PostProcess();
Classes.Add( c );
}
public string RemoveAnnotations( string str )
{
str = Regex.Replace( str, @"STEAM_OUT_ARRAY_CALL\((.+?)\)", "" );
str = Regex.Replace( str, @"STEAM_PRIVATE_API\((.+)\)", "$1" );
str = Regex.Replace( str, @"STEAM_ARRAY_COUNT\((.+?)\) ", "" );
str = Regex.Replace( str, @"STEAM_OUT_STRUCT\(\) ", "" );
str = Regex.Replace( str, @"STEAM_OUT_STRUCT\((.+?)\) ", "" );
str = Regex.Replace( str, @"STEAM_OUT_ARRAY_COUNT\((.+?)\)", "" );
str = Regex.Replace( str, @"STEAM_ARRAY_COUNT_D\((.+?)\)", "" );
str = Regex.Replace( str, @"STEAM_OUT_STRING_COUNT\((.+?)\)", "" );
str = Regex.Replace( str, @"STEAM_OUT_STRING\(\) ", "" );
str = Regex.Replace( str, @"STEAM_OUT_BUFFER_COUNT\((.+?)\) ", "" );
str = Regex.Replace( str, @"STEAM_BUFFER_COUNT\((.+?)\) ", "" );
str = Regex.Replace( str, @"STEAM_DESC\((.+?)\) ", "" );
return str;
}
}
}

View File

@ -10,8 +10,6 @@ public partial class CodeWriter
{ {
public void GenerateVTableClass( string className, string filename ) public void GenerateVTableClass( string className, string filename )
{ {
var clss = Parser.Classes.Single( x => x.Name == className );
sb = new StringBuilder(); sb = new StringBuilder();
WriteLine( $"using System;" ); WriteLine( $"using System;" );
@ -25,22 +23,23 @@ public void GenerateVTableClass( string className, string filename )
StartBlock( $"namespace Steamworks" ); StartBlock( $"namespace Steamworks" );
{ {
StartBlock( $"internal class {clss.Name} : SteamInterface" ); StartBlock( $"internal class {className} : SteamInterface" );
{ {
WriteLine( $"public override string InterfaceName => \"{clss.InterfaceString}\";" ); //WriteLine( $"public override string InterfaceName => \"{clss.InterfaceString}\";" );
WriteLine(); //WriteLine();
WriteFunctionPointerReader( clss ); WriteFunctionPointerReader();
WriteLine(); WriteLine();
foreach ( var func in clss.Functions ) var functions = def.methods.Where( x => x.ClassName == className );
foreach ( var func in functions )
{ {
if ( Cleanup.IsDeprecated( $"{clss.Name}.{func.Name}" ) ) if ( Cleanup.IsDeprecated( $"{func.ClassName}.{func.Name}" ) )
continue; continue;
WriteFunction( func );
WriteFunction( clss, func );
WriteLine(); WriteLine();
} }
@ -52,89 +51,10 @@ public void GenerateVTableClass( string className, string filename )
System.IO.File.WriteAllText( $"{filename}", sb.ToString() ); System.IO.File.WriteAllText( $"{filename}", sb.ToString() );
} }
void WriteFunctionPointerReader( CodeParser.Class clss ) void WriteFunctionPointerReader()
{ {
// TODO - we'll probably have to do this PER platform
int[] standardLocations = new int[clss.Functions.Count];
int[] windowsLocations = new int[clss.Functions.Count];
for ( int i = 0; i < clss.Functions.Count; i++ )
{
windowsLocations[i] = i * 8;
standardLocations[i] = i * 8;
}
//
// MSVC switches the order in the vtable of overloaded functions
// I'm not going to try to try to work out how to order shit
// so lets just manually fix shit here
//
if ( clss.Name == "ISteamUserStats" )
{
Swap( clss, "GetStat1", "GetStat2", windowsLocations );
Swap( clss, "SetStat1", "SetStat2", windowsLocations );
Swap( clss, "GetUserStat1", "GetUserStat2", windowsLocations );
Swap( clss, "GetGlobalStat1", "GetGlobalStat2", windowsLocations );
Swap( clss, "GetGlobalStatHistory1", "GetGlobalStatHistory2", windowsLocations );
}
if ( clss.Name == "ISteamGameServerStats" )
{
Swap( clss, "GetUserStat1", "GetUserStat2", windowsLocations );
Swap( clss, "SetUserStat1", "SetUserStat2", windowsLocations );
}
if ( clss.Name == "ISteamUGC" )
{
Swap( clss, "CreateQueryAllUGCRequest1", "CreateQueryAllUGCRequest2", windowsLocations );
}
StartBlock( $"public override void InitInternals()" ); StartBlock( $"public override void InitInternals()" );
{ {
var different = new List<int>();
/*
for ( int i = 0; i < clss.Functions.Count; i++ )
{
var func = clss.Functions[i];
if ( Cleanup.IsDeprecated( $"{clss.Name}.{func.Name}" ) )
{
WriteLine( $" // {func.Name} is deprecated" );
}
else
{
if ( standardLocations[i] != windowsLocations[i] )
{
different.Add( i );
continue;
}
//WriteLine( $"_{func.Name} = Marshal.GetDelegateForFunctionPointer<F{func.Name}>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( {standardLocations[i]} ) ) );" );
}
}
if ( different.Count > 0 )
{
WriteLine( "" );
WriteLine( "#if PLATFORM_WIN" );
foreach ( var i in different )
{
var func = clss.Functions[i];
WriteLine( $"_{func.Name} = Marshal.GetDelegateForFunctionPointer<F{func.Name}>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( {windowsLocations[i]} ) ) );" );
}
WriteLine( "#else" );
foreach ( var i in different )
{
var func = clss.Functions[i];
WriteLine( $"_{func.Name} = Marshal.GetDelegateForFunctionPointer<F{func.Name}>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( {standardLocations[i]} ) ) );" );
}
WriteLine( "#endif" );
}*/
} }
EndBlock(); EndBlock();
@ -142,51 +62,21 @@ void WriteFunctionPointerReader( CodeParser.Class clss )
{ {
WriteLine( $"base.Shutdown();" ); WriteLine( $"base.Shutdown();" );
WriteLine( "" ); WriteLine( "" );
for ( int i = 0; i < clss.Functions.Count; i++ )
{
var func = clss.Functions[i];
var returnType = BaseType.Parse( func.ReturnType );
var args = func.Arguments.Select( x => BaseType.Parse( x.Value, x.Key ) ).ToArray();
var windowsSpecific = NeedsWindowsSpecificFunction( func, returnType, args );
if ( Cleanup.IsDeprecated( $"{clss.Name}.{func.Name}" ) )
continue;
//WriteLine( $"_{func.Name} = null;" );
}
} }
EndBlock(); EndBlock();
} }
private bool NeedsWindowsSpecificFunction( CodeParser.Class.Function func, BaseType returnType, BaseType[] args ) private void WriteFunction( SteamApiDefinition.MethodDef func )
{
if ( returnType.IsReturnedWeird ) return true;
if ( returnType.WindowsSpecific ) return true;
if ( args.Any( x => x.WindowsSpecific ) ) return true;
return false;
}
private void Swap( CodeParser.Class clss, string v1, string v2, int[] locations )
{
var a = clss.Functions.IndexOf( clss.Functions.Single( x => x.Name == v1 ) );
var b = clss.Functions.IndexOf( clss.Functions.Single( x => x.Name == v2 ) );
var s = locations[a];
locations[a] = locations[b];
locations[b] = s;
}
private void WriteFunction( CodeParser.Class clss, CodeParser.Class.Function func )
{ {
var returnType = BaseType.Parse( func.ReturnType ); var returnType = BaseType.Parse( func.ReturnType );
returnType.Func = func.Name; returnType.Func = func.Name;
var args = func.Arguments.Select( x => if ( func.Params == null )
func.Params = new SteamApiDefinition.MethodDef.ParamType[0];
var args = func.Params.Select( x =>
{ {
var bt = BaseType.Parse( x.Value, x.Key ); var bt = BaseType.Parse( x.Type, x.Name );
bt.Func = func.Name; bt.Func = func.Name;
return bt; return bt;
} ).ToArray(); } ).ToArray();
@ -212,8 +102,6 @@ private void WriteFunction( CodeParser.Class clss, CodeParser.Class.Function fun
var argstr = string.Join( ", ", args.Where( x => !x.ShouldSkipAsArgument ).Select( x => x.AsArgument() ) ); ; var argstr = string.Join( ", ", args.Where( x => !x.ShouldSkipAsArgument ).Select( x => x.AsArgument() ) ); ;
var delegateargstr = string.Join( ", ", args.Select( x => x.AsNativeArgument() ) ); var delegateargstr = string.Join( ", ", args.Select( x => x.AsNativeArgument() ) );
var windowsSpecific = NeedsWindowsSpecificFunction( func, returnType, args );
if ( returnType is SteamApiCallType sap ) if ( returnType is SteamApiCallType sap )
{ {
sap.CallResult = func.CallResult; sap.CallResult = func.CallResult;
@ -223,26 +111,12 @@ private void WriteFunction( CodeParser.Class clss, CodeParser.Class.Function fun
WriteLine( $"#region FunctionMeta" ); WriteLine( $"#region FunctionMeta" );
WriteLine( $"[UnmanagedFunctionPointer( Platform.MemberConvention )]" ); WriteLine( $"[DllImport( Platform.LibraryName, EntryPoint = \"SteamAPI_{func.ClassName}_{func.Name}\")]" );
if ( returnType.ReturnAttribute != null ) if ( returnType.ReturnAttribute != null )
WriteLine( returnType.ReturnAttribute ); WriteLine( returnType.ReturnAttribute );
if ( returnType.IsReturnedWeird ) WriteLine( $"private static extern {returnType.TypeNameFrom} _{func.Name}( IntPtr self, {delegateargstr} );".Replace( "( IntPtr self, )", "( IntPtr self )" ) );
{
WriteLine( "#if PLATFORM_WIN" );
WriteLine( $"private delegate void F{func.Name}( IntPtr self, ref {returnType.TypeName} retVal, {delegateargstr} );".Replace( " retVal, )", " retVal )" ) );
WriteLine( "#else" );
}
WriteLine( $"private delegate {returnType.TypeNameFrom} F{func.Name}( IntPtr self, {delegateargstr} );".Replace( "( IntPtr self, )", "( IntPtr self )" ) );
if ( returnType.IsReturnedWeird )
{
WriteLine( "#endif" );
}
WriteLine( $"private F{func.Name} _{func.Name};" );
WriteLine(); WriteLine();
WriteLine( $"#endregion" ); WriteLine( $"#endregion" );
@ -262,20 +136,6 @@ private void WriteFunction( CodeParser.Class clss, CodeParser.Class.Function fun
} }
} }
//
// The actual call
//
if ( returnType.IsReturnedWeird )
{
WriteLine( "#if PLATFORM_WIN" );
{
WriteLine( $"var retVal = default( {returnType.TypeName} );" );
WriteLine( $"_{func.Name}( Self, ref retVal, {callargs} );".Replace( ", );", " );" ) );
WriteLine( $"{returnType.Return( "retVal" )}" );
}
WriteLine( "#else" );
}
if ( returnType.IsVoid ) if ( returnType.IsVoid )
{ {
WriteLine( $"_{func.Name}( Self, {callargs} );".Replace( "( Self, )", "( Self )" ) ); WriteLine( $"_{func.Name}( Self, {callargs} );".Replace( "( Self, )", "( Self )" ) );
@ -303,11 +163,6 @@ private void WriteFunction( CodeParser.Class clss, CodeParser.Class.Function fun
{ {
WriteLine( returnType.Return( "returnValue" ) ); WriteLine( returnType.Return( "returnValue" ) );
} }
if ( returnType.IsReturnedWeird )
{
WriteLine( "#endif" );
}
} }
EndBlock(); EndBlock();
} }

View File

@ -56,12 +56,15 @@ void Structs()
int defaultPack = c.IsPack4OnWindows ? 4 : 8; int defaultPack = c.IsPack4OnWindows ? 4 : 8;
var isCallback = !string.IsNullOrEmpty( c.CallbackId ); var isCallback = !string.IsNullOrEmpty( c.CallbackId );
var iface = "";
if ( isCallback )
iface = " : ICallbackData";
// //
// Main struct // Main struct
// //
WriteLine( $"[StructLayout( LayoutKind.Sequential, Pack = Platform.{(c.IsPack4OnWindows?"StructPackSize": "StructPlatformPackSize")} )]" ); WriteLine( $"[StructLayout( LayoutKind.Sequential, Pack = Platform.{(c.IsPack4OnWindows?"StructPackSize": "StructPlatformPackSize")} )]" );
StartBlock( $"{Cleanup.Expose( name )} struct {name}" ); StartBlock( $"{Cleanup.Expose( name )} struct {name}{iface}" );
{ {
// //
// The fields // The fields
@ -74,8 +77,11 @@ void Structs()
WriteLine( "#region SteamCallback" ); WriteLine( "#region SteamCallback" );
{ {
WriteLine( $"internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof({name}) );" ); WriteLine( $"public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof({name}) );" );
WriteLine( $"internal static {name} Fill( IntPtr p ) => (({name})({name}) Marshal.PtrToStructure( p, typeof({name}) ) );" ); WriteLine( $"public int DataSize => _datasize;" );
WriteLine( $"public int CallbackId => {c.CallbackId};" );
WriteLine( $"internal static {name} Fill( IntPtr p ) => (({name})Marshal.PtrToStructure( p, typeof({name}) ) );" );
WriteLine(); WriteLine();
WriteLine( $"static Action<{name}> actionClient;" ); WriteLine( $"static Action<{name}> actionClient;" );
WriteLine( $"[MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) );" ); WriteLine( $"[MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) );" );
@ -87,47 +93,18 @@ void Structs()
{ {
StartBlock( "if ( server )" ); StartBlock( "if ( server )" );
{ {
WriteLine( $"Event.Register( OnServer, StructSize, {c.CallbackId}, true );" ); WriteLine( $"Event.Register( OnServer, _datasize, {c.CallbackId}, true );" );
WriteLine( $"actionServer = action;" ); WriteLine( $"actionServer = action;" );
} }
Else(); Else();
{ {
WriteLine( $"Event.Register( OnClient, StructSize, {c.CallbackId}, false );" ); WriteLine( $"Event.Register( OnClient, _datasize, {c.CallbackId}, false );" );
WriteLine( $"actionClient = action;" ); WriteLine( $"actionClient = action;" );
} }
EndBlock(); EndBlock();
} }
EndBlock(); EndBlock();
StartBlock( $"public static async Task<{name}?> GetResultAsync( SteamAPICall_t handle )" );
{
WriteLine( $"bool failed = false;" );
WriteLine();
StartBlock( $"while ( !SteamUtils.IsCallComplete( handle, out failed ) )" );
{
WriteLine( $"await Task.Delay( 1 );" );
WriteLine( $"if ( !SteamClient.IsValid && !SteamServer.IsValid ) return null;" );
}
EndBlock();
WriteLine( $"if ( failed ) return null;" );
WriteLine( $"" );
WriteLine( $"var ptr = Marshal.AllocHGlobal( StructSize );" );
WriteLine( $"" );
WriteLine( $"try" );
WriteLine( $"{{" );
WriteLine( $" if ( !SteamUtils.Internal.GetAPICallResult( handle, ptr, StructSize, {c.CallbackId}, ref failed ) || failed )" );
WriteLine( $" return null;" );
WriteLine( $"" );
WriteLine( $" return Fill( ptr );" );
WriteLine( $"}}" );
WriteLine( $"finally" );
WriteLine( $"{{" );
WriteLine( $" Marshal.FreeHGlobal( ptr );" );
WriteLine( $"}}" );
}
EndBlock();
} }
WriteLine( "#endregion" ); WriteLine( "#endregion" );
} }

View File

@ -172,8 +172,8 @@ internal class SteamApiCallType : BaseType
{ {
public string CallResult; public string CallResult;
public override string TypeName => "SteamAPICall_t"; public override string TypeName => "SteamAPICall_t";
public override string Return( string varname ) => $"return await {CallResult}.GetResultAsync( {varname} );"; public override string Return( string varname ) => $"return new CallbackResult( {varname} );";
public override string ReturnType => $"async Task<{CallResult}?>"; public override string ReturnType => $"CallbackResult";
} }
internal class CSteamIdType : BaseType internal class CSteamIdType : BaseType

View File

@ -47,9 +47,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="CodeParser\CodeParser.Class.cs" />
<Compile Include="CodeParser\CodeParser.cs" /> <Compile Include="CodeParser\CodeParser.cs" />
<Compile Include="CodeParser\ParseClasses.cs" />
<Compile Include="CodeWriter\GlobalFunctions.cs" /> <Compile Include="CodeWriter\GlobalFunctions.cs" />
<Compile Include="CodeWriter\ClassVTable.cs" /> <Compile Include="CodeWriter\ClassVTable.cs" />
<Compile Include="CodeWriter\Constants.cs" /> <Compile Include="CodeWriter\Constants.cs" />

View File

@ -20,7 +20,6 @@ static void Main( string[] args )
var parser = new CodeParser( @"steam_sdk" ); var parser = new CodeParser( @"steam_sdk" );
parser.ParseClasses();
parser.ExtendDefinition( def ); parser.ExtendDefinition( def );
Definitions = def; Definitions = def;

View File

@ -3392,15 +3392,21 @@
{ "paramname": "pnChatting" ,"paramtype": "int *"} { "paramname": "pnChatting" ,"paramtype": "int *"}
] ]
} }
,{ ,
{
"classname": "ISteamFriends", "classname": "ISteamFriends",
"methodname": "DownloadClanActivityCounts", "methodname": "DownloadClanActivityCounts",
"returntype": "SteamAPICall_t", "returntype": "SteamAPICall_t",
"params": [ "callbackdata": "DownloadClanActivityCountsResult_t",
"callbackid": 341,
"params":
[
{ "paramname": "psteamIDClans" ,"array_count": "cClansToRequest" ,"paramtype": "class CSteamID *"}, { "paramname": "psteamIDClans" ,"array_count": "cClansToRequest" ,"paramtype": "class CSteamID *"},
{ "paramname": "cClansToRequest" ,"paramtype": "int"} { "paramname": "cClansToRequest" ,"paramtype": "int"}
] ]
} }
,{ ,{
"classname": "ISteamFriends", "classname": "ISteamFriends",
"methodname": "GetFriendCountFromSource", "methodname": "GetFriendCountFromSource",
@ -5322,7 +5328,7 @@
} }
,{ ,{
"classname": "ISteamUserStats", "classname": "ISteamUserStats",
"methodname": "GetStat", "methodname": "GetStat0",
"returntype": "bool", "returntype": "bool",
"params": [ "params": [
{ "paramname": "pchName" ,"paramtype": "const char *"}, { "paramname": "pchName" ,"paramtype": "const char *"},
@ -5457,7 +5463,7 @@
} }
,{ ,{
"classname": "ISteamUserStats", "classname": "ISteamUserStats",
"methodname": "GetUserStat", "methodname": "GetUserStat0",
"returntype": "bool", "returntype": "bool",
"params": [ "params": [
{ "paramname": "steamIDUser" ,"paramtype": "class CSteamID"}, { "paramname": "steamIDUser" ,"paramtype": "class CSteamID"},
@ -5659,7 +5665,7 @@
} }
,{ ,{
"classname": "ISteamUserStats", "classname": "ISteamUserStats",
"methodname": "GetGlobalStat", "methodname": "GetGlobalStat0",
"returntype": "bool", "returntype": "bool",
"params": [ "params": [
{ "paramname": "pchStatName" ,"paramtype": "const char *"}, { "paramname": "pchStatName" ,"paramtype": "const char *"},
@ -5678,7 +5684,7 @@
} }
,{ ,{
"classname": "ISteamUserStats", "classname": "ISteamUserStats",
"methodname": "GetGlobalStatHistory", "methodname": "GetGlobalStatHistory0",
"returntype": "int32", "returntype": "int32",
"params": [ "params": [
{ "paramname": "pchStatName" ,"paramtype": "const char *"}, { "paramname": "pchStatName" ,"paramtype": "const char *"},
@ -7285,7 +7291,7 @@
} }
,{ ,{
"classname": "ISteamUGC", "classname": "ISteamUGC",
"methodname": "CreateQueryAllUGCRequest", "methodname": "CreateQueryAllUGCRequest0",
"returntype": "UGCQueryHandle_t", "returntype": "UGCQueryHandle_t",
"params": [ "params": [
{ "paramname": "eQueryType" ,"paramtype": "EUGCQuery"}, { "paramname": "eQueryType" ,"paramtype": "EUGCQuery"},
@ -8644,7 +8650,7 @@
} }
,{ ,{
"classname": "ISteamInventory", "classname": "ISteamInventory",
"methodname": "SetProperty", "methodname": "SetProperty0",
"returntype": "bool", "returntype": "bool",
"params": [ "params": [
{ "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"}, { "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"},
@ -8655,7 +8661,7 @@
} }
,{ ,{
"classname": "ISteamInventory", "classname": "ISteamInventory",
"methodname": "SetProperty", "methodname": "SetProperty1",
"returntype": "bool", "returntype": "bool",
"params": [ "params": [
{ "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"}, { "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"},
@ -8666,7 +8672,7 @@
} }
,{ ,{
"classname": "ISteamInventory", "classname": "ISteamInventory",
"methodname": "SetProperty", "methodname": "SetProperty2",
"returntype": "bool", "returntype": "bool",
"params": [ "params": [
{ "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"}, { "paramname": "handle" ,"paramtype": "SteamInventoryUpdateHandle_t"},
@ -9119,7 +9125,7 @@
} }
,{ ,{
"classname": "ISteamGameServerStats", "classname": "ISteamGameServerStats",
"methodname": "GetUserStat", "methodname": "GetUserStat0",
"returntype": "bool", "returntype": "bool",
"params": [ "params": [
{ "paramname": "steamIDUser" ,"paramtype": "class CSteamID"}, { "paramname": "steamIDUser" ,"paramtype": "class CSteamID"},
@ -9149,7 +9155,7 @@
} }
,{ ,{
"classname": "ISteamGameServerStats", "classname": "ISteamGameServerStats",
"methodname": "SetUserStat", "methodname": "SetUserStat0",
"returntype": "bool", "returntype": "bool",
"params": [ "params": [
{ "paramname": "steamIDUser" ,"paramtype": "class CSteamID"}, { "paramname": "steamIDUser" ,"paramtype": "class CSteamID"},