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

View File

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

View File

@ -9,8 +9,6 @@ namespace Steamworks
{
internal class ISteamGameServer : SteamInterface
{
public override string InterfaceName => "SteamGameServer012";
public override void InitInternals()
{
}
@ -21,10 +19,9 @@ internal override void Shutdown()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_InitGameServer")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FInitGameServer( IntPtr self, uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString );
private FInitGameServer _InitGameServer;
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 );
#endregion
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
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetProduct( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct );
private FSetProduct _SetProduct;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetProduct")]
private static extern void _SetProduct( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct );
#endregion
internal void SetProduct( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct )
@ -45,9 +41,8 @@ internal void SetProduct( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalType
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription );
private FSetGameDescription _SetGameDescription;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameDescription")]
private static extern void _SetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription );
#endregion
internal void SetGameDescription( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription )
@ -56,9 +51,8 @@ internal void SetGameDescription( [MarshalAs( UnmanagedType.CustomMarshaler, Mar
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir );
private FSetModDir _SetModDir;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetModDir")]
private static extern void _SetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir );
#endregion
internal void SetModDir( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir )
@ -67,9 +61,8 @@ internal void SetModDir( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeR
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated );
private FSetDedicatedServer _SetDedicatedServer;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetDedicatedServer")]
private static extern void _SetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated );
#endregion
internal void SetDedicatedServer( [MarshalAs( UnmanagedType.U1 )] bool bDedicated )
@ -78,9 +71,8 @@ internal void SetDedicatedServer( [MarshalAs( UnmanagedType.U1 )] bool bDedicate
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FLogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken );
private FLogOn _LogOn;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOn")]
private static extern void _LogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken );
#endregion
internal void LogOn( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken )
@ -89,9 +81,8 @@ internal void LogOn( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef =
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FLogOnAnonymous( IntPtr self );
private FLogOnAnonymous _LogOnAnonymous;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOnAnonymous")]
private static extern void _LogOnAnonymous( IntPtr self );
#endregion
internal void LogOnAnonymous()
@ -100,9 +91,8 @@ internal void LogOnAnonymous()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FLogOff( IntPtr self );
private FLogOff _LogOff;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOff")]
private static extern void _LogOff( IntPtr self );
#endregion
internal void LogOff()
@ -111,10 +101,9 @@ internal void LogOff()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BLoggedOn")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBLoggedOn( IntPtr self );
private FBLoggedOn _BLoggedOn;
private static extern bool _BLoggedOn( IntPtr self );
#endregion
internal bool BLoggedOn()
@ -124,10 +113,9 @@ internal bool BLoggedOn()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BSecure")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBSecure( IntPtr self );
private FBSecure _BSecure;
private static extern bool _BSecure( IntPtr self );
#endregion
internal bool BSecure()
@ -137,32 +125,20 @@ internal bool BSecure()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
#if PLATFORM_WIN
private delegate void FGetSteamID( IntPtr self, ref SteamId retVal );
#else
private delegate SteamId FGetSteamID( IntPtr self );
#endif
private FGetSteamID _GetSteamID;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetSteamID")]
private static extern SteamId _GetSteamID( IntPtr self );
#endregion
internal SteamId GetSteamID()
{
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetSteamID( Self, ref retVal );
return retVal;
#else
var returnValue = _GetSteamID( Self );
return returnValue;
#endif
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_WasRestartRequested")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FWasRestartRequested( IntPtr self );
private FWasRestartRequested _WasRestartRequested;
private static extern bool _WasRestartRequested( IntPtr self );
#endregion
internal bool WasRestartRequested()
@ -172,9 +148,8 @@ internal bool WasRestartRequested()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetMaxPlayerCount( IntPtr self, int cPlayersMax );
private FSetMaxPlayerCount _SetMaxPlayerCount;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMaxPlayerCount")]
private static extern void _SetMaxPlayerCount( IntPtr self, int cPlayersMax );
#endregion
internal void SetMaxPlayerCount( int cPlayersMax )
@ -183,9 +158,8 @@ internal void SetMaxPlayerCount( int cPlayersMax )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetBotPlayerCount( IntPtr self, int cBotplayers );
private FSetBotPlayerCount _SetBotPlayerCount;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetBotPlayerCount")]
private static extern void _SetBotPlayerCount( IntPtr self, int cBotplayers );
#endregion
internal void SetBotPlayerCount( int cBotplayers )
@ -194,9 +168,8 @@ internal void SetBotPlayerCount( int cBotplayers )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName );
private FSetServerName _SetServerName;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetServerName")]
private static extern void _SetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName );
#endregion
internal void SetServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName )
@ -205,9 +178,8 @@ internal void SetServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalT
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName );
private FSetMapName _SetMapName;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMapName")]
private static extern void _SetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName );
#endregion
internal void SetMapName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName )
@ -216,9 +188,8 @@ internal void SetMapName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalType
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected );
private FSetPasswordProtected _SetPasswordProtected;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetPasswordProtected")]
private static extern void _SetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected );
#endregion
internal void SetPasswordProtected( [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected )
@ -227,9 +198,8 @@ internal void SetPasswordProtected( [MarshalAs( UnmanagedType.U1 )] bool bPasswo
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetSpectatorPort( IntPtr self, ushort unSpectatorPort );
private FSetSpectatorPort _SetSpectatorPort;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorPort")]
private static extern void _SetSpectatorPort( IntPtr self, ushort unSpectatorPort );
#endregion
internal void SetSpectatorPort( ushort unSpectatorPort )
@ -238,9 +208,8 @@ internal void SetSpectatorPort( ushort unSpectatorPort )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName );
private FSetSpectatorServerName _SetSpectatorServerName;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorServerName")]
private static extern void _SetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName );
#endregion
internal void SetSpectatorServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName )
@ -249,9 +218,8 @@ internal void SetSpectatorServerName( [MarshalAs( UnmanagedType.CustomMarshaler,
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FClearAllKeyValues( IntPtr self );
private FClearAllKeyValues _ClearAllKeyValues;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ClearAllKeyValues")]
private static extern void _ClearAllKeyValues( IntPtr self );
#endregion
internal void ClearAllKeyValues()
@ -260,9 +228,8 @@ internal void ClearAllKeyValues()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetKeyValue( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue );
private FSetKeyValue _SetKeyValue;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetKeyValue")]
private static extern void _SetKeyValue( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue );
#endregion
internal void SetKeyValue( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue )
@ -271,9 +238,8 @@ internal void SetKeyValue( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTyp
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags );
private FSetGameTags _SetGameTags;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameTags")]
private static extern void _SetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags );
#endregion
internal void SetGameTags( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags )
@ -282,9 +248,8 @@ internal void SetGameTags( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTyp
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData );
private FSetGameData _SetGameData;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameData")]
private static extern void _SetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData );
#endregion
internal void SetGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData )
@ -293,9 +258,8 @@ internal void SetGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTyp
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion );
private FSetRegion _SetRegion;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetRegion")]
private static extern void _SetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion );
#endregion
internal void SetRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion )
@ -304,10 +268,9 @@ internal void SetRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeR
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSendUserConnectAndAuthenticate( IntPtr self, uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser );
private FSendUserConnectAndAuthenticate _SendUserConnectAndAuthenticate;
private static extern bool _SendUserConnectAndAuthenticate( IntPtr self, uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser );
#endregion
internal bool SendUserConnectAndAuthenticate( uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser )
@ -317,31 +280,19 @@ internal bool SendUserConnectAndAuthenticate( uint unIPClient, IntPtr pvAuthBlob
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
#if PLATFORM_WIN
private delegate void FCreateUnauthenticatedUserConnection( IntPtr self, ref SteamId retVal );
#else
private delegate SteamId FCreateUnauthenticatedUserConnection( IntPtr self );
#endif
private FCreateUnauthenticatedUserConnection _CreateUnauthenticatedUserConnection;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection")]
private static extern SteamId _CreateUnauthenticatedUserConnection( IntPtr self );
#endregion
internal SteamId CreateUnauthenticatedUserConnection()
{
#if PLATFORM_WIN
var retVal = default( SteamId );
_CreateUnauthenticatedUserConnection( Self, ref retVal );
return retVal;
#else
var returnValue = _CreateUnauthenticatedUserConnection( Self );
return returnValue;
#endif
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSendUserDisconnect( IntPtr self, SteamId steamIDUser );
private FSendUserDisconnect _SendUserDisconnect;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserDisconnect")]
private static extern void _SendUserDisconnect( IntPtr self, SteamId steamIDUser );
#endregion
internal void SendUserDisconnect( SteamId steamIDUser )
@ -350,10 +301,9 @@ internal void SendUserDisconnect( SteamId steamIDUser )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BUpdateUserData")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBUpdateUserData( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore );
private FBUpdateUserData _BUpdateUserData;
private static extern bool _BUpdateUserData( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore );
#endregion
internal bool BUpdateUserData( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore )
@ -363,9 +313,8 @@ internal bool BUpdateUserData( SteamId steamIDUser, [MarshalAs( UnmanagedType.Cu
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
private FGetAuthSessionTicket _GetAuthSessionTicket;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetAuthSessionTicket")]
private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
#endregion
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
@ -375,9 +324,8 @@ internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate BeginAuthResult FBeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
private FBeginAuthSession _BeginAuthSession;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BeginAuthSession")]
private static extern BeginAuthResult _BeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
#endregion
internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID )
@ -387,9 +335,8 @@ internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket,
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FEndAuthSession( IntPtr self, SteamId steamID );
private FEndAuthSession _EndAuthSession;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_EndAuthSession")]
private static extern void _EndAuthSession( IntPtr self, SteamId steamID );
#endregion
internal void EndAuthSession( SteamId steamID )
@ -398,9 +345,8 @@ internal void EndAuthSession( SteamId steamID )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FCancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
private FCancelAuthTicket _CancelAuthTicket;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CancelAuthTicket")]
private static extern void _CancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
#endregion
internal void CancelAuthTicket( HAuthTicket hAuthTicket )
@ -409,9 +355,8 @@ internal void CancelAuthTicket( HAuthTicket hAuthTicket )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate UserHasLicenseForAppResult FUserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
private FUserHasLicenseForApp _UserHasLicenseForApp;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_UserHasLicenseForApp")]
private static extern UserHasLicenseForAppResult _UserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
#endregion
internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID )
@ -421,10 +366,9 @@ internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_RequestUserGroupStatus")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup );
private FRequestUserGroupStatus _RequestUserGroupStatus;
private static extern bool _RequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup );
#endregion
internal bool RequestUserGroupStatus( SteamId steamIDUser, SteamId steamIDGroup )
@ -434,9 +378,8 @@ internal bool RequestUserGroupStatus( SteamId steamIDUser, SteamId steamIDGroup
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FGetGameplayStats( IntPtr self );
private FGetGameplayStats _GetGameplayStats;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetGameplayStats")]
private static extern void _GetGameplayStats( IntPtr self );
#endregion
internal void GetGameplayStats()
@ -445,21 +388,19 @@ internal void GetGameplayStats()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FGetServerReputation( IntPtr self );
private FGetServerReputation _GetServerReputation;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetServerReputation")]
private static extern SteamAPICall_t _GetServerReputation( IntPtr self );
#endregion
internal async Task<GSReputation_t?> GetServerReputation()
internal CallbackResult GetServerReputation()
{
var returnValue = _GetServerReputation( Self );
return await GSReputation_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate uint FGetPublicIP( IntPtr self );
private FGetPublicIP _GetPublicIP;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetPublicIP")]
private static extern uint _GetPublicIP( IntPtr self );
#endregion
internal uint GetPublicIP()
@ -469,10 +410,9 @@ internal uint GetPublicIP()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_HandleIncomingPacket")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FHandleIncomingPacket( IntPtr self, IntPtr pData, int cbData, uint srcIP, ushort srcPort );
private FHandleIncomingPacket _HandleIncomingPacket;
private static extern bool _HandleIncomingPacket( IntPtr self, IntPtr pData, int cbData, uint srcIP, ushort srcPort );
#endregion
internal bool HandleIncomingPacket( IntPtr pData, int cbData, uint srcIP, ushort srcPort )
@ -482,9 +422,8 @@ internal bool HandleIncomingPacket( IntPtr pData, int cbData, uint srcIP, ushort
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort );
private FGetNextOutgoingPacket _GetNextOutgoingPacket;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetNextOutgoingPacket")]
private static extern int _GetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort );
#endregion
internal int GetNextOutgoingPacket( IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort )
@ -494,9 +433,8 @@ internal int GetNextOutgoingPacket( IntPtr pOut, int cbMaxOut, ref uint pNetAdr,
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FEnableHeartbeats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive );
private FEnableHeartbeats _EnableHeartbeats;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_EnableHeartbeats")]
private static extern void _EnableHeartbeats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive );
#endregion
internal void EnableHeartbeats( [MarshalAs( UnmanagedType.U1 )] bool bActive )
@ -505,9 +443,8 @@ internal void EnableHeartbeats( [MarshalAs( UnmanagedType.U1 )] bool bActive )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetHeartbeatInterval( IntPtr self, int iHeartbeatInterval );
private FSetHeartbeatInterval _SetHeartbeatInterval;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetHeartbeatInterval")]
private static extern void _SetHeartbeatInterval( IntPtr self, int iHeartbeatInterval );
#endregion
internal void SetHeartbeatInterval( int iHeartbeatInterval )
@ -516,9 +453,8 @@ internal void SetHeartbeatInterval( int iHeartbeatInterval )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FForceHeartbeat( IntPtr self );
private FForceHeartbeat _ForceHeartbeat;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ForceHeartbeat")]
private static extern void _ForceHeartbeat( IntPtr self );
#endregion
internal void ForceHeartbeat()
@ -527,27 +463,25 @@ internal void ForceHeartbeat()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FAssociateWithClan( IntPtr self, SteamId steamIDClan );
private FAssociateWithClan _AssociateWithClan;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_AssociateWithClan")]
private static extern SteamAPICall_t _AssociateWithClan( IntPtr self, SteamId steamIDClan );
#endregion
internal async Task<AssociateWithClanResult_t?> AssociateWithClan( SteamId steamIDClan )
internal CallbackResult AssociateWithClan( SteamId steamIDClan )
{
var returnValue = _AssociateWithClan( Self, steamIDClan );
return await AssociateWithClanResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer );
private FComputeNewPlayerCompatibility _ComputeNewPlayerCompatibility;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility")]
private static extern SteamAPICall_t _ComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer );
#endregion
internal async Task<ComputeNewPlayerCompatibilityResult_t?> ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer )
internal CallbackResult ComputeNewPlayerCompatibility( SteamId 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
{
public override string InterfaceName => "SteamGameServerStats001";
public override void InitInternals()
{
}
@ -21,48 +19,44 @@ internal override void Shutdown()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FRequestUserStats( IntPtr self, SteamId steamIDUser );
private FRequestUserStats _RequestUserStats;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_RequestUserStats")]
private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser );
#endregion
internal async Task<GSStatsReceived_t?> RequestUserStats( SteamId steamIDUser )
internal CallbackResult RequestUserStats( SteamId steamIDUser )
{
var returnValue = _RequestUserStats( Self, steamIDUser );
return await GSStatsReceived_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStat")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
private FGetUserStat1 _GetUserStat1;
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
#endregion
internal bool GetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
{
var returnValue = _GetUserStat1( Self, steamIDUser, pchName, ref pData );
var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStat0")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
private FGetUserStat2 _GetUserStat2;
private static extern bool _GetUserStat0( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
#endregion
internal bool GetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
internal bool 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;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserAchievement")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
private FGetUserAchievement _GetUserAchievement;
private static extern bool _GetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
#endregion
internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
@ -72,36 +66,33 @@ internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStat")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
private FSetUserStat1 _SetUserStat1;
private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
#endregion
internal bool SetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
internal bool SetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
{
var returnValue = _SetUserStat1( Self, steamIDUser, pchName, nData );
var returnValue = _SetUserStat( Self, steamIDUser, pchName, nData );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStat0")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
private FSetUserStat2 _SetUserStat2;
private static extern bool _SetUserStat0( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
#endregion
internal bool SetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
internal bool 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;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_UpdateUserAvgRateStat")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FUpdateUserAvgRateStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
private FUpdateUserAvgRateStat _UpdateUserAvgRateStat;
private static extern bool _UpdateUserAvgRateStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
#endregion
internal bool UpdateUserAvgRateStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength )
@ -111,10 +102,9 @@ internal bool UpdateUserAvgRateStat( SteamId steamIDUser, [MarshalAs( UnmanagedT
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserAchievement")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
private FSetUserAchievement _SetUserAchievement;
private static extern bool _SetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
#endregion
internal bool SetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@ -124,10 +114,9 @@ internal bool SetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_ClearUserAchievement")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
private FClearUserAchievement _ClearUserAchievement;
private static extern bool _ClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
#endregion
internal bool ClearUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@ -137,15 +126,14 @@ internal bool ClearUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedTy
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FStoreUserStats( IntPtr self, SteamId steamIDUser );
private FStoreUserStats _StoreUserStats;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_StoreUserStats")]
private static extern SteamAPICall_t _StoreUserStats( IntPtr self, SteamId steamIDUser );
#endregion
internal async Task<GSStatsStored_t?> StoreUserStats( SteamId steamIDUser )
internal CallbackResult StoreUserStats( SteamId 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
{
public override string InterfaceName => "SteamInput001";
public override void InitInternals()
{
}
@ -21,35 +19,32 @@ internal override void Shutdown()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Init")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FDoInit( IntPtr self );
private FDoInit _DoInit;
private static extern bool _Init( IntPtr self );
#endregion
internal bool DoInit()
internal bool Init()
{
var returnValue = _DoInit( Self );
var returnValue = _Init( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Shutdown")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FDoShutdown( IntPtr self );
private FDoShutdown _DoShutdown;
private static extern bool _Shutdown( IntPtr self );
#endregion
internal bool DoShutdown()
internal bool Shutdown()
{
var returnValue = _DoShutdown( Self );
var returnValue = _Shutdown( Self );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FRunFrame( IntPtr self );
private FRunFrame _RunFrame;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_RunFrame")]
private static extern void _RunFrame( IntPtr self );
#endregion
internal void RunFrame()
@ -58,9 +53,8 @@ internal void RunFrame()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut );
private FGetConnectedControllers _GetConnectedControllers;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetConnectedControllers")]
private static extern int _GetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut );
#endregion
internal int GetConnectedControllers( [In,Out] InputHandle_t[] handlesOut )
@ -70,9 +64,8 @@ internal int GetConnectedControllers( [In,Out] InputHandle_t[] handlesOut )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate InputActionSetHandle_t FGetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
private FGetActionSetHandle _GetActionSetHandle;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionSetHandle")]
private static extern InputActionSetHandle_t _GetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
#endregion
internal InputActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName )
@ -82,9 +75,8 @@ internal InputActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.Cu
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
private FActivateActionSet _ActivateActionSet;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSet")]
private static extern void _ActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
#endregion
internal void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle )
@ -93,9 +85,8 @@ internal void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate InputActionSetHandle_t FGetCurrentActionSet( IntPtr self, InputHandle_t inputHandle );
private FGetCurrentActionSet _GetCurrentActionSet;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetCurrentActionSet")]
private static extern InputActionSetHandle_t _GetCurrentActionSet( IntPtr self, InputHandle_t inputHandle );
#endregion
internal InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle )
@ -105,9 +96,8 @@ internal InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
private FActivateActionSetLayer _ActivateActionSetLayer;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSetLayer")]
private static extern void _ActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
#endregion
internal void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
@ -116,9 +106,8 @@ internal void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetH
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FDeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
private FDeactivateActionSetLayer _DeactivateActionSetLayer;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateActionSetLayer")]
private static extern void _DeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
#endregion
internal void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
@ -127,9 +116,8 @@ internal void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSe
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FDeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle );
private FDeactivateAllActionSetLayers _DeactivateAllActionSetLayers;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateAllActionSetLayers")]
private static extern void _DeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle );
#endregion
internal void DeactivateAllActionSetLayers( InputHandle_t inputHandle )
@ -138,9 +126,8 @@ internal void DeactivateAllActionSetLayers( InputHandle_t inputHandle )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut );
private FGetActiveActionSetLayers _GetActiveActionSetLayers;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActiveActionSetLayers")]
private static extern int _GetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut );
#endregion
internal int GetActiveActionSetLayers( InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut )
@ -150,9 +137,8 @@ internal int GetActiveActionSetLayers( InputHandle_t inputHandle, [In,Out] Input
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate InputDigitalActionHandle_t FGetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
private FGetDigitalActionHandle _GetDigitalActionHandle;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionHandle")]
private static extern InputDigitalActionHandle_t _GetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
#endregion
internal InputDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
@ -162,31 +148,19 @@ internal InputDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( Unmanage
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
#if PLATFORM_WIN
private delegate void FGetDigitalActionData( IntPtr self, ref DigitalState retVal, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
#else
private delegate DigitalState FGetDigitalActionData( IntPtr self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
#endif
private FGetDigitalActionData _GetDigitalActionData;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionData")]
private static extern DigitalState _GetDigitalActionData( IntPtr self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
#endregion
internal DigitalState GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle )
{
#if PLATFORM_WIN
var retVal = default( DigitalState );
_GetDigitalActionData( Self, ref retVal, inputHandle, digitalActionHandle );
return retVal;
#else
var returnValue = _GetDigitalActionData( Self, inputHandle, digitalActionHandle );
return returnValue;
#endif
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetDigitalActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut );
private FGetDigitalActionOrigins _GetDigitalActionOrigins;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionOrigins")]
private static extern int _GetDigitalActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut );
#endregion
internal int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut )
@ -196,9 +170,8 @@ internal int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetH
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate InputAnalogActionHandle_t FGetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
private FGetAnalogActionHandle _GetAnalogActionHandle;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionHandle")]
private static extern InputAnalogActionHandle_t _GetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
#endregion
internal InputAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
@ -208,31 +181,19 @@ internal InputAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedT
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
#if PLATFORM_WIN
private delegate void FGetAnalogActionData( IntPtr self, ref AnalogState retVal, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
#else
private delegate AnalogState FGetAnalogActionData( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
#endif
private FGetAnalogActionData _GetAnalogActionData;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionData")]
private static extern AnalogState _GetAnalogActionData( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
#endregion
internal AnalogState GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle )
{
#if PLATFORM_WIN
var retVal = default( AnalogState );
_GetAnalogActionData( Self, ref retVal, inputHandle, analogActionHandle );
return retVal;
#else
var returnValue = _GetAnalogActionData( Self, inputHandle, analogActionHandle );
return returnValue;
#endif
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetAnalogActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut );
private FGetAnalogActionOrigins _GetAnalogActionOrigins;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionOrigins")]
private static extern int _GetAnalogActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut );
#endregion
internal int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut )
@ -242,9 +203,8 @@ internal int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHa
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate Utf8StringPointer FGetGlyphForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
private FGetGlyphForActionOrigin _GetGlyphForActionOrigin;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForActionOrigin")]
private static extern Utf8StringPointer _GetGlyphForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
#endregion
internal string GetGlyphForActionOrigin( InputActionOrigin eOrigin )
@ -254,9 +214,8 @@ internal string GetGlyphForActionOrigin( InputActionOrigin eOrigin )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate Utf8StringPointer FGetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
private FGetStringForActionOrigin _GetStringForActionOrigin;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForActionOrigin")]
private static extern Utf8StringPointer _GetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
#endregion
internal string GetStringForActionOrigin( InputActionOrigin eOrigin )
@ -266,9 +225,8 @@ internal string GetStringForActionOrigin( InputActionOrigin eOrigin )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FStopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
private FStopAnalogActionMomentum _StopAnalogActionMomentum;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_StopAnalogActionMomentum")]
private static extern void _StopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
#endregion
internal void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction )
@ -277,31 +235,19 @@ internal void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogAc
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
#if PLATFORM_WIN
private delegate void FGetMotionData( IntPtr self, ref MotionState retVal, InputHandle_t inputHandle );
#else
private delegate MotionState FGetMotionData( IntPtr self, InputHandle_t inputHandle );
#endif
private FGetMotionData _GetMotionData;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetMotionData")]
private static extern MotionState _GetMotionData( IntPtr self, InputHandle_t inputHandle );
#endregion
internal MotionState GetMotionData( InputHandle_t inputHandle )
{
#if PLATFORM_WIN
var retVal = default( MotionState );
_GetMotionData( Self, ref retVal, inputHandle );
return retVal;
#else
var returnValue = _GetMotionData( Self, inputHandle );
return returnValue;
#endif
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FTriggerVibration( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed );
private FTriggerVibration _TriggerVibration;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerVibration")]
private static extern void _TriggerVibration( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed );
#endregion
internal void TriggerVibration( InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed )
@ -310,9 +256,8 @@ internal void TriggerVibration( InputHandle_t inputHandle, ushort usLeftSpeed, u
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSetLEDColor( IntPtr self, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags );
private FSetLEDColor _SetLEDColor;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_SetLEDColor")]
private static extern void _SetLEDColor( IntPtr self, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags );
#endregion
internal void SetLEDColor( InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags )
@ -321,9 +266,8 @@ internal void SetLEDColor( InputHandle_t inputHandle, byte nColorR, byte nColorG
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FTriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
private FTriggerHapticPulse _TriggerHapticPulse;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerHapticPulse")]
private static extern void _TriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
#endregion
internal void TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec )
@ -332,9 +276,8 @@ internal void TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FTriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
private FTriggerRepeatedHapticPulse _TriggerRepeatedHapticPulse;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerRepeatedHapticPulse")]
private static extern void _TriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
#endregion
internal void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags )
@ -343,10 +286,9 @@ internal void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamContro
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ShowBindingPanel")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FShowBindingPanel( IntPtr self, InputHandle_t inputHandle );
private FShowBindingPanel _ShowBindingPanel;
private static extern bool _ShowBindingPanel( IntPtr self, InputHandle_t inputHandle );
#endregion
internal bool ShowBindingPanel( InputHandle_t inputHandle )
@ -356,9 +298,8 @@ internal bool ShowBindingPanel( InputHandle_t inputHandle )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate InputType FGetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle );
private FGetInputTypeForHandle _GetInputTypeForHandle;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetInputTypeForHandle")]
private static extern InputType _GetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle );
#endregion
internal InputType GetInputTypeForHandle( InputHandle_t inputHandle )
@ -368,9 +309,8 @@ internal InputType GetInputTypeForHandle( InputHandle_t inputHandle )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate InputHandle_t FGetControllerForGamepadIndex( IntPtr self, int nIndex );
private FGetControllerForGamepadIndex _GetControllerForGamepadIndex;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetControllerForGamepadIndex")]
private static extern InputHandle_t _GetControllerForGamepadIndex( IntPtr self, int nIndex );
#endregion
internal InputHandle_t GetControllerForGamepadIndex( int nIndex )
@ -380,9 +320,8 @@ internal InputHandle_t GetControllerForGamepadIndex( int nIndex )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle );
private FGetGamepadIndexForController _GetGamepadIndexForController;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGamepadIndexForController")]
private static extern int _GetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle );
#endregion
internal int GetGamepadIndexForController( InputHandle_t ulinputHandle )
@ -392,9 +331,8 @@ internal int GetGamepadIndexForController( InputHandle_t ulinputHandle )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate Utf8StringPointer FGetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
private FGetStringForXboxOrigin _GetStringForXboxOrigin;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForXboxOrigin")]
private static extern Utf8StringPointer _GetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
#endregion
internal string GetStringForXboxOrigin( XboxOrigin eOrigin )
@ -404,9 +342,8 @@ internal string GetStringForXboxOrigin( XboxOrigin eOrigin )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate Utf8StringPointer FGetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
private FGetGlyphForXboxOrigin _GetGlyphForXboxOrigin;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForXboxOrigin")]
private static extern Utf8StringPointer _GetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
#endregion
internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin )
@ -416,9 +353,8 @@ internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate InputActionOrigin FGetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin );
private FGetActionOriginFromXboxOrigin _GetActionOriginFromXboxOrigin;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin")]
private static extern InputActionOrigin _GetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin );
#endregion
internal InputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, XboxOrigin eOrigin )
@ -428,9 +364,8 @@ internal InputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHan
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate InputActionOrigin FTranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin );
private FTranslateActionOrigin _TranslateActionOrigin;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TranslateActionOrigin")]
private static extern InputActionOrigin _TranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin );
#endregion
internal InputActionOrigin TranslateActionOrigin( InputType eDestinationInputType, InputActionOrigin eSourceOrigin )

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -9,8 +9,6 @@ namespace Steamworks
{
internal class ISteamUGC : SteamInterface
{
public override string InterfaceName => "STEAMUGC_INTERFACE_VERSION012";
public override void InitInternals()
{
}
@ -21,9 +19,8 @@ internal override void Shutdown()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate UGCQueryHandle_t FCreateQueryUserUGCRequest( IntPtr self, AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage );
private FCreateQueryUserUGCRequest _CreateQueryUserUGCRequest;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUserUGCRequest")]
private static extern UGCQueryHandle_t _CreateQueryUserUGCRequest( IntPtr self, AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage );
#endregion
internal UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage )
@ -33,33 +30,30 @@ internal UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, Us
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate UGCQueryHandle_t FCreateQueryAllUGCRequest1( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage );
private FCreateQueryAllUGCRequest1 _CreateQueryAllUGCRequest1;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequest")]
private static extern UGCQueryHandle_t _CreateQueryAllUGCRequest( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage );
#endregion
internal UGCQueryHandle_t CreateQueryAllUGCRequest1( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage )
internal UGCQueryHandle_t CreateQueryAllUGCRequest( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage )
{
var returnValue = _CreateQueryAllUGCRequest1( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage );
var returnValue = _CreateQueryAllUGCRequest( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate UGCQueryHandle_t FCreateQueryAllUGCRequest2( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor );
private FCreateQueryAllUGCRequest2 _CreateQueryAllUGCRequest2;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequest0")]
private static extern UGCQueryHandle_t _CreateQueryAllUGCRequest0( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor );
#endregion
internal UGCQueryHandle_t CreateQueryAllUGCRequest2( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor )
internal UGCQueryHandle_t 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;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate UGCQueryHandle_t FCreateQueryUGCDetailsRequest( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
private FCreateQueryUGCDetailsRequest _CreateQueryUGCDetailsRequest;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest")]
private static extern UGCQueryHandle_t _CreateQueryUGCDetailsRequest( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
#endregion
internal UGCQueryHandle_t CreateQueryUGCDetailsRequest( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs )
@ -69,22 +63,20 @@ internal UGCQueryHandle_t CreateQueryUGCDetailsRequest( [In,Out] PublishedFileId
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FSendQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle );
private FSendQueryUGCRequest _SendQueryUGCRequest;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SendQueryUGCRequest")]
private static extern SteamAPICall_t _SendQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle );
#endregion
internal async Task<SteamUGCQueryCompleted_t?> SendQueryUGCRequest( UGCQueryHandle_t handle )
internal CallbackResult SendQueryUGCRequest( UGCQueryHandle_t handle )
{
var returnValue = _SendQueryUGCRequest( Self, handle );
return await SteamUGCQueryCompleted_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCResult")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCResult( IntPtr self, UGCQueryHandle_t handle, uint index, ref SteamUGCDetails_t pDetails );
private FGetQueryUGCResult _GetQueryUGCResult;
private static extern bool _GetQueryUGCResult( IntPtr self, UGCQueryHandle_t handle, uint index, ref SteamUGCDetails_t pDetails );
#endregion
internal bool GetQueryUGCResult( UGCQueryHandle_t handle, uint index, ref SteamUGCDetails_t pDetails )
@ -94,10 +86,9 @@ internal bool GetQueryUGCResult( UGCQueryHandle_t handle, uint index, ref SteamU
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCPreviewURL")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCPreviewURL( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchURL, uint cchURLSize );
private FGetQueryUGCPreviewURL _GetQueryUGCPreviewURL;
private static extern bool _GetQueryUGCPreviewURL( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchURL, uint cchURLSize );
#endregion
internal bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint index, out string pchURL )
@ -109,10 +100,9 @@ internal bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle, uint index, out st
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCMetadata")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCMetadata( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchMetadata, uint cchMetadatasize );
private FGetQueryUGCMetadata _GetQueryUGCMetadata;
private static extern bool _GetQueryUGCMetadata( IntPtr self, UGCQueryHandle_t handle, uint index, IntPtr pchMetadata, uint cchMetadatasize );
#endregion
internal bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint index, out string pchMetadata )
@ -124,10 +114,9 @@ internal bool GetQueryUGCMetadata( UGCQueryHandle_t handle, uint index, out stri
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCChildren")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCChildren( IntPtr self, UGCQueryHandle_t handle, uint index, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries );
private FGetQueryUGCChildren _GetQueryUGCChildren;
private static extern bool _GetQueryUGCChildren( IntPtr self, UGCQueryHandle_t handle, uint index, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries );
#endregion
internal bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint index, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries )
@ -137,10 +126,9 @@ internal bool GetQueryUGCChildren( UGCQueryHandle_t handle, uint index, [In,Out]
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCStatistic")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCStatistic( IntPtr self, UGCQueryHandle_t handle, uint index, ItemStatistic eStatType, ref ulong pStatValue );
private FGetQueryUGCStatistic _GetQueryUGCStatistic;
private static extern bool _GetQueryUGCStatistic( IntPtr self, UGCQueryHandle_t handle, uint index, ItemStatistic eStatType, ref ulong pStatValue );
#endregion
internal bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint index, ItemStatistic eStatType, ref ulong pStatValue )
@ -150,9 +138,8 @@ internal bool GetQueryUGCStatistic( UGCQueryHandle_t handle, uint index, ItemSta
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate uint FGetQueryUGCNumAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, uint index );
private FGetQueryUGCNumAdditionalPreviews _GetQueryUGCNumAdditionalPreviews;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumAdditionalPreviews")]
private static extern uint _GetQueryUGCNumAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, uint index );
#endregion
internal uint GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint index )
@ -162,10 +149,9 @@ internal uint GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint in
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCAdditionalPreview( IntPtr self, UGCQueryHandle_t handle, uint index, uint previewIndex, IntPtr pchURLOrVideoID, uint cchURLSize, IntPtr pchOriginalFileName, uint cchOriginalFileNameSize, ref ItemPreviewType pPreviewType );
private FGetQueryUGCAdditionalPreview _GetQueryUGCAdditionalPreview;
private static extern bool _GetQueryUGCAdditionalPreview( IntPtr self, UGCQueryHandle_t handle, uint index, uint previewIndex, IntPtr pchURLOrVideoID, uint cchURLSize, IntPtr pchOriginalFileName, uint cchOriginalFileNameSize, ref ItemPreviewType pPreviewType );
#endregion
internal bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint index, uint previewIndex, out string pchURLOrVideoID, out string pchOriginalFileName, ref ItemPreviewType pPreviewType )
@ -179,9 +165,8 @@ internal bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle, uint index,
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate uint FGetQueryUGCNumKeyValueTags( IntPtr self, UGCQueryHandle_t handle, uint index );
private FGetQueryUGCNumKeyValueTags _GetQueryUGCNumKeyValueTags;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumKeyValueTags")]
private static extern uint _GetQueryUGCNumKeyValueTags( IntPtr self, UGCQueryHandle_t handle, uint index );
#endregion
internal uint GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint index )
@ -191,10 +176,9 @@ internal uint GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint index )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetQueryUGCKeyValueTag( IntPtr self, UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, IntPtr pchKey, uint cchKeySize, IntPtr pchValue, uint cchValueSize );
private FGetQueryUGCKeyValueTag _GetQueryUGCKeyValueTag;
private static extern bool _GetQueryUGCKeyValueTag( IntPtr self, UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, IntPtr pchKey, uint cchKeySize, IntPtr pchValue, uint cchValueSize );
#endregion
internal bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint index, uint keyValueTagIndex, out string pchKey, out string pchValue )
@ -208,10 +192,9 @@ internal bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint index, uint
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_ReleaseQueryUGCRequest")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FReleaseQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle );
private FReleaseQueryUGCRequest _ReleaseQueryUGCRequest;
private static extern bool _ReleaseQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle );
#endregion
internal bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle )
@ -221,10 +204,9 @@ internal bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredTag")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddRequiredTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName );
private FAddRequiredTag _AddRequiredTag;
private static extern bool _AddRequiredTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName );
#endregion
internal bool AddRequiredTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName )
@ -234,10 +216,9 @@ internal bool AddRequiredTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddExcludedTag")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddExcludedTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName );
private FAddExcludedTag _AddExcludedTag;
private static extern bool _AddExcludedTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName );
#endregion
internal bool AddExcludedTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName )
@ -247,10 +228,9 @@ internal bool AddExcludedTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnOnlyIDs")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnOnlyIDs( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnOnlyIDs );
private FSetReturnOnlyIDs _SetReturnOnlyIDs;
private static extern bool _SetReturnOnlyIDs( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnOnlyIDs );
#endregion
internal bool SetReturnOnlyIDs( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnOnlyIDs )
@ -260,10 +240,9 @@ internal bool SetReturnOnlyIDs( UGCQueryHandle_t handle, [MarshalAs( UnmanagedTy
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnKeyValueTags")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnKeyValueTags( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnKeyValueTags );
private FSetReturnKeyValueTags _SetReturnKeyValueTags;
private static extern bool _SetReturnKeyValueTags( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnKeyValueTags );
#endregion
internal bool SetReturnKeyValueTags( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnKeyValueTags )
@ -273,10 +252,9 @@ internal bool SetReturnKeyValueTags( UGCQueryHandle_t handle, [MarshalAs( Unmana
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnLongDescription")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnLongDescription( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnLongDescription );
private FSetReturnLongDescription _SetReturnLongDescription;
private static extern bool _SetReturnLongDescription( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnLongDescription );
#endregion
internal bool SetReturnLongDescription( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnLongDescription )
@ -286,10 +264,9 @@ internal bool SetReturnLongDescription( UGCQueryHandle_t handle, [MarshalAs( Unm
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnMetadata")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnMetadata( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnMetadata );
private FSetReturnMetadata _SetReturnMetadata;
private static extern bool _SetReturnMetadata( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnMetadata );
#endregion
internal bool SetReturnMetadata( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnMetadata )
@ -299,10 +276,9 @@ internal bool SetReturnMetadata( UGCQueryHandle_t handle, [MarshalAs( UnmanagedT
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnChildren")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnChildren( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnChildren );
private FSetReturnChildren _SetReturnChildren;
private static extern bool _SetReturnChildren( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnChildren );
#endregion
internal bool SetReturnChildren( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnChildren )
@ -312,10 +288,9 @@ internal bool SetReturnChildren( UGCQueryHandle_t handle, [MarshalAs( UnmanagedT
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnAdditionalPreviews")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnAdditionalPreviews );
private FSetReturnAdditionalPreviews _SetReturnAdditionalPreviews;
private static extern bool _SetReturnAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnAdditionalPreviews );
#endregion
internal bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnAdditionalPreviews )
@ -325,10 +300,9 @@ internal bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle, [MarshalAs(
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnTotalOnly")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnTotalOnly( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnTotalOnly );
private FSetReturnTotalOnly _SetReturnTotalOnly;
private static extern bool _SetReturnTotalOnly( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnTotalOnly );
#endregion
internal bool SetReturnTotalOnly( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bReturnTotalOnly )
@ -338,10 +312,9 @@ internal bool SetReturnTotalOnly( UGCQueryHandle_t handle, [MarshalAs( Unmanaged
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnPlaytimeStats")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetReturnPlaytimeStats( IntPtr self, UGCQueryHandle_t handle, uint unDays );
private FSetReturnPlaytimeStats _SetReturnPlaytimeStats;
private static extern bool _SetReturnPlaytimeStats( IntPtr self, UGCQueryHandle_t handle, uint unDays );
#endregion
internal bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint unDays )
@ -351,10 +324,9 @@ internal bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint unDays )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetLanguage")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetLanguage( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage );
private FSetLanguage _SetLanguage;
private static extern bool _SetLanguage( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage );
#endregion
internal bool SetLanguage( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage )
@ -364,10 +336,9 @@ internal bool SetLanguage( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.Cu
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetAllowCachedResponse")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetAllowCachedResponse( IntPtr self, UGCQueryHandle_t handle, uint unMaxAgeSeconds );
private FSetAllowCachedResponse _SetAllowCachedResponse;
private static extern bool _SetAllowCachedResponse( IntPtr self, UGCQueryHandle_t handle, uint unMaxAgeSeconds );
#endregion
internal bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint unMaxAgeSeconds )
@ -377,10 +348,9 @@ internal bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint unMaxAgeSeco
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetCloudFileNameFilter")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetCloudFileNameFilter( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pMatchCloudFileName );
private FSetCloudFileNameFilter _SetCloudFileNameFilter;
private static extern bool _SetCloudFileNameFilter( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pMatchCloudFileName );
#endregion
internal bool SetCloudFileNameFilter( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pMatchCloudFileName )
@ -390,10 +360,9 @@ internal bool SetCloudFileNameFilter( UGCQueryHandle_t handle, [MarshalAs( Unman
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetMatchAnyTag")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetMatchAnyTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bMatchAnyTag );
private FSetMatchAnyTag _SetMatchAnyTag;
private static extern bool _SetMatchAnyTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bMatchAnyTag );
#endregion
internal bool SetMatchAnyTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bMatchAnyTag )
@ -403,10 +372,9 @@ internal bool SetMatchAnyTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetSearchText")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetSearchText( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pSearchText );
private FSetSearchText _SetSearchText;
private static extern bool _SetSearchText( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pSearchText );
#endregion
internal bool SetSearchText( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pSearchText )
@ -416,10 +384,9 @@ internal bool SetSearchText( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetRankedByTrendDays")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetRankedByTrendDays( IntPtr self, UGCQueryHandle_t handle, uint unDays );
private FSetRankedByTrendDays _SetRankedByTrendDays;
private static extern bool _SetRankedByTrendDays( IntPtr self, UGCQueryHandle_t handle, uint unDays );
#endregion
internal bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint unDays )
@ -429,10 +396,9 @@ internal bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint unDays )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredKeyValueTag")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddRequiredKeyValueTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue );
private FAddRequiredKeyValueTag _AddRequiredKeyValueTag;
private static extern bool _AddRequiredKeyValueTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue );
#endregion
internal bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue )
@ -442,33 +408,30 @@ internal bool AddRequiredKeyValueTag( UGCQueryHandle_t handle, [MarshalAs( Unman
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FRequestUGCDetails( IntPtr self, PublishedFileId nPublishedFileID, uint unMaxAgeSeconds );
private FRequestUGCDetails _RequestUGCDetails;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RequestUGCDetails")]
private static extern SteamAPICall_t _RequestUGCDetails( IntPtr self, PublishedFileId nPublishedFileID, uint unMaxAgeSeconds );
#endregion
internal async Task<SteamUGCRequestUGCDetailsResult_t?> RequestUGCDetails( PublishedFileId nPublishedFileID, uint unMaxAgeSeconds )
internal CallbackResult RequestUGCDetails( PublishedFileId nPublishedFileID, uint unMaxAgeSeconds )
{
var returnValue = _RequestUGCDetails( Self, nPublishedFileID, unMaxAgeSeconds );
return await SteamUGCRequestUGCDetailsResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FCreateItem( IntPtr self, AppId nConsumerAppId, WorkshopFileType eFileType );
private FCreateItem _CreateItem;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateItem")]
private static extern SteamAPICall_t _CreateItem( IntPtr self, AppId nConsumerAppId, WorkshopFileType eFileType );
#endregion
internal async Task<CreateItemResult_t?> CreateItem( AppId nConsumerAppId, WorkshopFileType eFileType )
internal CallbackResult CreateItem( AppId nConsumerAppId, WorkshopFileType eFileType )
{
var returnValue = _CreateItem( Self, nConsumerAppId, eFileType );
return await CreateItemResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate UGCUpdateHandle_t FStartItemUpdate( IntPtr self, AppId nConsumerAppId, PublishedFileId nPublishedFileID );
private FStartItemUpdate _StartItemUpdate;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StartItemUpdate")]
private static extern UGCUpdateHandle_t _StartItemUpdate( IntPtr self, AppId nConsumerAppId, PublishedFileId nPublishedFileID );
#endregion
internal UGCUpdateHandle_t StartItemUpdate( AppId nConsumerAppId, PublishedFileId nPublishedFileID )
@ -478,10 +441,9 @@ internal UGCUpdateHandle_t StartItemUpdate( AppId nConsumerAppId, PublishedFileI
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemTitle")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemTitle( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTitle );
private FSetItemTitle _SetItemTitle;
private static extern bool _SetItemTitle( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTitle );
#endregion
internal bool SetItemTitle( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTitle )
@ -491,10 +453,9 @@ internal bool SetItemTitle( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemDescription")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemDescription( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription );
private FSetItemDescription _SetItemDescription;
private static extern bool _SetItemDescription( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription );
#endregion
internal bool SetItemDescription( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription )
@ -504,10 +465,9 @@ internal bool SetItemDescription( UGCUpdateHandle_t handle, [MarshalAs( Unmanage
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemUpdateLanguage")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemUpdateLanguage( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage );
private FSetItemUpdateLanguage _SetItemUpdateLanguage;
private static extern bool _SetItemUpdateLanguage( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage );
#endregion
internal bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLanguage )
@ -517,10 +477,9 @@ internal bool SetItemUpdateLanguage( UGCUpdateHandle_t handle, [MarshalAs( Unman
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemMetadata")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemMetadata( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetaData );
private FSetItemMetadata _SetItemMetadata;
private static extern bool _SetItemMetadata( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetaData );
#endregion
internal bool SetItemMetadata( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetaData )
@ -530,10 +489,9 @@ internal bool SetItemMetadata( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedTy
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemVisibility")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemVisibility( IntPtr self, UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility );
private FSetItemVisibility _SetItemVisibility;
private static extern bool _SetItemVisibility( IntPtr self, UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility );
#endregion
internal bool SetItemVisibility( UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility )
@ -543,10 +501,9 @@ internal bool SetItemVisibility( UGCUpdateHandle_t handle, RemoteStoragePublishe
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemTags")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemTags( IntPtr self, UGCUpdateHandle_t updateHandle, ref SteamParamStringArray_t pTags );
private FSetItemTags _SetItemTags;
private static extern bool _SetItemTags( IntPtr self, UGCUpdateHandle_t updateHandle, ref SteamParamStringArray_t pTags );
#endregion
internal bool SetItemTags( UGCUpdateHandle_t updateHandle, ref SteamParamStringArray_t pTags )
@ -556,10 +513,9 @@ internal bool SetItemTags( UGCUpdateHandle_t updateHandle, ref SteamParamStringA
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemContent")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemContent( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszContentFolder );
private FSetItemContent _SetItemContent;
private static extern bool _SetItemContent( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszContentFolder );
#endregion
internal bool SetItemContent( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszContentFolder )
@ -569,10 +525,9 @@ internal bool SetItemContent( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedTyp
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemPreview")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetItemPreview( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile );
private FSetItemPreview _SetItemPreview;
private static extern bool _SetItemPreview( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile );
#endregion
internal bool SetItemPreview( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile )
@ -582,10 +537,9 @@ internal bool SetItemPreview( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedTyp
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetAllowLegacyUpload")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetAllowLegacyUpload( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bAllowLegacyUpload );
private FSetAllowLegacyUpload _SetAllowLegacyUpload;
private static extern bool _SetAllowLegacyUpload( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bAllowLegacyUpload );
#endregion
internal bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.U1 )] bool bAllowLegacyUpload )
@ -595,10 +549,9 @@ internal bool SetAllowLegacyUpload( UGCUpdateHandle_t handle, [MarshalAs( Unmana
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemKeyValueTags")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRemoveItemKeyValueTags( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
private FRemoveItemKeyValueTags _RemoveItemKeyValueTags;
private static extern bool _RemoveItemKeyValueTags( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
#endregion
internal bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
@ -608,10 +561,9 @@ internal bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, [MarshalAs( Unma
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemKeyValueTag")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddItemKeyValueTag( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
private FAddItemKeyValueTag _AddItemKeyValueTag;
private static extern bool _AddItemKeyValueTag( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
#endregion
internal bool AddItemKeyValueTag( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
@ -621,10 +573,9 @@ internal bool AddItemKeyValueTag( UGCUpdateHandle_t handle, [MarshalAs( Unmanage
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemPreviewFile")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile, ItemPreviewType type );
private FAddItemPreviewFile _AddItemPreviewFile;
private static extern bool _AddItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile, ItemPreviewType type );
#endregion
internal bool AddItemPreviewFile( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile, ItemPreviewType type )
@ -634,10 +585,9 @@ internal bool AddItemPreviewFile( UGCUpdateHandle_t handle, [MarshalAs( Unmanage
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemPreviewVideo")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FAddItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID );
private FAddItemPreviewVideo _AddItemPreviewVideo;
private static extern bool _AddItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID );
#endregion
internal bool AddItemPreviewVideo( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID )
@ -647,10 +597,9 @@ internal bool AddItemPreviewVideo( UGCUpdateHandle_t handle, [MarshalAs( Unmanag
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UpdateItemPreviewFile")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FUpdateItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile );
private FUpdateItemPreviewFile _UpdateItemPreviewFile;
private static extern bool _UpdateItemPreviewFile( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile );
#endregion
internal bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszPreviewFile )
@ -660,10 +609,9 @@ internal bool UpdateItemPreviewFile( UGCUpdateHandle_t handle, uint index, [Mars
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UpdateItemPreviewVideo")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FUpdateItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID );
private FUpdateItemPreviewVideo _UpdateItemPreviewVideo;
private static extern bool _UpdateItemPreviewVideo( IntPtr self, UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID );
#endregion
internal bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszVideoID )
@ -673,10 +621,9 @@ internal bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle, uint index, [Mar
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemPreview")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRemoveItemPreview( IntPtr self, UGCUpdateHandle_t handle, uint index );
private FRemoveItemPreview _RemoveItemPreview;
private static extern bool _RemoveItemPreview( IntPtr self, UGCUpdateHandle_t handle, uint index );
#endregion
internal bool RemoveItemPreview( UGCUpdateHandle_t handle, uint index )
@ -686,21 +633,19 @@ internal bool RemoveItemPreview( UGCUpdateHandle_t handle, uint index )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FSubmitItemUpdate( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote );
private FSubmitItemUpdate _SubmitItemUpdate;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SubmitItemUpdate")]
private static extern SteamAPICall_t _SubmitItemUpdate( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote );
#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 );
return await SubmitItemUpdateResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate ItemUpdateStatus FGetItemUpdateProgress( IntPtr self, UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal );
private FGetItemUpdateProgress _GetItemUpdateProgress;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemUpdateProgress")]
private static extern ItemUpdateStatus _GetItemUpdateProgress( IntPtr self, UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal );
#endregion
internal ItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal )
@ -710,81 +655,74 @@ internal ItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, ref u
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FSetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp );
private FSetUserItemVote _SetUserItemVote;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetUserItemVote")]
private static extern SteamAPICall_t _SetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp );
#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 );
return await SetUserItemVoteResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FGetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID );
private FGetUserItemVote _GetUserItemVote;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetUserItemVote")]
private static extern SteamAPICall_t _GetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID );
#endregion
internal async Task<GetUserItemVoteResult_t?> GetUserItemVote( PublishedFileId nPublishedFileID )
internal CallbackResult GetUserItemVote( PublishedFileId nPublishedFileID )
{
var returnValue = _GetUserItemVote( Self, nPublishedFileID );
return await GetUserItemVoteResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FAddItemToFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID );
private FAddItemToFavorites _AddItemToFavorites;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemToFavorites")]
private static extern SteamAPICall_t _AddItemToFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID );
#endregion
internal async Task<UserFavoriteItemsListChanged_t?> AddItemToFavorites( AppId nAppId, PublishedFileId nPublishedFileID )
internal CallbackResult AddItemToFavorites( AppId nAppId, PublishedFileId nPublishedFileID )
{
var returnValue = _AddItemToFavorites( Self, nAppId, nPublishedFileID );
return await UserFavoriteItemsListChanged_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FRemoveItemFromFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID );
private FRemoveItemFromFavorites _RemoveItemFromFavorites;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemFromFavorites")]
private static extern SteamAPICall_t _RemoveItemFromFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID );
#endregion
internal async Task<UserFavoriteItemsListChanged_t?> RemoveItemFromFavorites( AppId nAppId, PublishedFileId nPublishedFileID )
internal CallbackResult RemoveItemFromFavorites( AppId nAppId, PublishedFileId nPublishedFileID )
{
var returnValue = _RemoveItemFromFavorites( Self, nAppId, nPublishedFileID );
return await UserFavoriteItemsListChanged_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FSubscribeItem( IntPtr self, PublishedFileId nPublishedFileID );
private FSubscribeItem _SubscribeItem;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SubscribeItem")]
private static extern SteamAPICall_t _SubscribeItem( IntPtr self, PublishedFileId nPublishedFileID );
#endregion
internal async Task<RemoteStorageSubscribePublishedFileResult_t?> SubscribeItem( PublishedFileId nPublishedFileID )
internal CallbackResult SubscribeItem( PublishedFileId nPublishedFileID )
{
var returnValue = _SubscribeItem( Self, nPublishedFileID );
return await RemoteStorageSubscribePublishedFileResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FUnsubscribeItem( IntPtr self, PublishedFileId nPublishedFileID );
private FUnsubscribeItem _UnsubscribeItem;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UnsubscribeItem")]
private static extern SteamAPICall_t _UnsubscribeItem( IntPtr self, PublishedFileId nPublishedFileID );
#endregion
internal async Task<RemoteStorageUnsubscribePublishedFileResult_t?> UnsubscribeItem( PublishedFileId nPublishedFileID )
internal CallbackResult UnsubscribeItem( PublishedFileId nPublishedFileID )
{
var returnValue = _UnsubscribeItem( Self, nPublishedFileID );
return await RemoteStorageUnsubscribePublishedFileResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate uint FGetNumSubscribedItems( IntPtr self );
private FGetNumSubscribedItems _GetNumSubscribedItems;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetNumSubscribedItems")]
private static extern uint _GetNumSubscribedItems( IntPtr self );
#endregion
internal uint GetNumSubscribedItems()
@ -794,9 +732,8 @@ internal uint GetNumSubscribedItems()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate uint FGetSubscribedItems( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries );
private FGetSubscribedItems _GetSubscribedItems;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetSubscribedItems")]
private static extern uint _GetSubscribedItems( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries );
#endregion
internal uint GetSubscribedItems( [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries )
@ -806,9 +743,8 @@ internal uint GetSubscribedItems( [In,Out] PublishedFileId[] pvecPublishedFileI
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate uint FGetItemState( IntPtr self, PublishedFileId nPublishedFileID );
private FGetItemState _GetItemState;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemState")]
private static extern uint _GetItemState( IntPtr self, PublishedFileId nPublishedFileID );
#endregion
internal uint GetItemState( PublishedFileId nPublishedFileID )
@ -818,10 +754,9 @@ internal uint GetItemState( PublishedFileId nPublishedFileID )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemInstallInfo")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemInstallInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punSizeOnDisk, IntPtr pchFolder, uint cchFolderSize, ref uint punTimeStamp );
private FGetItemInstallInfo _GetItemInstallInfo;
private static extern bool _GetItemInstallInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punSizeOnDisk, IntPtr pchFolder, uint cchFolderSize, ref uint punTimeStamp );
#endregion
internal bool GetItemInstallInfo( PublishedFileId nPublishedFileID, ref ulong punSizeOnDisk, out string pchFolder, ref uint punTimeStamp )
@ -833,10 +768,9 @@ internal bool GetItemInstallInfo( PublishedFileId nPublishedFileID, ref ulong pu
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemDownloadInfo")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetItemDownloadInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punBytesDownloaded, ref ulong punBytesTotal );
private FGetItemDownloadInfo _GetItemDownloadInfo;
private static extern bool _GetItemDownloadInfo( IntPtr self, PublishedFileId nPublishedFileID, ref ulong punBytesDownloaded, ref ulong punBytesTotal );
#endregion
internal bool GetItemDownloadInfo( PublishedFileId nPublishedFileID, ref ulong punBytesDownloaded, ref ulong punBytesTotal )
@ -846,10 +780,9 @@ internal bool GetItemDownloadInfo( PublishedFileId nPublishedFileID, ref ulong p
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_DownloadItem")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FDownloadItem( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bHighPriority );
private FDownloadItem _DownloadItem;
private static extern bool _DownloadItem( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bHighPriority );
#endregion
internal bool DownloadItem( PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bHighPriority )
@ -859,10 +792,9 @@ internal bool DownloadItem( PublishedFileId nPublishedFileID, [MarshalAs( Unmana
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_BInitWorkshopForGameServer")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBInitWorkshopForGameServer( IntPtr self, DepotId_t unWorkshopDepotID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFolder );
private FBInitWorkshopForGameServer _BInitWorkshopForGameServer;
private static extern bool _BInitWorkshopForGameServer( IntPtr self, DepotId_t unWorkshopDepotID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFolder );
#endregion
internal bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFolder )
@ -872,9 +804,8 @@ internal bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID, [MarshalA
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FSuspendDownloads( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bSuspend );
private FSuspendDownloads _SuspendDownloads;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SuspendDownloads")]
private static extern void _SuspendDownloads( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bSuspend );
#endregion
internal void SuspendDownloads( [MarshalAs( UnmanagedType.U1 )] bool bSuspend )
@ -883,111 +814,102 @@ internal void SuspendDownloads( [MarshalAs( UnmanagedType.U1 )] bool bSuspend )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FStartPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
private FStartPlaytimeTracking _StartPlaytimeTracking;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StartPlaytimeTracking")]
private static extern SteamAPICall_t _StartPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
#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 );
return await StartPlaytimeTrackingResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FStopPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
private FStopPlaytimeTracking _StopPlaytimeTracking;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StopPlaytimeTracking")]
private static extern SteamAPICall_t _StopPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
#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 );
return await StopPlaytimeTrackingResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FStopPlaytimeTrackingForAllItems( IntPtr self );
private FStopPlaytimeTrackingForAllItems _StopPlaytimeTrackingForAllItems;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems")]
private static extern SteamAPICall_t _StopPlaytimeTrackingForAllItems( IntPtr self );
#endregion
internal async Task<StopPlaytimeTrackingResult_t?> StopPlaytimeTrackingForAllItems()
internal CallbackResult StopPlaytimeTrackingForAllItems()
{
var returnValue = _StopPlaytimeTrackingForAllItems( Self );
return await StopPlaytimeTrackingResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FAddDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID );
private FAddDependency _AddDependency;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddDependency")]
private static extern SteamAPICall_t _AddDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID );
#endregion
internal async Task<AddUGCDependencyResult_t?> AddDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID )
internal CallbackResult AddDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID )
{
var returnValue = _AddDependency( Self, nParentPublishedFileID, nChildPublishedFileID );
return await AddUGCDependencyResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FRemoveDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID );
private FRemoveDependency _RemoveDependency;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveDependency")]
private static extern SteamAPICall_t _RemoveDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID );
#endregion
internal async Task<RemoveUGCDependencyResult_t?> RemoveDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID )
internal CallbackResult RemoveDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID )
{
var returnValue = _RemoveDependency( Self, nParentPublishedFileID, nChildPublishedFileID );
return await RemoveUGCDependencyResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FAddAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID );
private FAddAppDependency _AddAppDependency;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddAppDependency")]
private static extern SteamAPICall_t _AddAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID );
#endregion
internal async Task<AddAppDependencyResult_t?> AddAppDependency( PublishedFileId nPublishedFileID, AppId nAppID )
internal CallbackResult AddAppDependency( PublishedFileId nPublishedFileID, AppId nAppID )
{
var returnValue = _AddAppDependency( Self, nPublishedFileID, nAppID );
return await AddAppDependencyResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FRemoveAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID );
private FRemoveAppDependency _RemoveAppDependency;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveAppDependency")]
private static extern SteamAPICall_t _RemoveAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID );
#endregion
internal async Task<RemoveAppDependencyResult_t?> RemoveAppDependency( PublishedFileId nPublishedFileID, AppId nAppID )
internal CallbackResult RemoveAppDependency( PublishedFileId nPublishedFileID, AppId nAppID )
{
var returnValue = _RemoveAppDependency( Self, nPublishedFileID, nAppID );
return await RemoveAppDependencyResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FGetAppDependencies( IntPtr self, PublishedFileId nPublishedFileID );
private FGetAppDependencies _GetAppDependencies;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetAppDependencies")]
private static extern SteamAPICall_t _GetAppDependencies( IntPtr self, PublishedFileId nPublishedFileID );
#endregion
internal async Task<GetAppDependenciesResult_t?> GetAppDependencies( PublishedFileId nPublishedFileID )
internal CallbackResult GetAppDependencies( PublishedFileId nPublishedFileID )
{
var returnValue = _GetAppDependencies( Self, nPublishedFileID );
return await GetAppDependenciesResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FDeleteItem( IntPtr self, PublishedFileId nPublishedFileID );
private FDeleteItem _DeleteItem;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_DeleteItem")]
private static extern SteamAPICall_t _DeleteItem( IntPtr self, PublishedFileId nPublishedFileID );
#endregion
internal async Task<DeleteItemResult_t?> DeleteItem( PublishedFileId nPublishedFileID )
internal CallbackResult DeleteItem( PublishedFileId 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
{
public override string InterfaceName => "SteamUser020";
public override void InitInternals()
{
}
@ -21,9 +19,8 @@ internal override void Shutdown()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate HSteamUser FGetHSteamUser( IntPtr self );
private FGetHSteamUser _GetHSteamUser;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetHSteamUser")]
private static extern HSteamUser _GetHSteamUser( IntPtr self );
#endregion
internal HSteamUser GetHSteamUser()
@ -33,10 +30,9 @@ internal HSteamUser GetHSteamUser()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BLoggedOn")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBLoggedOn( IntPtr self );
private FBLoggedOn _BLoggedOn;
private static extern bool _BLoggedOn( IntPtr self );
#endregion
internal bool BLoggedOn()
@ -46,31 +42,19 @@ internal bool BLoggedOn()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
#if PLATFORM_WIN
private delegate void FGetSteamID( IntPtr self, ref SteamId retVal );
#else
private delegate SteamId FGetSteamID( IntPtr self );
#endif
private FGetSteamID _GetSteamID;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetSteamID")]
private static extern SteamId _GetSteamID( IntPtr self );
#endregion
internal SteamId GetSteamID()
{
#if PLATFORM_WIN
var retVal = default( SteamId );
_GetSteamID( Self, ref retVal );
return retVal;
#else
var returnValue = _GetSteamID( Self );
return returnValue;
#endif
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FInitiateGameConnection( IntPtr self, IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure );
private FInitiateGameConnection _InitiateGameConnection;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_InitiateGameConnection")]
private static extern int _InitiateGameConnection( IntPtr self, IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure );
#endregion
internal int InitiateGameConnection( IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure )
@ -80,9 +64,8 @@ internal int InitiateGameConnection( IntPtr pAuthBlob, int cbMaxAuthBlob, SteamI
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FTerminateGameConnection( IntPtr self, uint unIPServer, ushort usPortServer );
private FTerminateGameConnection _TerminateGameConnection;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_TerminateGameConnection")]
private static extern void _TerminateGameConnection( IntPtr self, uint unIPServer, ushort usPortServer );
#endregion
internal void TerminateGameConnection( uint unIPServer, ushort usPortServer )
@ -91,9 +74,8 @@ internal void TerminateGameConnection( uint unIPServer, ushort usPortServer )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FTrackAppUsageEvent( IntPtr self, GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo );
private FTrackAppUsageEvent _TrackAppUsageEvent;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_TrackAppUsageEvent")]
private static extern void _TrackAppUsageEvent( IntPtr self, GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo );
#endregion
internal void TrackAppUsageEvent( GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo )
@ -102,10 +84,9 @@ internal void TrackAppUsageEvent( GameId gameID, int eAppUsageEvent, [MarshalAs(
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetUserDataFolder")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserDataFolder( IntPtr self, IntPtr pchBuffer, int cubBuffer );
private FGetUserDataFolder _GetUserDataFolder;
private static extern bool _GetUserDataFolder( IntPtr self, IntPtr pchBuffer, int cubBuffer );
#endregion
internal bool GetUserDataFolder( out string pchBuffer )
@ -117,9 +98,8 @@ internal bool GetUserDataFolder( out string pchBuffer )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FStartVoiceRecording( IntPtr self );
private FStartVoiceRecording _StartVoiceRecording;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_StartVoiceRecording")]
private static extern void _StartVoiceRecording( IntPtr self );
#endregion
internal void StartVoiceRecording()
@ -128,9 +108,8 @@ internal void StartVoiceRecording()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FStopVoiceRecording( IntPtr self );
private FStopVoiceRecording _StopVoiceRecording;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_StopVoiceRecording")]
private static extern void _StopVoiceRecording( IntPtr self );
#endregion
internal void StopVoiceRecording()
@ -139,9 +118,8 @@ internal void StopVoiceRecording()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate VoiceResult FGetAvailableVoice( IntPtr self, ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
private FGetAvailableVoice _GetAvailableVoice;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetAvailableVoice")]
private static extern VoiceResult _GetAvailableVoice( IntPtr self, ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
#endregion
internal VoiceResult GetAvailableVoice( ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated )
@ -151,9 +129,8 @@ internal VoiceResult GetAvailableVoice( ref uint pcbCompressed, ref uint pcbUnco
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate VoiceResult FGetVoice( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
private FGetVoice _GetVoice;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetVoice")]
private static extern VoiceResult _GetVoice( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
#endregion
internal VoiceResult GetVoice( [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated )
@ -163,9 +140,8 @@ internal VoiceResult GetVoice( [MarshalAs( UnmanagedType.U1 )] bool bWantCompres
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate VoiceResult FDecompressVoice( IntPtr self, IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate );
private FDecompressVoice _DecompressVoice;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_DecompressVoice")]
private static extern VoiceResult _DecompressVoice( IntPtr self, IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate );
#endregion
internal VoiceResult DecompressVoice( IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate )
@ -175,9 +151,8 @@ internal VoiceResult DecompressVoice( IntPtr pCompressed, uint cbCompressed, Int
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate uint FGetVoiceOptimalSampleRate( IntPtr self );
private FGetVoiceOptimalSampleRate _GetVoiceOptimalSampleRate;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetVoiceOptimalSampleRate")]
private static extern uint _GetVoiceOptimalSampleRate( IntPtr self );
#endregion
internal uint GetVoiceOptimalSampleRate()
@ -187,9 +162,8 @@ internal uint GetVoiceOptimalSampleRate()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
private FGetAuthSessionTicket _GetAuthSessionTicket;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetAuthSessionTicket")]
private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
#endregion
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
@ -199,9 +173,8 @@ internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate BeginAuthResult FBeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
private FBeginAuthSession _BeginAuthSession;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BeginAuthSession")]
private static extern BeginAuthResult _BeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
#endregion
internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID )
@ -211,9 +184,8 @@ internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket,
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FEndAuthSession( IntPtr self, SteamId steamID );
private FEndAuthSession _EndAuthSession;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_EndAuthSession")]
private static extern void _EndAuthSession( IntPtr self, SteamId steamID );
#endregion
internal void EndAuthSession( SteamId steamID )
@ -222,9 +194,8 @@ internal void EndAuthSession( SteamId steamID )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FCancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
private FCancelAuthTicket _CancelAuthTicket;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_CancelAuthTicket")]
private static extern void _CancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
#endregion
internal void CancelAuthTicket( HAuthTicket hAuthTicket )
@ -233,9 +204,8 @@ internal void CancelAuthTicket( HAuthTicket hAuthTicket )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate UserHasLicenseForAppResult FUserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
private FUserHasLicenseForApp _UserHasLicenseForApp;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_UserHasLicenseForApp")]
private static extern UserHasLicenseForAppResult _UserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
#endregion
internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID )
@ -245,10 +215,9 @@ internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsBehindNAT")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsBehindNAT( IntPtr self );
private FBIsBehindNAT _BIsBehindNAT;
private static extern bool _BIsBehindNAT( IntPtr self );
#endregion
internal bool BIsBehindNAT()
@ -258,9 +227,8 @@ internal bool BIsBehindNAT()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate void FAdvertiseGame( IntPtr self, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer );
private FAdvertiseGame _AdvertiseGame;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_AdvertiseGame")]
private static extern void _AdvertiseGame( IntPtr self, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer );
#endregion
internal void AdvertiseGame( SteamId steamIDGameServer, uint unIPServer, ushort usPortServer )
@ -269,22 +237,20 @@ internal void AdvertiseGame( SteamId steamIDGameServer, uint unIPServer, ushort
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FRequestEncryptedAppTicket( IntPtr self, IntPtr pDataToInclude, int cbDataToInclude );
private FRequestEncryptedAppTicket _RequestEncryptedAppTicket;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_RequestEncryptedAppTicket")]
private static extern SteamAPICall_t _RequestEncryptedAppTicket( IntPtr self, IntPtr pDataToInclude, int cbDataToInclude );
#endregion
internal async Task<EncryptedAppTicketResponse_t?> RequestEncryptedAppTicket( IntPtr pDataToInclude, int cbDataToInclude )
internal CallbackResult RequestEncryptedAppTicket( IntPtr pDataToInclude, int cbDataToInclude )
{
var returnValue = _RequestEncryptedAppTicket( Self, pDataToInclude, cbDataToInclude );
return await EncryptedAppTicketResponse_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetEncryptedAppTicket")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetEncryptedAppTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
private FGetEncryptedAppTicket _GetEncryptedAppTicket;
private static extern bool _GetEncryptedAppTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
#endregion
internal bool GetEncryptedAppTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
@ -294,9 +260,8 @@ internal bool GetEncryptedAppTicket( IntPtr pTicket, int cbMaxTicket, ref uint p
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetGameBadgeLevel( IntPtr self, int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil );
private FGetGameBadgeLevel _GetGameBadgeLevel;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetGameBadgeLevel")]
private static extern int _GetGameBadgeLevel( IntPtr self, int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil );
#endregion
internal int GetGameBadgeLevel( int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil )
@ -306,9 +271,8 @@ internal int GetGameBadgeLevel( int nSeries, [MarshalAs( UnmanagedType.U1 )] boo
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetPlayerSteamLevel( IntPtr self );
private FGetPlayerSteamLevel _GetPlayerSteamLevel;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetPlayerSteamLevel")]
private static extern int _GetPlayerSteamLevel( IntPtr self );
#endregion
internal int GetPlayerSteamLevel()
@ -318,22 +282,20 @@ internal int GetPlayerSteamLevel()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FRequestStoreAuthURL( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL );
private FRequestStoreAuthURL _RequestStoreAuthURL;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_RequestStoreAuthURL")]
private static extern SteamAPICall_t _RequestStoreAuthURL( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL );
#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 );
return await StoreAuthURLResponse_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneVerified")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsPhoneVerified( IntPtr self );
private FBIsPhoneVerified _BIsPhoneVerified;
private static extern bool _BIsPhoneVerified( IntPtr self );
#endregion
internal bool BIsPhoneVerified()
@ -343,10 +305,9 @@ internal bool BIsPhoneVerified()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsTwoFactorEnabled")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsTwoFactorEnabled( IntPtr self );
private FBIsTwoFactorEnabled _BIsTwoFactorEnabled;
private static extern bool _BIsTwoFactorEnabled( IntPtr self );
#endregion
internal bool BIsTwoFactorEnabled()
@ -356,10 +317,9 @@ internal bool BIsTwoFactorEnabled()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneIdentifying")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsPhoneIdentifying( IntPtr self );
private FBIsPhoneIdentifying _BIsPhoneIdentifying;
private static extern bool _BIsPhoneIdentifying( IntPtr self );
#endregion
internal bool BIsPhoneIdentifying()
@ -369,10 +329,9 @@ internal bool BIsPhoneIdentifying()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneRequiringVerification")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FBIsPhoneRequiringVerification( IntPtr self );
private FBIsPhoneRequiringVerification _BIsPhoneRequiringVerification;
private static extern bool _BIsPhoneRequiringVerification( IntPtr self );
#endregion
internal bool BIsPhoneRequiringVerification()
@ -382,15 +341,14 @@ internal bool BIsPhoneRequiringVerification()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FGetMarketEligibility( IntPtr self );
private FGetMarketEligibility _GetMarketEligibility;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetMarketEligibility")]
private static extern SteamAPICall_t _GetMarketEligibility( IntPtr self );
#endregion
internal async Task<MarketEligibilityResponse_t?> GetMarketEligibility()
internal CallbackResult GetMarketEligibility()
{
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
{
public override string InterfaceName => "STEAMUSERSTATS_INTERFACE_VERSION011";
public override void InitInternals()
{
}
@ -21,10 +19,9 @@ internal override void Shutdown()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestCurrentStats")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FRequestCurrentStats( IntPtr self );
private FRequestCurrentStats _RequestCurrentStats;
private static extern bool _RequestCurrentStats( IntPtr self );
#endregion
internal bool RequestCurrentStats()
@ -34,62 +31,57 @@ internal bool RequestCurrentStats()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetStat")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
private FGetStat1 _GetStat1;
private static extern bool _GetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
#endregion
internal bool GetStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
internal bool GetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
{
var returnValue = _GetStat1( Self, pchName, ref pData );
var returnValue = _GetStat( Self, pchName, ref pData );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetStat0")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
private FGetStat2 _GetStat2;
private static extern bool _GetStat0( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
#endregion
internal bool GetStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
internal bool 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;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetStat")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
private FSetStat1 _SetStat1;
private static extern bool _SetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
#endregion
internal bool SetStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
internal bool SetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
{
var returnValue = _SetStat1( Self, pchName, nData );
var returnValue = _SetStat( Self, pchName, nData );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetStat")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
private FSetStat2 _SetStat2;
private static extern bool _SetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
#endregion
internal bool SetStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
internal bool SetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
{
var returnValue = _SetStat2( Self, pchName, fData );
var returnValue = _SetStat( Self, pchName, fData );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_UpdateAvgRateStat")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FUpdateAvgRateStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
private FUpdateAvgRateStat _UpdateAvgRateStat;
private static extern bool _UpdateAvgRateStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
#endregion
internal bool UpdateAvgRateStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength )
@ -99,10 +91,9 @@ internal bool UpdateAvgRateStat( [MarshalAs( UnmanagedType.CustomMarshaler, Mars
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievement")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
private FGetAchievement _GetAchievement;
private static extern bool _GetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
#endregion
internal bool GetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
@ -112,10 +103,9 @@ internal bool GetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, Marshal
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetAchievement")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FSetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
private FSetAchievement _SetAchievement;
private static extern bool _SetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
#endregion
internal bool SetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@ -125,10 +115,9 @@ internal bool SetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, Marshal
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_ClearAchievement")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FClearAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
private FClearAchievement _ClearAchievement;
private static extern bool _ClearAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
#endregion
internal bool ClearAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@ -138,10 +127,9 @@ internal bool ClearAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, Marsh
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAndUnlockTime")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetAchievementAndUnlockTime( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime );
private FGetAchievementAndUnlockTime _GetAchievementAndUnlockTime;
private static extern bool _GetAchievementAndUnlockTime( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime );
#endregion
internal bool GetAchievementAndUnlockTime( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime )
@ -151,10 +139,9 @@ internal bool GetAchievementAndUnlockTime( [MarshalAs( UnmanagedType.CustomMarsh
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_StoreStats")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FStoreStats( IntPtr self );
private FStoreStats _StoreStats;
private static extern bool _StoreStats( IntPtr self );
#endregion
internal bool StoreStats()
@ -164,9 +151,8 @@ internal bool StoreStats()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetAchievementIcon( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
private FGetAchievementIcon _GetAchievementIcon;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementIcon")]
private static extern int _GetAchievementIcon( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
#endregion
internal int GetAchievementIcon( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
@ -176,9 +162,8 @@ internal int GetAchievementIcon( [MarshalAs( UnmanagedType.CustomMarshaler, Mars
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate Utf8StringPointer FGetAchievementDisplayAttribute( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
private FGetAchievementDisplayAttribute _GetAchievementDisplayAttribute;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementDisplayAttribute")]
private static extern Utf8StringPointer _GetAchievementDisplayAttribute( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
#endregion
internal string GetAchievementDisplayAttribute( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
@ -188,10 +173,9 @@ internal string GetAchievementDisplayAttribute( [MarshalAs( UnmanagedType.Custom
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_IndicateAchievementProgress")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FIndicateAchievementProgress( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress );
private FIndicateAchievementProgress _IndicateAchievementProgress;
private static extern bool _IndicateAchievementProgress( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress );
#endregion
internal bool IndicateAchievementProgress( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress )
@ -201,9 +185,8 @@ internal bool IndicateAchievementProgress( [MarshalAs( UnmanagedType.CustomMarsh
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate uint FGetNumAchievements( IntPtr self );
private FGetNumAchievements _GetNumAchievements;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNumAchievements")]
private static extern uint _GetNumAchievements( IntPtr self );
#endregion
internal uint GetNumAchievements()
@ -213,9 +196,8 @@ internal uint GetNumAchievements()
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate Utf8StringPointer FGetAchievementName( IntPtr self, uint iAchievement );
private FGetAchievementName _GetAchievementName;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementName")]
private static extern Utf8StringPointer _GetAchievementName( IntPtr self, uint iAchievement );
#endregion
internal string GetAchievementName( uint iAchievement )
@ -225,48 +207,44 @@ internal string GetAchievementName( uint iAchievement )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FRequestUserStats( IntPtr self, SteamId steamIDUser );
private FRequestUserStats _RequestUserStats;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestUserStats")]
private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser );
#endregion
internal async Task<UserStatsReceived_t?> RequestUserStats( SteamId steamIDUser )
internal CallbackResult RequestUserStats( SteamId steamIDUser )
{
var returnValue = _RequestUserStats( Self, steamIDUser );
return await UserStatsReceived_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStat")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
private FGetUserStat1 _GetUserStat1;
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
#endregion
internal bool GetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
{
var returnValue = _GetUserStat1( Self, steamIDUser, pchName, ref pData );
var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStat0")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
private FGetUserStat2 _GetUserStat2;
private static extern bool _GetUserStat0( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
#endregion
internal bool GetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
internal bool 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;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievement")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
private FGetUserAchievement _GetUserAchievement;
private static extern bool _GetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
#endregion
internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
@ -276,10 +254,9 @@ internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievementAndUnlockTime")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetUserAchievementAndUnlockTime( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime );
private FGetUserAchievementAndUnlockTime _GetUserAchievementAndUnlockTime;
private static extern bool _GetUserAchievementAndUnlockTime( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime );
#endregion
internal bool GetUserAchievementAndUnlockTime( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime )
@ -289,10 +266,9 @@ internal bool GetUserAchievementAndUnlockTime( SteamId steamIDUser, [MarshalAs(
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_ResetAllStats")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FResetAllStats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo );
private FResetAllStats _ResetAllStats;
private static extern bool _ResetAllStats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo );
#endregion
internal bool ResetAllStats( [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo )
@ -302,33 +278,30 @@ internal bool ResetAllStats( [MarshalAs( UnmanagedType.U1 )] bool bAchievementsT
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FFindOrCreateLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType );
private FFindOrCreateLeaderboard _FindOrCreateLeaderboard;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_FindOrCreateLeaderboard")]
private static extern SteamAPICall_t _FindOrCreateLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType );
#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 );
return await LeaderboardFindResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FFindLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName );
private FFindLeaderboard _FindLeaderboard;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_FindLeaderboard")]
private static extern SteamAPICall_t _FindLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName );
#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 );
return await LeaderboardFindResult_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate Utf8StringPointer FGetLeaderboardName( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
private FGetLeaderboardName _GetLeaderboardName;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardName")]
private static extern Utf8StringPointer _GetLeaderboardName( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
#endregion
internal string GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard )
@ -338,9 +311,8 @@ internal string GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetLeaderboardEntryCount( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
private FGetLeaderboardEntryCount _GetLeaderboardEntryCount;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardEntryCount")]
private static extern int _GetLeaderboardEntryCount( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
#endregion
internal int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard )
@ -350,9 +322,8 @@ internal int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard )
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate LeaderboardSort FGetLeaderboardSortMethod( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
private FGetLeaderboardSortMethod _GetLeaderboardSortMethod;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardSortMethod")]
private static extern LeaderboardSort _GetLeaderboardSortMethod( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
#endregion
internal LeaderboardSort GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard )
@ -362,9 +333,8 @@ internal LeaderboardSort GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLead
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate LeaderboardDisplay FGetLeaderboardDisplayType( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
private FGetLeaderboardDisplayType _GetLeaderboardDisplayType;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardDisplayType")]
private static extern LeaderboardDisplay _GetLeaderboardDisplayType( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
#endregion
internal LeaderboardDisplay GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard )
@ -374,34 +344,31 @@ internal LeaderboardDisplay GetLeaderboardDisplayType( SteamLeaderboard_t hSteam
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FDownloadLeaderboardEntries( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd );
private FDownloadLeaderboardEntries _DownloadLeaderboardEntries;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntries")]
private static extern SteamAPICall_t _DownloadLeaderboardEntries( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd );
#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 );
return await LeaderboardScoresDownloaded_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FDownloadLeaderboardEntriesForUsers( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers );
private FDownloadLeaderboardEntriesForUsers _DownloadLeaderboardEntriesForUsers;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntriesForUsers")]
private static extern SteamAPICall_t _DownloadLeaderboardEntriesForUsers( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers );
#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 );
return await LeaderboardScoresDownloaded_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetDownloadedLeaderboardEntry")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetDownloadedLeaderboardEntry( IntPtr self, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax );
private FGetDownloadedLeaderboardEntry _GetDownloadedLeaderboardEntry;
private static extern bool _GetDownloadedLeaderboardEntry( IntPtr self, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax );
#endregion
internal bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax )
@ -411,57 +378,52 @@ internal bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLea
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FUploadLeaderboardScore( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount );
private FUploadLeaderboardScore _UploadLeaderboardScore;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_UploadLeaderboardScore")]
private static extern SteamAPICall_t _UploadLeaderboardScore( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount );
#endregion
internal async Task<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 );
return await LeaderboardScoreUploaded_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FAttachLeaderboardUGC( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC );
private FAttachLeaderboardUGC _AttachLeaderboardUGC;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_AttachLeaderboardUGC")]
private static extern SteamAPICall_t _AttachLeaderboardUGC( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC );
#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 );
return await LeaderboardUGCSet_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FGetNumberOfCurrentPlayers( IntPtr self );
private FGetNumberOfCurrentPlayers _GetNumberOfCurrentPlayers;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNumberOfCurrentPlayers")]
private static extern SteamAPICall_t _GetNumberOfCurrentPlayers( IntPtr self );
#endregion
internal async Task<NumberOfCurrentPlayers_t?> GetNumberOfCurrentPlayers()
internal CallbackResult GetNumberOfCurrentPlayers()
{
var returnValue = _GetNumberOfCurrentPlayers( Self );
return await NumberOfCurrentPlayers_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FRequestGlobalAchievementPercentages( IntPtr self );
private FRequestGlobalAchievementPercentages _RequestGlobalAchievementPercentages;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalAchievementPercentages")]
private static extern SteamAPICall_t _RequestGlobalAchievementPercentages( IntPtr self );
#endregion
internal async Task<GlobalAchievementPercentagesReady_t?> RequestGlobalAchievementPercentages()
internal CallbackResult RequestGlobalAchievementPercentages()
{
var returnValue = _RequestGlobalAchievementPercentages( Self );
return await GlobalAchievementPercentagesReady_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetMostAchievedAchievementInfo( IntPtr self, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
private FGetMostAchievedAchievementInfo _GetMostAchievedAchievementInfo;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetMostAchievedAchievementInfo")]
private static extern int _GetMostAchievedAchievementInfo( IntPtr self, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
#endregion
internal int GetMostAchievedAchievementInfo( out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
@ -473,9 +435,8 @@ internal int GetMostAchievedAchievementInfo( out string pchName, ref float pflPe
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetNextMostAchievedAchievementInfo( IntPtr self, int iIteratorPrevious, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
private FGetNextMostAchievedAchievementInfo _GetNextMostAchievedAchievementInfo;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNextMostAchievedAchievementInfo")]
private static extern int _GetNextMostAchievedAchievementInfo( IntPtr self, int iIteratorPrevious, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
#endregion
internal int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
@ -487,10 +448,9 @@ internal int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, out stri
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAchievedPercent")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetAchievementAchievedPercent( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent );
private FGetAchievementAchievedPercent _GetAchievementAchievedPercent;
private static extern bool _GetAchievementAchievedPercent( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent );
#endregion
internal bool GetAchievementAchievedPercent( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent )
@ -500,64 +460,59 @@ internal bool GetAchievementAchievedPercent( [MarshalAs( UnmanagedType.CustomMar
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate SteamAPICall_t FRequestGlobalStats( IntPtr self, int nHistoryDays );
private FRequestGlobalStats _RequestGlobalStats;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalStats")]
private static extern SteamAPICall_t _RequestGlobalStats( IntPtr self, int nHistoryDays );
#endregion
internal async Task<GlobalStatsReceived_t?> RequestGlobalStats( int nHistoryDays )
internal CallbackResult RequestGlobalStats( int nHistoryDays )
{
var returnValue = _RequestGlobalStats( Self, nHistoryDays );
return await GlobalStatsReceived_t.GetResultAsync( returnValue );
return new CallbackResult( returnValue );
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStat")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetGlobalStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData );
private FGetGlobalStat1 _GetGlobalStat1;
private static extern bool _GetGlobalStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData );
#endregion
internal bool GetGlobalStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData )
internal bool GetGlobalStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData )
{
var returnValue = _GetGlobalStat1( Self, pchStatName, ref pData );
var returnValue = _GetGlobalStat( Self, pchStatName, ref pData );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStat0")]
[return: MarshalAs( UnmanagedType.I1 )]
private delegate bool FGetGlobalStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData );
private FGetGlobalStat2 _GetGlobalStat2;
private static extern bool _GetGlobalStat0( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData );
#endregion
internal bool GetGlobalStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData )
internal bool 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;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetGlobalStatHistory1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData );
private FGetGlobalStatHistory1 _GetGlobalStatHistory1;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistory")]
private static extern int _GetGlobalStatHistory( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData );
#endregion
internal int GetGlobalStatHistory1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData )
internal int GetGlobalStatHistory( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData )
{
var returnValue = _GetGlobalStatHistory1( Self, pchStatName, pData, cubData );
var returnValue = _GetGlobalStatHistory( Self, pchStatName, pData, cubData );
return returnValue;
}
#region FunctionMeta
[UnmanagedFunctionPointer( Platform.MemberConvention )]
private delegate int FGetGlobalStatHistory2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData );
private FGetGlobalStatHistory2 _GetGlobalStatHistory2;
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistory0")]
private static extern int _GetGlobalStatHistory0( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData );
#endregion
internal int GetGlobalStatHistory2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData )
internal int 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;
}

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -251,7 +251,7 @@ public static DownloadProgress DlcDownloadProgress( AppId appid )
/// </summary>
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 )
return null;

View File

@ -300,13 +300,13 @@ public static bool ListenForFriendsMessages
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;
}
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;
}
@ -319,7 +319,7 @@ public static async Task<SteamId[]> GetFollowingList()
do
{
if ((result = await Internal.EnumerateFollowingList((uint)resultCount)) != null)
if ( (result = await Internal.EnumerateFollowingList((uint)resultCount).GetAsync<FriendsEnumerateFollowingList_t>()) != null)
{
resultCount += result.Value.ResultsReturned;

View File

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

View File

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

View File

@ -130,17 +130,20 @@ public DateTime Acquired
{
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 m = int.Parse( str.Substring( 4, 2 ) );
var d = int.Parse( str.Substring( 6, 2 ) );
var y = int.Parse( str.Substring( 0, 4 ) );
var m = int.Parse( str.Substring( 4, 2 ) );
var d = int.Parse( str.Substring( 6, 2 ) );
var h = int.Parse( str.Substring( 9, 2 ) );
var mn = int.Parse( str.Substring( 11, 2 ) );
var s = int.Parse( str.Substring( 13, 2 ) );
var h = int.Parse( str.Substring( 9, 2 ) );
var mn = int.Parse( str.Substring( 11, 2 ) );
var s = int.Parse( str.Substring( 13, 2 ) );
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;
}
}
@ -153,7 +156,11 @@ public string Origin
get
{
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;
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;
return LeaderboardUpdate.From( r.Value );
@ -41,7 +41,7 @@ public struct Leaderboard
{
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;
return LeaderboardUpdate.From( r.Value );
@ -52,7 +52,7 @@ public struct Leaderboard
/// </summary>
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;
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 ) );
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 )
return null;
@ -80,7 +80,7 @@ public async Task<LeaderboardEntry[]> GetScoresAsync( int count, int offset = 1
/// </summary>
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 )
return null;
@ -92,7 +92,7 @@ public async Task<LeaderboardEntry[]> GetScoresAroundUserAsync( int start = -10,
/// </summary>
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 )
return null;

View File

@ -10,6 +10,9 @@ public static class Cleanup
{
public static string ConvertType( string type )
{
type = type.Replace( "class ", "" );
type = type.Replace( "struct ", "" );
type = type.Replace( "CSteamID", "SteamId" );
type = type.Replace( "CGameID", "GameId" );
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 )
{
var clss = Parser.Classes.Single( x => x.Name == className );
sb = new StringBuilder();
WriteLine( $"using System;" );
@ -25,22 +23,23 @@ public void GenerateVTableClass( string className, string filename )
StartBlock( $"namespace Steamworks" );
{
StartBlock( $"internal class {clss.Name} : SteamInterface" );
StartBlock( $"internal class {className} : SteamInterface" );
{
WriteLine( $"public override string InterfaceName => \"{clss.InterfaceString}\";" );
WriteLine();
//WriteLine( $"public override string InterfaceName => \"{clss.InterfaceString}\";" );
//WriteLine();
WriteFunctionPointerReader( clss );
WriteFunctionPointerReader();
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;
WriteFunction( clss, func );
WriteFunction( func );
WriteLine();
}
@ -52,89 +51,10 @@ public void GenerateVTableClass( string className, string filename )
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()" );
{
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();
@ -142,51 +62,21 @@ void WriteFunctionPointerReader( CodeParser.Class clss )
{
WriteLine( $"base.Shutdown();" );
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();
}
private bool NeedsWindowsSpecificFunction( CodeParser.Class.Function func, BaseType returnType, BaseType[] args )
{
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 )
private void WriteFunction( SteamApiDefinition.MethodDef func )
{
var returnType = BaseType.Parse( func.ReturnType );
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;
return bt;
} ).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 delegateargstr = string.Join( ", ", args.Select( x => x.AsNativeArgument() ) );
var windowsSpecific = NeedsWindowsSpecificFunction( func, returnType, args );
if ( returnType is SteamApiCallType sap )
{
sap.CallResult = func.CallResult;
@ -223,26 +111,12 @@ private void WriteFunction( CodeParser.Class clss, CodeParser.Class.Function fun
WriteLine( $"#region FunctionMeta" );
WriteLine( $"[UnmanagedFunctionPointer( Platform.MemberConvention )]" );
if ( returnType.ReturnAttribute != null)
WriteLine( $"[DllImport( Platform.LibraryName, EntryPoint = \"SteamAPI_{func.ClassName}_{func.Name}\")]" );
if ( returnType.ReturnAttribute != null )
WriteLine( returnType.ReturnAttribute );
if ( returnType.IsReturnedWeird )
{
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( $"private static extern {returnType.TypeNameFrom} _{func.Name}( IntPtr self, {delegateargstr} );".Replace( "( IntPtr self, )", "( IntPtr self )" ) );
WriteLine();
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 )
{
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" ) );
}
if ( returnType.IsReturnedWeird )
{
WriteLine( "#endif" );
}
}
EndBlock();
}

View File

@ -56,12 +56,15 @@ void Structs()
int defaultPack = c.IsPack4OnWindows ? 4 : 8;
var isCallback = !string.IsNullOrEmpty( c.CallbackId );
var iface = "";
if ( isCallback )
iface = " : ICallbackData";
//
// Main struct
//
WriteLine( $"[StructLayout( LayoutKind.Sequential, Pack = Platform.{(c.IsPack4OnWindows?"StructPackSize": "StructPlatformPackSize")} )]" );
StartBlock( $"{Cleanup.Expose( name )} struct {name}" );
//
// Main struct
//
WriteLine( $"[StructLayout( LayoutKind.Sequential, Pack = Platform.{(c.IsPack4OnWindows?"StructPackSize": "StructPlatformPackSize")} )]" );
StartBlock( $"{Cleanup.Expose( name )} struct {name}{iface}" );
{
//
// The fields
@ -74,8 +77,11 @@ void Structs()
WriteLine( "#region SteamCallback" );
{
WriteLine( $"internal static readonly int StructSize = System.Runtime.InteropServices.Marshal.SizeOf( typeof({name}) );" );
WriteLine( $"internal static {name} Fill( IntPtr p ) => (({name})({name}) Marshal.PtrToStructure( p, typeof({name}) ) );" );
WriteLine( $"public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( 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( $"static Action<{name}> actionClient;" );
WriteLine( $"[MonoPInvokeCallback] static void OnClient( IntPtr thisptr, IntPtr pvParam ) => actionClient?.Invoke( Fill( pvParam ) );" );
@ -87,47 +93,18 @@ void Structs()
{
StartBlock( "if ( server )" );
{
WriteLine( $"Event.Register( OnServer, StructSize, {c.CallbackId}, true );" );
WriteLine( $"Event.Register( OnServer, _datasize, {c.CallbackId}, true );" );
WriteLine( $"actionServer = action;" );
}
Else();
{
WriteLine( $"Event.Register( OnClient, StructSize, {c.CallbackId}, false );" );
WriteLine( $"Event.Register( OnClient, _datasize, {c.CallbackId}, false );" );
WriteLine( $"actionClient = action;" );
}
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" );
}

View File

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

View File

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

View File

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

View File

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