Restructuring of the files
This commit is contained in:
95
Facepunch.Steamworks/Callbacks/CallResult.cs
Normal file
95
Facepunch.Steamworks/Callbacks/CallResult.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// An awaitable version of a SteamAPICall_t
|
||||
/// </summary>
|
||||
internal struct CallResult<T> : INotifyCompletion where T : struct, ICallbackData
|
||||
{
|
||||
SteamAPICall_t call;
|
||||
ISteamUtils utils;
|
||||
bool server;
|
||||
|
||||
public CallResult( SteamAPICall_t call, bool server )
|
||||
{
|
||||
this.call = call;
|
||||
this.server = server;
|
||||
|
||||
utils = (server ? SteamUtils.InterfaceServer : SteamUtils.InterfaceClient) as ISteamUtils;
|
||||
|
||||
if ( utils == null )
|
||||
utils = SteamUtils.Interface as ISteamUtils;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This gets called if IsComplete returned false on the first call.
|
||||
/// The Action "continues" the async call. We pass it to the Dispatch
|
||||
/// to be called when the callback returns.
|
||||
/// </summary>
|
||||
public void OnCompleted( Action continuation )
|
||||
{
|
||||
Dispatch.OnCallComplete<T>( call, continuation, server );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the result. This is called internally by the async shit.
|
||||
/// </summary>
|
||||
public T? GetResult()
|
||||
{
|
||||
bool failed = false;
|
||||
if ( !utils.IsAPICallCompleted( call, ref failed ) || failed )
|
||||
return null;
|
||||
|
||||
var t = default( T );
|
||||
var size = t.DataSize;
|
||||
var ptr = Marshal.AllocHGlobal( size );
|
||||
|
||||
try
|
||||
{
|
||||
if ( !utils.GetAPICallResult( call, ptr, size, (int)t.CallbackType, ref failed ) || failed )
|
||||
{
|
||||
Dispatch.OnDebugCallback?.Invoke( t.CallbackType, "!GetAPICallResult or failed", server );
|
||||
return null;
|
||||
}
|
||||
|
||||
Dispatch.OnDebugCallback?.Invoke( t.CallbackType, Dispatch.CallbackToString( t.CallbackType, ptr, size ), server );
|
||||
|
||||
return ((T)Marshal.PtrToStructure( ptr, typeof( T ) ));
|
||||
}
|
||||
finally
|
||||
{
|
||||
Marshal.FreeHGlobal( ptr );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return true if complete or failed
|
||||
/// </summary>
|
||||
public bool IsCompleted
|
||||
{
|
||||
get
|
||||
{
|
||||
bool failed = false;
|
||||
if ( utils.IsAPICallCompleted( call, ref failed ) || failed )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is what makes this struct awaitable
|
||||
/// </summary>
|
||||
internal CallResult<T> GetAwaiter()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
17
Facepunch.Steamworks/Callbacks/ICallbackData.cs
Normal file
17
Facepunch.Steamworks/Callbacks/ICallbackData.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Gives us a generic way to get the CallbackId of structs
|
||||
/// </summary>
|
||||
internal interface ICallbackData
|
||||
{
|
||||
CallbackType CallbackType { get; }
|
||||
int DataSize { get; }
|
||||
}
|
||||
}
|
||||
30
Facepunch.Steamworks/Classes/AuthTicket.cs
Normal file
30
Facepunch.Steamworks/Classes/AuthTicket.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
public class AuthTicket : IDisposable
|
||||
{
|
||||
public byte[] Data;
|
||||
public uint Handle;
|
||||
|
||||
/// <summary>
|
||||
/// Cancels a ticket.
|
||||
/// You should cancel your ticket when you close the game or leave a server.
|
||||
/// </summary>
|
||||
public void Cancel()
|
||||
{
|
||||
if ( Handle != 0 )
|
||||
{
|
||||
SteamUser.Internal.CancelAuthTicket( Handle );
|
||||
}
|
||||
|
||||
Handle = 0;
|
||||
Data = null;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
333
Facepunch.Steamworks/Classes/Dispatch.cs
Normal file
333
Facepunch.Steamworks/Classes/Dispatch.cs
Normal file
@@ -0,0 +1,333 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System.Linq;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Responsible for all callback/callresult handling
|
||||
///
|
||||
/// This manually pumps Steam's message queue and dispatches those
|
||||
/// events to any waiting callbacks/callresults.
|
||||
/// </summary>
|
||||
public static class Dispatch
|
||||
{
|
||||
/// <summary>
|
||||
/// If set then we'll call this function every time a callback is generated.
|
||||
///
|
||||
/// This is SLOW!! - it's for debugging - don't keep it on all the time. If you want to access a specific
|
||||
/// callback then please create an issue on github and I'll add it!
|
||||
///
|
||||
/// Params are : [Callback Type] [Callback Contents] [server]
|
||||
///
|
||||
/// </summary>
|
||||
public static Action<CallbackType, string, bool> OnDebugCallback;
|
||||
|
||||
/// <summary>
|
||||
/// Called if an exception happens during a callback/callresult.
|
||||
/// This is needed because the exception isn't always accessible when running
|
||||
/// async.. and can fail silently. With this hooked you won't be stuck wondering
|
||||
/// what happened.
|
||||
/// </summary>
|
||||
public static Action<Exception> OnException;
|
||||
|
||||
#region interop
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ManualDispatch_Init", CallingConvention = CallingConvention.Cdecl )]
|
||||
internal static extern void SteamAPI_ManualDispatch_Init();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ManualDispatch_RunFrame", CallingConvention = CallingConvention.Cdecl )]
|
||||
internal static extern void SteamAPI_ManualDispatch_RunFrame( HSteamPipe pipe );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ManualDispatch_GetNextCallback", CallingConvention = CallingConvention.Cdecl )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
internal static extern bool SteamAPI_ManualDispatch_GetNextCallback( HSteamPipe pipe, [In, Out] ref CallbackMsg_t msg );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ManualDispatch_FreeLastCallback", CallingConvention = CallingConvention.Cdecl )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
internal static extern bool SteamAPI_ManualDispatch_FreeLastCallback( HSteamPipe pipe );
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct CallbackMsg_t
|
||||
{
|
||||
public HSteamUser m_hSteamUser; // Specific user to whom this callback applies.
|
||||
public CallbackType Type; // Callback identifier. (Corresponds to the k_iCallback enum in the callback structure.)
|
||||
public IntPtr Data; // Points to the callback structure
|
||||
public int DataSize; // Size of the data pointed to by m_pubParam
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
internal static HSteamPipe ClientPipe { get; set; }
|
||||
internal static HSteamPipe ServerPipe { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// This gets called from Client/Server Init
|
||||
/// It's important to switch to the manual dispatcher
|
||||
/// </summary>
|
||||
internal static void Init()
|
||||
{
|
||||
SteamAPI_ManualDispatch_Init();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Make sure we don't call Frame in a callback - because that'll cause some issues for everyone.
|
||||
/// </summary>
|
||||
static bool runningFrame = false;
|
||||
|
||||
/// <summary>
|
||||
/// Calls RunFrame and processes events from this Steam Pipe
|
||||
/// </summary>
|
||||
internal static void Frame( HSteamPipe pipe )
|
||||
{
|
||||
if ( runningFrame )
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
runningFrame = true;
|
||||
|
||||
SteamAPI_ManualDispatch_RunFrame( pipe );
|
||||
SteamNetworkingUtils.OutputDebugMessages();
|
||||
|
||||
CallbackMsg_t msg = default;
|
||||
|
||||
while ( SteamAPI_ManualDispatch_GetNextCallback( pipe, ref msg ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
ProcessCallback( msg, pipe == ServerPipe );
|
||||
}
|
||||
finally
|
||||
{
|
||||
SteamAPI_ManualDispatch_FreeLastCallback( pipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch ( System.Exception e )
|
||||
{
|
||||
OnException?.Invoke( e );
|
||||
}
|
||||
finally
|
||||
{
|
||||
runningFrame = false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To be safe we don't call the continuation functions while iterating
|
||||
/// the Callback list. This is maybe overly safe because the only way this
|
||||
/// could be an issue is if the callback list is modified in the continuation
|
||||
/// which would only happen if starting or shutting down in the callback.
|
||||
/// </summary>
|
||||
static List<Action<IntPtr>> actionsToCall = new List<Action<IntPtr>>();
|
||||
|
||||
/// <summary>
|
||||
/// A callback is a general global message
|
||||
/// </summary>
|
||||
private static void ProcessCallback( CallbackMsg_t msg, bool isServer )
|
||||
{
|
||||
OnDebugCallback?.Invoke( msg.Type, CallbackToString( msg.Type, msg.Data, msg.DataSize ), isServer );
|
||||
|
||||
// Is this a special callback telling us that the call result is ready?
|
||||
if ( msg.Type == CallbackType.SteamAPICallCompleted )
|
||||
{
|
||||
ProcessResult( msg );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( Callbacks.TryGetValue( msg.Type, out var list ) )
|
||||
{
|
||||
actionsToCall.Clear();
|
||||
|
||||
foreach ( var item in list )
|
||||
{
|
||||
if ( item.server != isServer )
|
||||
continue;
|
||||
|
||||
actionsToCall.Add( item.action );
|
||||
}
|
||||
|
||||
foreach ( var action in actionsToCall )
|
||||
{
|
||||
action( msg.Data );
|
||||
}
|
||||
|
||||
actionsToCall.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Given a callback, try to turn it into a string
|
||||
/// </summary>
|
||||
internal static string CallbackToString( CallbackType type, IntPtr data, int expectedsize )
|
||||
{
|
||||
if ( !CallbackTypeFactory.All.TryGetValue( type, out var t ) )
|
||||
return $"[{type} not in sdk]";
|
||||
|
||||
var strct = data.ToType( t );
|
||||
if ( strct == null )
|
||||
return "[null]";
|
||||
|
||||
var str = "";
|
||||
|
||||
var fields = t.GetFields( System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic );
|
||||
|
||||
if ( fields.Length == 0 )
|
||||
return "[no fields]";
|
||||
|
||||
var columnSize = fields.Max( x => x.Name.Length ) + 1;
|
||||
|
||||
if ( columnSize < 10 )
|
||||
columnSize = 10;
|
||||
|
||||
foreach ( var field in fields )
|
||||
{
|
||||
var spaces = (columnSize - field.Name.Length);
|
||||
if ( spaces < 0 ) spaces = 0;
|
||||
|
||||
str += $"{new String( ' ', spaces )}{field.Name}: {field.GetValue( strct )}\n";
|
||||
}
|
||||
|
||||
return str.Trim( '\n' );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A result is a reply to a specific command
|
||||
/// </summary>
|
||||
private static void ProcessResult( CallbackMsg_t msg )
|
||||
{
|
||||
var result = msg.Data.ToType<SteamAPICallCompleted_t>();
|
||||
|
||||
//
|
||||
// Do we have an entry added via OnCallComplete
|
||||
//
|
||||
if ( !ResultCallbacks.TryGetValue( result.AsyncCall, out var callbackInfo ) )
|
||||
{
|
||||
//
|
||||
// This can happen if the callback result was immediately available
|
||||
// so we just returned that without actually going through the callback
|
||||
// dance. It's okay for this to fail.
|
||||
//
|
||||
|
||||
//
|
||||
// But still let everyone know that this happened..
|
||||
//
|
||||
OnDebugCallback?.Invoke( (CallbackType)result.Callback, $"[no callback waiting/required]", false );
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove it before we do anything, incase the continuation throws exceptions
|
||||
ResultCallbacks.Remove( result.AsyncCall );
|
||||
|
||||
// At this point whatever async routine called this
|
||||
// continues running.
|
||||
callbackInfo.continuation();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pumps the queue in an async loop so we don't
|
||||
/// have to think about it. This has the advantage that
|
||||
/// you can call .Wait() on async shit and it still works.
|
||||
/// </summary>
|
||||
internal static async void LoopClientAsync()
|
||||
{
|
||||
while ( ClientPipe != 0 )
|
||||
{
|
||||
Frame( ClientPipe );
|
||||
await Task.Delay( 16 );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Pumps the queue in an async loop so we don't
|
||||
/// have to think about it. This has the advantage that
|
||||
/// you can call .Wait() on async shit and it still works.
|
||||
/// </summary>
|
||||
internal static async void LoopServerAsync()
|
||||
{
|
||||
while ( ServerPipe != 0 )
|
||||
{
|
||||
Frame( ServerPipe );
|
||||
await Task.Delay( 32 );
|
||||
}
|
||||
}
|
||||
|
||||
struct ResultCallback
|
||||
{
|
||||
public Action continuation;
|
||||
public bool server;
|
||||
}
|
||||
|
||||
static Dictionary<ulong, ResultCallback> ResultCallbacks = new Dictionary<ulong, ResultCallback>();
|
||||
|
||||
/// <summary>
|
||||
/// Watch for a steam api call
|
||||
/// </summary>
|
||||
internal static void OnCallComplete<T>( SteamAPICall_t call, Action continuation, bool server ) where T : struct, ICallbackData
|
||||
{
|
||||
ResultCallbacks[call.Value] = new ResultCallback
|
||||
{
|
||||
continuation = continuation,
|
||||
server = server
|
||||
};
|
||||
}
|
||||
|
||||
struct Callback
|
||||
{
|
||||
public Action<IntPtr> action;
|
||||
public bool server;
|
||||
}
|
||||
|
||||
static Dictionary<CallbackType, List<Callback>> Callbacks = new Dictionary<CallbackType, List<Callback>>();
|
||||
|
||||
/// <summary>
|
||||
/// Install a global callback. The passed function will get called if it's all good.
|
||||
/// </summary>
|
||||
internal static void Install<T>( Action<T> p, bool server = false ) where T : ICallbackData
|
||||
{
|
||||
var t = default( T );
|
||||
var type = t.CallbackType;
|
||||
|
||||
if ( !Callbacks.TryGetValue( type, out var list ) )
|
||||
{
|
||||
list = new List<Callback>();
|
||||
Callbacks[type] = list;
|
||||
}
|
||||
|
||||
list.Add( new Callback
|
||||
{
|
||||
action = x => p( x.ToType<T>() ),
|
||||
server = server
|
||||
} );
|
||||
}
|
||||
|
||||
internal static void ShutdownServer()
|
||||
{
|
||||
ServerPipe = 0;
|
||||
|
||||
foreach ( var callback in Callbacks )
|
||||
{
|
||||
Callbacks[callback.Key].RemoveAll( x => x.server );
|
||||
}
|
||||
|
||||
ResultCallbacks = ResultCallbacks.Where( x => !x.Value.server )
|
||||
.ToDictionary( x => x.Key, x => x.Value );
|
||||
}
|
||||
|
||||
internal static void ShutdownClient()
|
||||
{
|
||||
ClientPipe = 0;
|
||||
|
||||
foreach ( var callback in Callbacks )
|
||||
{
|
||||
Callbacks[callback.Key].RemoveAll( x => !x.server );
|
||||
}
|
||||
|
||||
ResultCallbacks = ResultCallbacks.Where( x => x.Value.server )
|
||||
.ToDictionary( x => x.Key, x => x.Value );
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Facepunch.Steamworks/Classes/SteamApi.cs
Normal file
50
Facepunch.Steamworks/Classes/SteamApi.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal static class SteamAPI
|
||||
{
|
||||
internal static class Native
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_Init", CallingConvention = CallingConvention.Cdecl )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
public static extern bool SteamAPI_Init();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_Shutdown", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern void SteamAPI_Shutdown();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_GetHSteamPipe", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern HSteamPipe SteamAPI_GetHSteamPipe();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_RestartAppIfNecessary", CallingConvention = CallingConvention.Cdecl )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
public static extern bool SteamAPI_RestartAppIfNecessary( uint unOwnAppID );
|
||||
|
||||
}
|
||||
static internal bool Init()
|
||||
{
|
||||
return Native.SteamAPI_Init();
|
||||
}
|
||||
|
||||
static internal void Shutdown()
|
||||
{
|
||||
Native.SteamAPI_Shutdown();
|
||||
}
|
||||
|
||||
static internal HSteamPipe GetHSteamPipe()
|
||||
{
|
||||
return Native.SteamAPI_GetHSteamPipe();
|
||||
}
|
||||
|
||||
static internal bool RestartAppIfNecessary( uint unOwnAppID )
|
||||
{
|
||||
return Native.SteamAPI_RestartAppIfNecessary( unOwnAppID );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
40
Facepunch.Steamworks/Classes/SteamGameServer.cs
Normal file
40
Facepunch.Steamworks/Classes/SteamGameServer.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal static class SteamGameServer
|
||||
{
|
||||
internal static class Native
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_RunCallbacks", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern void SteamGameServer_RunCallbacks();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_Shutdown", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern void SteamGameServer_Shutdown();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_GetHSteamPipe", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern HSteamPipe SteamGameServer_GetHSteamPipe();
|
||||
|
||||
}
|
||||
static internal void RunCallbacks()
|
||||
{
|
||||
Native.SteamGameServer_RunCallbacks();
|
||||
}
|
||||
|
||||
static internal void Shutdown()
|
||||
{
|
||||
Native.SteamGameServer_Shutdown();
|
||||
}
|
||||
|
||||
static internal HSteamPipe GetHSteamPipe()
|
||||
{
|
||||
return Native.SteamGameServer_GetHSteamPipe();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
24
Facepunch.Steamworks/Classes/SteamInternal.cs
Normal file
24
Facepunch.Steamworks/Classes/SteamInternal.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal static class SteamInternal
|
||||
{
|
||||
internal static class Native
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamInternal_GameServer_Init", CallingConvention = CallingConvention.Cdecl )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
public static extern bool SteamInternal_GameServer_Init( uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString );
|
||||
}
|
||||
|
||||
static internal bool GameServer_Init( uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString )
|
||||
{
|
||||
return Native.SteamInternal_GameServer_Init( unIP, usPort, usGamePort, usQueryPort, eServerMode, pchVersionString );
|
||||
}
|
||||
}
|
||||
}
|
||||
20
Facepunch.Steamworks/Enum/LeaderboardDisplay.cs
Normal file
20
Facepunch.Steamworks/Enum/LeaderboardDisplay.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
public enum LeaderboardDisplay : int
|
||||
{
|
||||
/// <summary>
|
||||
/// The score is just a simple numerical value
|
||||
/// </summary>
|
||||
Numeric = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The score represents a time, in seconds
|
||||
/// </summary>
|
||||
TimeSeconds = 2,
|
||||
|
||||
/// <summary>
|
||||
/// The score represents a time, in milliseconds
|
||||
/// </summary>
|
||||
TimeMilliSeconds = 3,
|
||||
}
|
||||
}
|
||||
15
Facepunch.Steamworks/Enum/LeaderboardSort.cs
Normal file
15
Facepunch.Steamworks/Enum/LeaderboardSort.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
public enum LeaderboardSort : int
|
||||
{
|
||||
/// <summary>
|
||||
/// The top-score is the lowest number
|
||||
/// </summary>
|
||||
Ascending = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The top-score is the highest number
|
||||
/// </summary>
|
||||
Descending = 2,
|
||||
}
|
||||
}
|
||||
42
Facepunch.Steamworks/Enum/SendType.cs
Normal file
42
Facepunch.Steamworks/Enum/SendType.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
[Flags]
|
||||
public enum SendType : int
|
||||
{
|
||||
/// <summary>
|
||||
/// Send the message unreliably. Can be lost. Messages *can* be larger than a
|
||||
/// single MTU (UDP packet), but there is no retransmission, so if any piece
|
||||
/// of the message is lost, the entire message will be dropped.
|
||||
///
|
||||
/// The sending API does have some knowledge of the underlying connection, so
|
||||
/// if there is no NAT-traversal accomplished or there is a recognized adjustment
|
||||
/// happening on the connection, the packet will be batched until the connection
|
||||
/// is open again.
|
||||
/// </summary>
|
||||
Unreliable = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Disable Nagle's algorithm.
|
||||
/// By default, Nagle's algorithm is applied to all outbound messages. This means
|
||||
/// that the message will NOT be sent immediately, in case further messages are
|
||||
/// sent soon after you send this, which can be grouped together. Any time there
|
||||
/// is enough buffered data to fill a packet, the packets will be pushed out immediately,
|
||||
/// but partially-full packets not be sent until the Nagle timer expires.
|
||||
/// </summary>
|
||||
NoNagle = 1 << 0,
|
||||
|
||||
/// <summary>
|
||||
/// If the message cannot be sent very soon (because the connection is still doing some initial
|
||||
/// handshaking, route negotiations, etc), then just drop it. This is only applicable for unreliable
|
||||
/// messages. Using this flag on reliable messages is invalid.
|
||||
/// </summary>
|
||||
NoDelay = 1 << 2,
|
||||
|
||||
/// Reliable message send. Can send up to 0.5mb in a single message.
|
||||
/// Does fragmentation/re-assembly of messages under the hood, as well as a sliding window for
|
||||
/// efficient sends of large chunks of data.
|
||||
Reliable = 1 << 3
|
||||
}
|
||||
}
|
||||
16
Facepunch.Steamworks/Facepunch.Steamworks.Posix.csproj
Normal file
16
Facepunch.Steamworks/Facepunch.Steamworks.Posix.csproj
Normal file
@@ -0,0 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Facepunch.Steamworks.Posix</AssemblyName>
|
||||
<DefineConstants>$(DefineConstants);PLATFORM_POSIX</DefineConstants>
|
||||
<TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>7.1</LangVersion>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<RootNamespace>Steamworks</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="Facepunch.Steamworks.targets" />
|
||||
|
||||
</Project>
|
||||
37
Facepunch.Steamworks/Facepunch.Steamworks.Win32.csproj
Normal file
37
Facepunch.Steamworks/Facepunch.Steamworks.Win32.csproj
Normal file
@@ -0,0 +1,37 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Facepunch.Steamworks.Win32</AssemblyName>
|
||||
<DefineConstants>$(DefineConstants);PLATFORM_WIN32;PLATFORM_WIN</DefineConstants>
|
||||
<TargetFrameworks>netstandard2.0;net46</TargetFrameworks>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>7.1</LangVersion>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<RootNamespace>Steamworks</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net40'">C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client</FrameworkPathOverride>
|
||||
<Authors>Garry Newman</Authors>
|
||||
<PackageId>Facepunch.Steamworks.win32</PackageId>
|
||||
<PackageDescription>Steamworks implementation with an emphasis on making things easy. For Windows x86.</PackageDescription>
|
||||
<PackageProjectUrl>https://github.com/Facepunch/Facepunch.Steamworks</PackageProjectUrl>
|
||||
<PackageIcon>Facepunch.Steamworks.jpg</PackageIcon>
|
||||
<PackageTags>facepunch;steam;unity;steamworks;valve</PackageTags>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<RepositoryUrl>https://github.com/Facepunch/Facepunch.Steamworks.git</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Update="steam_api.dll" PackagePath="\content\" Pack="true" PackageCopyToOutput="true">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Facepunch.Steamworks.jpg" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="Facepunch.Steamworks.targets" />
|
||||
|
||||
</Project>
|
||||
54
Facepunch.Steamworks/Facepunch.Steamworks.Win64.csproj
Normal file
54
Facepunch.Steamworks/Facepunch.Steamworks.Win64.csproj
Normal file
@@ -0,0 +1,54 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Facepunch.Steamworks.Win64</AssemblyName>
|
||||
<DefineConstants>$(DefineConstants);PLATFORM_WIN64;PLATFORM_WIN;PLATFORM_64</DefineConstants>
|
||||
<TargetFrameworks>netstandard2.0;net472</TargetFrameworks>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>7.1</LangVersion>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<RootNamespace>Steamworks</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<FrameworkPathOverride Condition="'$(TargetFramework)' == 'net40'">C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client</FrameworkPathOverride>
|
||||
<Authors>Garry Newman</Authors>
|
||||
<PackageId>Facepunch.Steamworks</PackageId>
|
||||
<PackageDescription>Steamworks implementation with an emphasis on making things easy. For Windows x64.</PackageDescription>
|
||||
<PackageProjectUrl>https://github.com/Facepunch/Facepunch.Steamworks</PackageProjectUrl>
|
||||
<PackageIcon>Facepunch.Steamworks.jpg</PackageIcon>
|
||||
<PackageTags>facepunch;steam;unity;steamworks;valve</PackageTags>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<RepositoryUrl>https://github.com/Facepunch/Facepunch.Steamworks.git</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="steam_api.dll" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="steam_api64.dll" PackagePath="\content\" Pack="true" PackageCopyToOutput="true">
|
||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<None Include="Facepunch.Steamworks.jpg" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="Facepunch.Steamworks.targets" />
|
||||
|
||||
<Target Name="PostBuildHome" AfterTargets="PostBuildEvent" Condition="'$(Computername)'=='GarryBasementPc'">
|
||||
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Win64.* C:\plastic\RustMain\Assets\Plugins\Facepunch.Steamworks\" />
|
||||
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Posix.* C:\plastic\RustMain\Assets\Plugins\Facepunch.Steamworks\" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PostBuildOffice" AfterTargets="PostBuildEvent" Condition="'$(Computername)'=='GARRYSOFFICEPC'">
|
||||
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Win64.* C:\Plastic\Rust\Assets\Plugins\Facepunch.Steamworks\" />
|
||||
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Posix.* C:\Plastic\Rust\Assets\Plugins\Facepunch.Steamworks\" />
|
||||
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Win64.* C:\Git\Facepunch.Steamworks.UnityTest\Assets\Steamworks" />
|
||||
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Win32.* C:\Git\Facepunch.Steamworks.UnityTest\Assets\Steamworks" />
|
||||
<Exec Command="Copy $(TargetDir)\Facepunch.Steamworks.Posix.* C:\Git\Facepunch.Steamworks.UnityTest\Assets\Steamworks" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
BIN
Facepunch.Steamworks/Facepunch.Steamworks.jpg
Normal file
BIN
Facepunch.Steamworks/Facepunch.Steamworks.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
37
Facepunch.Steamworks/Facepunch.Steamworks.targets
Normal file
37
Facepunch.Steamworks/Facepunch.Steamworks.targets
Normal file
@@ -0,0 +1,37 @@
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageVersion>2.3.4</PackageVersion>
|
||||
<FileVersion>2.3.4</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DefineConstants>$(DefineConstants);TRACE;DEBUG</DefineConstants>
|
||||
<NoWarn>1701;1702;1705;618;1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<DefineConstants>$(DefineConstants);TRACE;RELEASE</DefineConstants>
|
||||
<NoWarn>1701;1702;1705;618;1591</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
|
||||
<DefineConstants>$(DefineConstants);NET_CORE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard2.0|AnyCPU'">
|
||||
<DebugType>full</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="*AssemblyInfo.cs" />
|
||||
<Folder Include="Generated\Interfaces\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
426
Facepunch.Steamworks/Generated/CustomEnums.cs
Normal file
426
Facepunch.Steamworks/Generated/CustomEnums.cs
Normal file
@@ -0,0 +1,426 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
public enum CallbackType
|
||||
{
|
||||
SteamServersConnected = 101,
|
||||
SteamServerConnectFailure = 102,
|
||||
SteamServersDisconnected = 103,
|
||||
ClientGameServerDeny = 113,
|
||||
GSPolicyResponse = 115,
|
||||
IPCFailure = 117,
|
||||
LicensesUpdated = 125,
|
||||
ValidateAuthTicketResponse = 143,
|
||||
MicroTxnAuthorizationResponse = 152,
|
||||
EncryptedAppTicketResponse = 154,
|
||||
GetAuthSessionTicketResponse = 163,
|
||||
GameWebCallback = 164,
|
||||
StoreAuthURLResponse = 165,
|
||||
MarketEligibilityResponse = 166,
|
||||
DurationControl = 167,
|
||||
GSClientApprove = 201,
|
||||
GSClientDeny = 202,
|
||||
GSClientKick = 203,
|
||||
GSClientAchievementStatus = 206,
|
||||
GSGameplayStats = 207,
|
||||
GSClientGroupStatus = 208,
|
||||
GSReputation = 209,
|
||||
AssociateWithClanResult = 210,
|
||||
ComputeNewPlayerCompatibilityResult = 211,
|
||||
PersonaStateChange = 304,
|
||||
GameOverlayActivated = 331,
|
||||
GameServerChangeRequested = 332,
|
||||
GameLobbyJoinRequested = 333,
|
||||
AvatarImageLoaded = 334,
|
||||
ClanOfficerListResponse = 335,
|
||||
FriendRichPresenceUpdate = 336,
|
||||
GameRichPresenceJoinRequested = 337,
|
||||
GameConnectedClanChatMsg = 338,
|
||||
GameConnectedChatJoin = 339,
|
||||
GameConnectedChatLeave = 340,
|
||||
DownloadClanActivityCountsResult = 341,
|
||||
JoinClanChatRoomCompletionResult = 342,
|
||||
GameConnectedFriendChatMsg = 343,
|
||||
FriendsGetFollowerCount = 344,
|
||||
FriendsIsFollowing = 345,
|
||||
FriendsEnumerateFollowingList = 346,
|
||||
SetPersonaNameResponse = 347,
|
||||
UnreadChatMessagesChanged = 348,
|
||||
FavoritesListChanged = 502,
|
||||
LobbyInvite = 503,
|
||||
LobbyEnter = 504,
|
||||
LobbyDataUpdate = 505,
|
||||
LobbyChatUpdate = 506,
|
||||
LobbyChatMsg = 507,
|
||||
LobbyGameCreated = 509,
|
||||
LobbyMatchList = 510,
|
||||
LobbyKicked = 512,
|
||||
LobbyCreated = 513,
|
||||
PSNGameBootInviteResult = 515,
|
||||
FavoritesListAccountsUpdated = 516,
|
||||
IPCountry = 701,
|
||||
LowBatteryPower = 702,
|
||||
SteamAPICallCompleted = 703,
|
||||
SteamShutdown = 704,
|
||||
CheckFileSignature = 705,
|
||||
GamepadTextInputDismissed = 714,
|
||||
DlcInstalled = 1005,
|
||||
RegisterActivationCodeResponse = 1008,
|
||||
NewUrlLaunchParameters = 1014,
|
||||
AppProofOfPurchaseKeyResponse = 1021,
|
||||
FileDetailsResult = 1023,
|
||||
UserStatsReceived = 1101,
|
||||
UserStatsStored = 1102,
|
||||
UserAchievementStored = 1103,
|
||||
LeaderboardFindResult = 1104,
|
||||
LeaderboardScoresDownloaded = 1105,
|
||||
LeaderboardScoreUploaded = 1106,
|
||||
NumberOfCurrentPlayers = 1107,
|
||||
UserStatsUnloaded = 1108,
|
||||
GSStatsUnloaded = 1108,
|
||||
UserAchievementIconFetched = 1109,
|
||||
GlobalAchievementPercentagesReady = 1110,
|
||||
LeaderboardUGCSet = 1111,
|
||||
// PS3TrophiesInstalled = 1112,
|
||||
GlobalStatsReceived = 1112,
|
||||
// SocketStatusCallback = 1201,
|
||||
P2PSessionRequest = 1202,
|
||||
P2PSessionConnectFail = 1203,
|
||||
SteamNetConnectionStatusChangedCallback = 1221,
|
||||
SteamNetAuthenticationStatus = 1222,
|
||||
SteamRelayNetworkStatus = 1281,
|
||||
RemoteStorageAppSyncedClient = 1301,
|
||||
RemoteStorageAppSyncedServer = 1302,
|
||||
RemoteStorageAppSyncProgress = 1303,
|
||||
RemoteStorageAppSyncStatusCheck = 1305,
|
||||
RemoteStorageFileShareResult = 1307,
|
||||
RemoteStoragePublishFileResult = 1309,
|
||||
RemoteStorageDeletePublishedFileResult = 1311,
|
||||
RemoteStorageEnumerateUserPublishedFilesResult = 1312,
|
||||
RemoteStorageSubscribePublishedFileResult = 1313,
|
||||
RemoteStorageEnumerateUserSubscribedFilesResult = 1314,
|
||||
RemoteStorageUnsubscribePublishedFileResult = 1315,
|
||||
RemoteStorageUpdatePublishedFileResult = 1316,
|
||||
RemoteStorageDownloadUGCResult = 1317,
|
||||
RemoteStorageGetPublishedFileDetailsResult = 1318,
|
||||
RemoteStorageEnumerateWorkshopFilesResult = 1319,
|
||||
RemoteStorageGetPublishedItemVoteDetailsResult = 1320,
|
||||
RemoteStoragePublishedFileSubscribed = 1321,
|
||||
RemoteStoragePublishedFileUnsubscribed = 1322,
|
||||
RemoteStoragePublishedFileDeleted = 1323,
|
||||
RemoteStorageUpdateUserPublishedItemVoteResult = 1324,
|
||||
RemoteStorageUserVoteDetails = 1325,
|
||||
RemoteStorageEnumerateUserSharedWorkshopFilesResult = 1326,
|
||||
RemoteStorageSetUserPublishedFileActionResult = 1327,
|
||||
RemoteStorageEnumeratePublishedFilesByUserActionResult = 1328,
|
||||
RemoteStoragePublishFileProgress = 1329,
|
||||
RemoteStoragePublishedFileUpdated = 1330,
|
||||
RemoteStorageFileWriteAsyncComplete = 1331,
|
||||
RemoteStorageFileReadAsyncComplete = 1332,
|
||||
GSStatsReceived = 1800,
|
||||
GSStatsStored = 1801,
|
||||
HTTPRequestCompleted = 2101,
|
||||
HTTPRequestHeadersReceived = 2102,
|
||||
HTTPRequestDataReceived = 2103,
|
||||
ScreenshotReady = 2301,
|
||||
ScreenshotRequested = 2302,
|
||||
SteamUGCQueryCompleted = 3401,
|
||||
SteamUGCRequestUGCDetailsResult = 3402,
|
||||
CreateItemResult = 3403,
|
||||
SubmitItemUpdateResult = 3404,
|
||||
ItemInstalled = 3405,
|
||||
DownloadItemResult = 3406,
|
||||
UserFavoriteItemsListChanged = 3407,
|
||||
SetUserItemVoteResult = 3408,
|
||||
GetUserItemVoteResult = 3409,
|
||||
StartPlaytimeTrackingResult = 3410,
|
||||
StopPlaytimeTrackingResult = 3411,
|
||||
AddUGCDependencyResult = 3412,
|
||||
RemoveUGCDependencyResult = 3413,
|
||||
AddAppDependencyResult = 3414,
|
||||
RemoveAppDependencyResult = 3415,
|
||||
GetAppDependenciesResult = 3416,
|
||||
DeleteItemResult = 3417,
|
||||
SteamAppInstalled = 3901,
|
||||
SteamAppUninstalled = 3902,
|
||||
PlaybackStatusHasChanged = 4001,
|
||||
VolumeHasChanged = 4002,
|
||||
MusicPlayerWantsVolume = 4011,
|
||||
MusicPlayerSelectsQueueEntry = 4012,
|
||||
MusicPlayerSelectsPlaylistEntry = 4013,
|
||||
MusicPlayerRemoteWillActivate = 4101,
|
||||
MusicPlayerRemoteWillDeactivate = 4102,
|
||||
MusicPlayerRemoteToFront = 4103,
|
||||
MusicPlayerWillQuit = 4104,
|
||||
MusicPlayerWantsPlay = 4105,
|
||||
MusicPlayerWantsPause = 4106,
|
||||
MusicPlayerWantsPlayPrevious = 4107,
|
||||
MusicPlayerWantsPlayNext = 4108,
|
||||
MusicPlayerWantsShuffled = 4109,
|
||||
MusicPlayerWantsLooped = 4110,
|
||||
MusicPlayerWantsPlayingRepeatStatus = 4114,
|
||||
HTML_BrowserReady = 4501,
|
||||
HTML_NeedsPaint = 4502,
|
||||
HTML_StartRequest = 4503,
|
||||
HTML_CloseBrowser = 4504,
|
||||
HTML_URLChanged = 4505,
|
||||
HTML_FinishedRequest = 4506,
|
||||
HTML_OpenLinkInNewTab = 4507,
|
||||
HTML_ChangedTitle = 4508,
|
||||
HTML_SearchResults = 4509,
|
||||
HTML_CanGoBackAndForward = 4510,
|
||||
HTML_HorizontalScroll = 4511,
|
||||
HTML_VerticalScroll = 4512,
|
||||
HTML_LinkAtPosition = 4513,
|
||||
HTML_JSAlert = 4514,
|
||||
HTML_JSConfirm = 4515,
|
||||
HTML_FileOpenDialog = 4516,
|
||||
HTML_NewWindow = 4521,
|
||||
HTML_SetCursor = 4522,
|
||||
HTML_StatusText = 4523,
|
||||
HTML_ShowToolTip = 4524,
|
||||
HTML_UpdateToolTip = 4525,
|
||||
HTML_HideToolTip = 4526,
|
||||
HTML_BrowserRestarted = 4527,
|
||||
BroadcastUploadStart = 4604,
|
||||
BroadcastUploadStop = 4605,
|
||||
GetVideoURLResult = 4611,
|
||||
GetOPFSettingsResult = 4624,
|
||||
SteamInventoryResultReady = 4700,
|
||||
SteamInventoryFullUpdate = 4701,
|
||||
SteamInventoryDefinitionUpdate = 4702,
|
||||
SteamInventoryEligiblePromoItemDefIDs = 4703,
|
||||
SteamInventoryStartPurchaseResult = 4704,
|
||||
SteamInventoryRequestPricesResult = 4705,
|
||||
SteamParentalSettingsChanged = 5001,
|
||||
SearchForGameProgressCallback = 5201,
|
||||
SearchForGameResultCallback = 5202,
|
||||
RequestPlayersForGameProgressCallback = 5211,
|
||||
RequestPlayersForGameResultCallback = 5212,
|
||||
RequestPlayersForGameFinalResultCallback = 5213,
|
||||
SubmitPlayerResultResultCallback = 5214,
|
||||
EndGameResultCallback = 5215,
|
||||
JoinPartyCallback = 5301,
|
||||
CreateBeaconCallback = 5302,
|
||||
ReservationNotificationCallback = 5303,
|
||||
ChangeNumOpenSlotsCallback = 5304,
|
||||
AvailableBeaconLocationsUpdated = 5305,
|
||||
ActiveBeaconsUpdated = 5306,
|
||||
SteamRemotePlaySessionConnected = 5701,
|
||||
SteamRemotePlaySessionDisconnected = 5702,
|
||||
}
|
||||
internal static partial class CallbackTypeFactory
|
||||
{
|
||||
internal static System.Collections.Generic.Dictionary<CallbackType, System.Type> All = new System.Collections.Generic.Dictionary<CallbackType, System.Type>
|
||||
{
|
||||
{ CallbackType.SteamServersConnected, typeof( SteamServersConnected_t )},
|
||||
{ CallbackType.SteamServerConnectFailure, typeof( SteamServerConnectFailure_t )},
|
||||
{ CallbackType.SteamServersDisconnected, typeof( SteamServersDisconnected_t )},
|
||||
{ CallbackType.ClientGameServerDeny, typeof( ClientGameServerDeny_t )},
|
||||
{ CallbackType.GSPolicyResponse, typeof( GSPolicyResponse_t )},
|
||||
{ CallbackType.IPCFailure, typeof( IPCFailure_t )},
|
||||
{ CallbackType.LicensesUpdated, typeof( LicensesUpdated_t )},
|
||||
{ CallbackType.ValidateAuthTicketResponse, typeof( ValidateAuthTicketResponse_t )},
|
||||
{ CallbackType.MicroTxnAuthorizationResponse, typeof( MicroTxnAuthorizationResponse_t )},
|
||||
{ CallbackType.EncryptedAppTicketResponse, typeof( EncryptedAppTicketResponse_t )},
|
||||
{ CallbackType.GetAuthSessionTicketResponse, typeof( GetAuthSessionTicketResponse_t )},
|
||||
{ CallbackType.GameWebCallback, typeof( GameWebCallback_t )},
|
||||
{ CallbackType.StoreAuthURLResponse, typeof( StoreAuthURLResponse_t )},
|
||||
{ CallbackType.MarketEligibilityResponse, typeof( MarketEligibilityResponse_t )},
|
||||
{ CallbackType.DurationControl, typeof( DurationControl_t )},
|
||||
{ CallbackType.GSClientApprove, typeof( GSClientApprove_t )},
|
||||
{ CallbackType.GSClientDeny, typeof( GSClientDeny_t )},
|
||||
{ CallbackType.GSClientKick, typeof( GSClientKick_t )},
|
||||
{ CallbackType.GSClientAchievementStatus, typeof( GSClientAchievementStatus_t )},
|
||||
{ CallbackType.GSGameplayStats, typeof( GSGameplayStats_t )},
|
||||
{ CallbackType.GSClientGroupStatus, typeof( GSClientGroupStatus_t )},
|
||||
{ CallbackType.GSReputation, typeof( GSReputation_t )},
|
||||
{ CallbackType.AssociateWithClanResult, typeof( AssociateWithClanResult_t )},
|
||||
{ CallbackType.ComputeNewPlayerCompatibilityResult, typeof( ComputeNewPlayerCompatibilityResult_t )},
|
||||
{ CallbackType.PersonaStateChange, typeof( PersonaStateChange_t )},
|
||||
{ CallbackType.GameOverlayActivated, typeof( GameOverlayActivated_t )},
|
||||
{ CallbackType.GameServerChangeRequested, typeof( GameServerChangeRequested_t )},
|
||||
{ CallbackType.GameLobbyJoinRequested, typeof( GameLobbyJoinRequested_t )},
|
||||
{ CallbackType.AvatarImageLoaded, typeof( AvatarImageLoaded_t )},
|
||||
{ CallbackType.ClanOfficerListResponse, typeof( ClanOfficerListResponse_t )},
|
||||
{ CallbackType.FriendRichPresenceUpdate, typeof( FriendRichPresenceUpdate_t )},
|
||||
{ CallbackType.GameRichPresenceJoinRequested, typeof( GameRichPresenceJoinRequested_t )},
|
||||
{ CallbackType.GameConnectedClanChatMsg, typeof( GameConnectedClanChatMsg_t )},
|
||||
{ CallbackType.GameConnectedChatJoin, typeof( GameConnectedChatJoin_t )},
|
||||
{ CallbackType.GameConnectedChatLeave, typeof( GameConnectedChatLeave_t )},
|
||||
{ CallbackType.DownloadClanActivityCountsResult, typeof( DownloadClanActivityCountsResult_t )},
|
||||
{ CallbackType.JoinClanChatRoomCompletionResult, typeof( JoinClanChatRoomCompletionResult_t )},
|
||||
{ CallbackType.GameConnectedFriendChatMsg, typeof( GameConnectedFriendChatMsg_t )},
|
||||
{ CallbackType.FriendsGetFollowerCount, typeof( FriendsGetFollowerCount_t )},
|
||||
{ CallbackType.FriendsIsFollowing, typeof( FriendsIsFollowing_t )},
|
||||
{ CallbackType.FriendsEnumerateFollowingList, typeof( FriendsEnumerateFollowingList_t )},
|
||||
{ CallbackType.SetPersonaNameResponse, typeof( SetPersonaNameResponse_t )},
|
||||
{ CallbackType.UnreadChatMessagesChanged, typeof( UnreadChatMessagesChanged_t )},
|
||||
{ CallbackType.FavoritesListChanged, typeof( FavoritesListChanged_t )},
|
||||
{ CallbackType.LobbyInvite, typeof( LobbyInvite_t )},
|
||||
{ CallbackType.LobbyEnter, typeof( LobbyEnter_t )},
|
||||
{ CallbackType.LobbyDataUpdate, typeof( LobbyDataUpdate_t )},
|
||||
{ CallbackType.LobbyChatUpdate, typeof( LobbyChatUpdate_t )},
|
||||
{ CallbackType.LobbyChatMsg, typeof( LobbyChatMsg_t )},
|
||||
{ CallbackType.LobbyGameCreated, typeof( LobbyGameCreated_t )},
|
||||
{ CallbackType.LobbyMatchList, typeof( LobbyMatchList_t )},
|
||||
{ CallbackType.LobbyKicked, typeof( LobbyKicked_t )},
|
||||
{ CallbackType.LobbyCreated, typeof( LobbyCreated_t )},
|
||||
{ CallbackType.PSNGameBootInviteResult, typeof( PSNGameBootInviteResult_t )},
|
||||
{ CallbackType.FavoritesListAccountsUpdated, typeof( FavoritesListAccountsUpdated_t )},
|
||||
{ CallbackType.IPCountry, typeof( IPCountry_t )},
|
||||
{ CallbackType.LowBatteryPower, typeof( LowBatteryPower_t )},
|
||||
{ CallbackType.SteamAPICallCompleted, typeof( SteamAPICallCompleted_t )},
|
||||
{ CallbackType.SteamShutdown, typeof( SteamShutdown_t )},
|
||||
{ CallbackType.CheckFileSignature, typeof( CheckFileSignature_t )},
|
||||
{ CallbackType.GamepadTextInputDismissed, typeof( GamepadTextInputDismissed_t )},
|
||||
{ CallbackType.DlcInstalled, typeof( DlcInstalled_t )},
|
||||
{ CallbackType.RegisterActivationCodeResponse, typeof( RegisterActivationCodeResponse_t )},
|
||||
{ CallbackType.NewUrlLaunchParameters, typeof( NewUrlLaunchParameters_t )},
|
||||
{ CallbackType.AppProofOfPurchaseKeyResponse, typeof( AppProofOfPurchaseKeyResponse_t )},
|
||||
{ CallbackType.FileDetailsResult, typeof( FileDetailsResult_t )},
|
||||
{ CallbackType.UserStatsReceived, typeof( UserStatsReceived_t )},
|
||||
{ CallbackType.UserStatsStored, typeof( UserStatsStored_t )},
|
||||
{ CallbackType.UserAchievementStored, typeof( UserAchievementStored_t )},
|
||||
{ CallbackType.LeaderboardFindResult, typeof( LeaderboardFindResult_t )},
|
||||
{ CallbackType.LeaderboardScoresDownloaded, typeof( LeaderboardScoresDownloaded_t )},
|
||||
{ CallbackType.LeaderboardScoreUploaded, typeof( LeaderboardScoreUploaded_t )},
|
||||
{ CallbackType.NumberOfCurrentPlayers, typeof( NumberOfCurrentPlayers_t )},
|
||||
{ CallbackType.UserStatsUnloaded, typeof( UserStatsUnloaded_t )},
|
||||
// { CallbackType.GSStatsUnloaded, typeof( GSStatsUnloaded_t )},
|
||||
{ CallbackType.UserAchievementIconFetched, typeof( UserAchievementIconFetched_t )},
|
||||
{ CallbackType.GlobalAchievementPercentagesReady, typeof( GlobalAchievementPercentagesReady_t )},
|
||||
{ CallbackType.LeaderboardUGCSet, typeof( LeaderboardUGCSet_t )},
|
||||
{ CallbackType.GlobalStatsReceived, typeof( GlobalStatsReceived_t )},
|
||||
{ CallbackType.P2PSessionRequest, typeof( P2PSessionRequest_t )},
|
||||
{ CallbackType.P2PSessionConnectFail, typeof( P2PSessionConnectFail_t )},
|
||||
{ CallbackType.SteamNetConnectionStatusChangedCallback, typeof( SteamNetConnectionStatusChangedCallback_t )},
|
||||
{ CallbackType.SteamNetAuthenticationStatus, typeof( SteamNetAuthenticationStatus_t )},
|
||||
{ CallbackType.SteamRelayNetworkStatus, typeof( SteamRelayNetworkStatus_t )},
|
||||
{ CallbackType.RemoteStorageAppSyncedClient, typeof( RemoteStorageAppSyncedClient_t )},
|
||||
{ CallbackType.RemoteStorageAppSyncedServer, typeof( RemoteStorageAppSyncedServer_t )},
|
||||
{ CallbackType.RemoteStorageAppSyncProgress, typeof( RemoteStorageAppSyncProgress_t )},
|
||||
{ CallbackType.RemoteStorageAppSyncStatusCheck, typeof( RemoteStorageAppSyncStatusCheck_t )},
|
||||
{ CallbackType.RemoteStorageFileShareResult, typeof( RemoteStorageFileShareResult_t )},
|
||||
{ CallbackType.RemoteStoragePublishFileResult, typeof( RemoteStoragePublishFileResult_t )},
|
||||
{ CallbackType.RemoteStorageDeletePublishedFileResult, typeof( RemoteStorageDeletePublishedFileResult_t )},
|
||||
{ CallbackType.RemoteStorageEnumerateUserPublishedFilesResult, typeof( RemoteStorageEnumerateUserPublishedFilesResult_t )},
|
||||
{ CallbackType.RemoteStorageSubscribePublishedFileResult, typeof( RemoteStorageSubscribePublishedFileResult_t )},
|
||||
{ CallbackType.RemoteStorageEnumerateUserSubscribedFilesResult, typeof( RemoteStorageEnumerateUserSubscribedFilesResult_t )},
|
||||
{ CallbackType.RemoteStorageUnsubscribePublishedFileResult, typeof( RemoteStorageUnsubscribePublishedFileResult_t )},
|
||||
{ CallbackType.RemoteStorageUpdatePublishedFileResult, typeof( RemoteStorageUpdatePublishedFileResult_t )},
|
||||
{ CallbackType.RemoteStorageDownloadUGCResult, typeof( RemoteStorageDownloadUGCResult_t )},
|
||||
{ CallbackType.RemoteStorageGetPublishedFileDetailsResult, typeof( RemoteStorageGetPublishedFileDetailsResult_t )},
|
||||
{ CallbackType.RemoteStorageEnumerateWorkshopFilesResult, typeof( RemoteStorageEnumerateWorkshopFilesResult_t )},
|
||||
{ CallbackType.RemoteStorageGetPublishedItemVoteDetailsResult, typeof( RemoteStorageGetPublishedItemVoteDetailsResult_t )},
|
||||
{ CallbackType.RemoteStoragePublishedFileSubscribed, typeof( RemoteStoragePublishedFileSubscribed_t )},
|
||||
{ CallbackType.RemoteStoragePublishedFileUnsubscribed, typeof( RemoteStoragePublishedFileUnsubscribed_t )},
|
||||
{ CallbackType.RemoteStoragePublishedFileDeleted, typeof( RemoteStoragePublishedFileDeleted_t )},
|
||||
{ CallbackType.RemoteStorageUpdateUserPublishedItemVoteResult, typeof( RemoteStorageUpdateUserPublishedItemVoteResult_t )},
|
||||
{ CallbackType.RemoteStorageUserVoteDetails, typeof( RemoteStorageUserVoteDetails_t )},
|
||||
{ CallbackType.RemoteStorageEnumerateUserSharedWorkshopFilesResult, typeof( RemoteStorageEnumerateUserSharedWorkshopFilesResult_t )},
|
||||
{ CallbackType.RemoteStorageSetUserPublishedFileActionResult, typeof( RemoteStorageSetUserPublishedFileActionResult_t )},
|
||||
{ CallbackType.RemoteStorageEnumeratePublishedFilesByUserActionResult, typeof( RemoteStorageEnumeratePublishedFilesByUserActionResult_t )},
|
||||
{ CallbackType.RemoteStoragePublishFileProgress, typeof( RemoteStoragePublishFileProgress_t )},
|
||||
{ CallbackType.RemoteStoragePublishedFileUpdated, typeof( RemoteStoragePublishedFileUpdated_t )},
|
||||
{ CallbackType.RemoteStorageFileWriteAsyncComplete, typeof( RemoteStorageFileWriteAsyncComplete_t )},
|
||||
{ CallbackType.RemoteStorageFileReadAsyncComplete, typeof( RemoteStorageFileReadAsyncComplete_t )},
|
||||
{ CallbackType.GSStatsReceived, typeof( GSStatsReceived_t )},
|
||||
{ CallbackType.GSStatsStored, typeof( GSStatsStored_t )},
|
||||
{ CallbackType.HTTPRequestCompleted, typeof( HTTPRequestCompleted_t )},
|
||||
{ CallbackType.HTTPRequestHeadersReceived, typeof( HTTPRequestHeadersReceived_t )},
|
||||
{ CallbackType.HTTPRequestDataReceived, typeof( HTTPRequestDataReceived_t )},
|
||||
{ CallbackType.ScreenshotReady, typeof( ScreenshotReady_t )},
|
||||
{ CallbackType.ScreenshotRequested, typeof( ScreenshotRequested_t )},
|
||||
{ CallbackType.SteamUGCQueryCompleted, typeof( SteamUGCQueryCompleted_t )},
|
||||
{ CallbackType.SteamUGCRequestUGCDetailsResult, typeof( SteamUGCRequestUGCDetailsResult_t )},
|
||||
{ CallbackType.CreateItemResult, typeof( CreateItemResult_t )},
|
||||
{ CallbackType.SubmitItemUpdateResult, typeof( SubmitItemUpdateResult_t )},
|
||||
{ CallbackType.ItemInstalled, typeof( ItemInstalled_t )},
|
||||
{ CallbackType.DownloadItemResult, typeof( DownloadItemResult_t )},
|
||||
{ CallbackType.UserFavoriteItemsListChanged, typeof( UserFavoriteItemsListChanged_t )},
|
||||
{ CallbackType.SetUserItemVoteResult, typeof( SetUserItemVoteResult_t )},
|
||||
{ CallbackType.GetUserItemVoteResult, typeof( GetUserItemVoteResult_t )},
|
||||
{ CallbackType.StartPlaytimeTrackingResult, typeof( StartPlaytimeTrackingResult_t )},
|
||||
{ CallbackType.StopPlaytimeTrackingResult, typeof( StopPlaytimeTrackingResult_t )},
|
||||
{ CallbackType.AddUGCDependencyResult, typeof( AddUGCDependencyResult_t )},
|
||||
{ CallbackType.RemoveUGCDependencyResult, typeof( RemoveUGCDependencyResult_t )},
|
||||
{ CallbackType.AddAppDependencyResult, typeof( AddAppDependencyResult_t )},
|
||||
{ CallbackType.RemoveAppDependencyResult, typeof( RemoveAppDependencyResult_t )},
|
||||
{ CallbackType.GetAppDependenciesResult, typeof( GetAppDependenciesResult_t )},
|
||||
{ CallbackType.DeleteItemResult, typeof( DeleteItemResult_t )},
|
||||
{ CallbackType.SteamAppInstalled, typeof( SteamAppInstalled_t )},
|
||||
{ CallbackType.SteamAppUninstalled, typeof( SteamAppUninstalled_t )},
|
||||
{ CallbackType.PlaybackStatusHasChanged, typeof( PlaybackStatusHasChanged_t )},
|
||||
{ CallbackType.VolumeHasChanged, typeof( VolumeHasChanged_t )},
|
||||
{ CallbackType.MusicPlayerWantsVolume, typeof( MusicPlayerWantsVolume_t )},
|
||||
{ CallbackType.MusicPlayerSelectsQueueEntry, typeof( MusicPlayerSelectsQueueEntry_t )},
|
||||
{ CallbackType.MusicPlayerSelectsPlaylistEntry, typeof( MusicPlayerSelectsPlaylistEntry_t )},
|
||||
{ CallbackType.MusicPlayerRemoteWillActivate, typeof( MusicPlayerRemoteWillActivate_t )},
|
||||
{ CallbackType.MusicPlayerRemoteWillDeactivate, typeof( MusicPlayerRemoteWillDeactivate_t )},
|
||||
{ CallbackType.MusicPlayerRemoteToFront, typeof( MusicPlayerRemoteToFront_t )},
|
||||
{ CallbackType.MusicPlayerWillQuit, typeof( MusicPlayerWillQuit_t )},
|
||||
{ CallbackType.MusicPlayerWantsPlay, typeof( MusicPlayerWantsPlay_t )},
|
||||
{ CallbackType.MusicPlayerWantsPause, typeof( MusicPlayerWantsPause_t )},
|
||||
{ CallbackType.MusicPlayerWantsPlayPrevious, typeof( MusicPlayerWantsPlayPrevious_t )},
|
||||
{ CallbackType.MusicPlayerWantsPlayNext, typeof( MusicPlayerWantsPlayNext_t )},
|
||||
{ CallbackType.MusicPlayerWantsShuffled, typeof( MusicPlayerWantsShuffled_t )},
|
||||
{ CallbackType.MusicPlayerWantsLooped, typeof( MusicPlayerWantsLooped_t )},
|
||||
{ CallbackType.MusicPlayerWantsPlayingRepeatStatus, typeof( MusicPlayerWantsPlayingRepeatStatus_t )},
|
||||
{ CallbackType.HTML_BrowserReady, typeof( HTML_BrowserReady_t )},
|
||||
{ CallbackType.HTML_NeedsPaint, typeof( HTML_NeedsPaint_t )},
|
||||
{ CallbackType.HTML_StartRequest, typeof( HTML_StartRequest_t )},
|
||||
{ CallbackType.HTML_CloseBrowser, typeof( HTML_CloseBrowser_t )},
|
||||
{ CallbackType.HTML_URLChanged, typeof( HTML_URLChanged_t )},
|
||||
{ CallbackType.HTML_FinishedRequest, typeof( HTML_FinishedRequest_t )},
|
||||
{ CallbackType.HTML_OpenLinkInNewTab, typeof( HTML_OpenLinkInNewTab_t )},
|
||||
{ CallbackType.HTML_ChangedTitle, typeof( HTML_ChangedTitle_t )},
|
||||
{ CallbackType.HTML_SearchResults, typeof( HTML_SearchResults_t )},
|
||||
{ CallbackType.HTML_CanGoBackAndForward, typeof( HTML_CanGoBackAndForward_t )},
|
||||
{ CallbackType.HTML_HorizontalScroll, typeof( HTML_HorizontalScroll_t )},
|
||||
{ CallbackType.HTML_VerticalScroll, typeof( HTML_VerticalScroll_t )},
|
||||
{ CallbackType.HTML_LinkAtPosition, typeof( HTML_LinkAtPosition_t )},
|
||||
{ CallbackType.HTML_JSAlert, typeof( HTML_JSAlert_t )},
|
||||
{ CallbackType.HTML_JSConfirm, typeof( HTML_JSConfirm_t )},
|
||||
{ CallbackType.HTML_FileOpenDialog, typeof( HTML_FileOpenDialog_t )},
|
||||
{ CallbackType.HTML_NewWindow, typeof( HTML_NewWindow_t )},
|
||||
{ CallbackType.HTML_SetCursor, typeof( HTML_SetCursor_t )},
|
||||
{ CallbackType.HTML_StatusText, typeof( HTML_StatusText_t )},
|
||||
{ CallbackType.HTML_ShowToolTip, typeof( HTML_ShowToolTip_t )},
|
||||
{ CallbackType.HTML_UpdateToolTip, typeof( HTML_UpdateToolTip_t )},
|
||||
{ CallbackType.HTML_HideToolTip, typeof( HTML_HideToolTip_t )},
|
||||
{ CallbackType.HTML_BrowserRestarted, typeof( HTML_BrowserRestarted_t )},
|
||||
{ CallbackType.BroadcastUploadStart, typeof( BroadcastUploadStart_t )},
|
||||
{ CallbackType.BroadcastUploadStop, typeof( BroadcastUploadStop_t )},
|
||||
{ CallbackType.GetVideoURLResult, typeof( GetVideoURLResult_t )},
|
||||
{ CallbackType.GetOPFSettingsResult, typeof( GetOPFSettingsResult_t )},
|
||||
{ CallbackType.SteamInventoryResultReady, typeof( SteamInventoryResultReady_t )},
|
||||
{ CallbackType.SteamInventoryFullUpdate, typeof( SteamInventoryFullUpdate_t )},
|
||||
{ CallbackType.SteamInventoryDefinitionUpdate, typeof( SteamInventoryDefinitionUpdate_t )},
|
||||
{ CallbackType.SteamInventoryEligiblePromoItemDefIDs, typeof( SteamInventoryEligiblePromoItemDefIDs_t )},
|
||||
{ CallbackType.SteamInventoryStartPurchaseResult, typeof( SteamInventoryStartPurchaseResult_t )},
|
||||
{ CallbackType.SteamInventoryRequestPricesResult, typeof( SteamInventoryRequestPricesResult_t )},
|
||||
{ CallbackType.SteamParentalSettingsChanged, typeof( SteamParentalSettingsChanged_t )},
|
||||
{ CallbackType.SearchForGameProgressCallback, typeof( SearchForGameProgressCallback_t )},
|
||||
{ CallbackType.SearchForGameResultCallback, typeof( SearchForGameResultCallback_t )},
|
||||
{ CallbackType.RequestPlayersForGameProgressCallback, typeof( RequestPlayersForGameProgressCallback_t )},
|
||||
{ CallbackType.RequestPlayersForGameResultCallback, typeof( RequestPlayersForGameResultCallback_t )},
|
||||
{ CallbackType.RequestPlayersForGameFinalResultCallback, typeof( RequestPlayersForGameFinalResultCallback_t )},
|
||||
{ CallbackType.SubmitPlayerResultResultCallback, typeof( SubmitPlayerResultResultCallback_t )},
|
||||
{ CallbackType.EndGameResultCallback, typeof( EndGameResultCallback_t )},
|
||||
{ CallbackType.JoinPartyCallback, typeof( JoinPartyCallback_t )},
|
||||
{ CallbackType.CreateBeaconCallback, typeof( CreateBeaconCallback_t )},
|
||||
{ CallbackType.ReservationNotificationCallback, typeof( ReservationNotificationCallback_t )},
|
||||
{ CallbackType.ChangeNumOpenSlotsCallback, typeof( ChangeNumOpenSlotsCallback_t )},
|
||||
{ CallbackType.AvailableBeaconLocationsUpdated, typeof( AvailableBeaconLocationsUpdated_t )},
|
||||
{ CallbackType.ActiveBeaconsUpdated, typeof( ActiveBeaconsUpdated_t )},
|
||||
{ CallbackType.SteamRemotePlaySessionConnected, typeof( SteamRemotePlaySessionConnected_t )},
|
||||
{ CallbackType.SteamRemotePlaySessionDisconnected, typeof( SteamRemotePlaySessionDisconnected_t )},
|
||||
};
|
||||
}
|
||||
}
|
||||
83
Facepunch.Steamworks/Generated/Interfaces/ISteamAppList.cs
Normal file
83
Facepunch.Steamworks/Generated/Interfaces/ISteamAppList.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamAppList : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamAppList( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamAppList_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamAppList_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamAppList_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetNumInstalledApps", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetNumInstalledApps( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetNumInstalledApps()
|
||||
{
|
||||
var returnValue = _GetNumInstalledApps( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetInstalledApps", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetInstalledApps( IntPtr self, [In,Out] AppId[] pvecAppID, uint unMaxAppIDs );
|
||||
|
||||
#endregion
|
||||
internal uint GetInstalledApps( [In,Out] AppId[] pvecAppID, uint unMaxAppIDs )
|
||||
{
|
||||
var returnValue = _GetInstalledApps( Self, pvecAppID, unMaxAppIDs );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetAppName", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAppName( IntPtr self, AppId nAppID, IntPtr pchName, int cchNameMax );
|
||||
|
||||
#endregion
|
||||
internal int GetAppName( AppId nAppID, out string pchName )
|
||||
{
|
||||
IntPtr mempchName = Helpers.TakeMemory();
|
||||
var returnValue = _GetAppName( Self, nAppID, mempchName, (1024 * 32) );
|
||||
pchName = Helpers.MemoryToString( mempchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetAppInstallDir", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAppInstallDir( IntPtr self, AppId nAppID, IntPtr pchDirectory, int cchNameMax );
|
||||
|
||||
#endregion
|
||||
internal int GetAppInstallDir( AppId nAppID, out string pchDirectory )
|
||||
{
|
||||
IntPtr mempchDirectory = Helpers.TakeMemory();
|
||||
var returnValue = _GetAppInstallDir( Self, nAppID, mempchDirectory, (1024 * 32) );
|
||||
pchDirectory = Helpers.MemoryToString( mempchDirectory );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetAppBuildId", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAppBuildId( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal int GetAppBuildId( AppId nAppID )
|
||||
{
|
||||
var returnValue = _GetAppBuildId( Self, nAppID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
352
Facepunch.Steamworks/Generated/Interfaces/ISteamApps.cs
Normal file
352
Facepunch.Steamworks/Generated/Interfaces/ISteamApps.cs
Normal file
@@ -0,0 +1,352 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamApps : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamApps( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamApps_v008", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamApps_v008();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamApps_v008();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerApps_v008", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerApps_v008();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerApps_v008();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribed", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsSubscribed( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribed()
|
||||
{
|
||||
var returnValue = _BIsSubscribed( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsLowViolence", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsLowViolence( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsLowViolence()
|
||||
{
|
||||
var returnValue = _BIsLowViolence( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsCybercafe", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsCybercafe( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsCybercafe()
|
||||
{
|
||||
var returnValue = _BIsCybercafe( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsVACBanned", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsVACBanned( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsVACBanned()
|
||||
{
|
||||
var returnValue = _BIsVACBanned( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetCurrentGameLanguage", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetCurrentGameLanguage( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal string GetCurrentGameLanguage()
|
||||
{
|
||||
var returnValue = _GetCurrentGameLanguage( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAvailableGameLanguages", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetAvailableGameLanguages( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal string GetAvailableGameLanguages()
|
||||
{
|
||||
var returnValue = _GetAvailableGameLanguages( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedApp", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsSubscribedApp( IntPtr self, AppId appID );
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribedApp( AppId appID )
|
||||
{
|
||||
var returnValue = _BIsSubscribedApp( Self, appID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsDlcInstalled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsDlcInstalled( IntPtr self, AppId appID );
|
||||
|
||||
#endregion
|
||||
internal bool BIsDlcInstalled( AppId appID )
|
||||
{
|
||||
var returnValue = _BIsDlcInstalled( Self, appID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetEarliestPurchaseUnixTime", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetEarliestPurchaseUnixTime( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal uint GetEarliestPurchaseUnixTime( AppId nAppID )
|
||||
{
|
||||
var returnValue = _GetEarliestPurchaseUnixTime( Self, nAppID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFreeWeekend", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsSubscribedFromFreeWeekend( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribedFromFreeWeekend()
|
||||
{
|
||||
var returnValue = _BIsSubscribedFromFreeWeekend( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetDLCCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetDLCCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetDLCCount()
|
||||
{
|
||||
var returnValue = _GetDLCCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BGetDLCDataByIndex", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
IntPtr mempchName = Helpers.TakeMemory();
|
||||
var returnValue = _BGetDLCDataByIndex( Self, iDLC, ref pAppID, ref pbAvailable, mempchName, (1024 * 32) );
|
||||
pchName = Helpers.MemoryToString( mempchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_InstallDLC", CallingConvention = Platform.CC)]
|
||||
private static extern void _InstallDLC( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal void InstallDLC( AppId nAppID )
|
||||
{
|
||||
_InstallDLC( Self, nAppID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_UninstallDLC", CallingConvention = Platform.CC)]
|
||||
private static extern void _UninstallDLC( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal void UninstallDLC( AppId nAppID )
|
||||
{
|
||||
_UninstallDLC( Self, nAppID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey", CallingConvention = Platform.CC)]
|
||||
private static extern void _RequestAppProofOfPurchaseKey( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal void RequestAppProofOfPurchaseKey( AppId nAppID )
|
||||
{
|
||||
_RequestAppProofOfPurchaseKey( Self, nAppID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetCurrentBetaName", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetCurrentBetaName( IntPtr self, IntPtr pchName, int cchNameBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetCurrentBetaName( out string pchName )
|
||||
{
|
||||
IntPtr mempchName = Helpers.TakeMemory();
|
||||
var returnValue = _GetCurrentBetaName( Self, mempchName, (1024 * 32) );
|
||||
pchName = Helpers.MemoryToString( mempchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_MarkContentCorrupt", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _MarkContentCorrupt( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly );
|
||||
|
||||
#endregion
|
||||
internal bool MarkContentCorrupt( [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly )
|
||||
{
|
||||
var returnValue = _MarkContentCorrupt( Self, bMissingFilesOnly );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetInstalledDepots", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetInstalledDepots( IntPtr self, AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots );
|
||||
|
||||
#endregion
|
||||
internal uint GetInstalledDepots( AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots )
|
||||
{
|
||||
var returnValue = _GetInstalledDepots( Self, appID, pvecDepots, cMaxDepots );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppInstallDir", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetAppInstallDir( IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize );
|
||||
|
||||
#endregion
|
||||
internal uint GetAppInstallDir( AppId appID, out string pchFolder )
|
||||
{
|
||||
IntPtr mempchFolder = Helpers.TakeMemory();
|
||||
var returnValue = _GetAppInstallDir( Self, appID, mempchFolder, (1024 * 32) );
|
||||
pchFolder = Helpers.MemoryToString( mempchFolder );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsAppInstalled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsAppInstalled( IntPtr self, AppId appID );
|
||||
|
||||
#endregion
|
||||
internal bool BIsAppInstalled( AppId appID )
|
||||
{
|
||||
var returnValue = _BIsAppInstalled( Self, appID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppOwner", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetAppOwner( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetAppOwner()
|
||||
{
|
||||
var returnValue = _GetAppOwner( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetLaunchQueryParam", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetLaunchQueryParam( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal string GetLaunchQueryParam( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
var returnValue = _GetLaunchQueryParam( Self, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetDlcDownloadProgress", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetDlcDownloadProgress( Self, nAppID, ref punBytesDownloaded, ref punBytesTotal );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppBuildId", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAppBuildId( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetAppBuildId()
|
||||
{
|
||||
var returnValue = _GetAppBuildId( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys", CallingConvention = Platform.CC)]
|
||||
private static extern void _RequestAllProofOfPurchaseKeys( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RequestAllProofOfPurchaseKeys()
|
||||
{
|
||||
_RequestAllProofOfPurchaseKeys( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetFileDetails", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetFileDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName );
|
||||
|
||||
#endregion
|
||||
internal CallResult<FileDetailsResult_t> GetFileDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName )
|
||||
{
|
||||
var returnValue = _GetFileDetails( Self, pszFileName );
|
||||
return new CallResult<FileDetailsResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetLaunchCommandLine", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetLaunchCommandLine( IntPtr self, IntPtr pszCommandLine, int cubCommandLine );
|
||||
|
||||
#endregion
|
||||
internal int GetLaunchCommandLine( out string pszCommandLine )
|
||||
{
|
||||
IntPtr mempszCommandLine = Helpers.TakeMemory();
|
||||
var returnValue = _GetLaunchCommandLine( Self, mempszCommandLine, (1024 * 32) );
|
||||
pszCommandLine = Helpers.MemoryToString( mempszCommandLine );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsSubscribedFromFamilySharing( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribedFromFamilySharing()
|
||||
{
|
||||
var returnValue = _BIsSubscribedFromFamilySharing( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
414
Facepunch.Steamworks/Generated/Interfaces/ISteamClient.cs
Normal file
414
Facepunch.Steamworks/Generated/Interfaces/ISteamClient.cs
Normal file
@@ -0,0 +1,414 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamClient : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamClient( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_CreateSteamPipe", CallingConvention = Platform.CC)]
|
||||
private static extern HSteamPipe _CreateSteamPipe( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal HSteamPipe CreateSteamPipe()
|
||||
{
|
||||
var returnValue = _CreateSteamPipe( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_BReleaseSteamPipe", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BReleaseSteamPipe( IntPtr self, HSteamPipe hSteamPipe );
|
||||
|
||||
#endregion
|
||||
internal bool BReleaseSteamPipe( HSteamPipe hSteamPipe )
|
||||
{
|
||||
var returnValue = _BReleaseSteamPipe( Self, hSteamPipe );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_ConnectToGlobalUser", CallingConvention = Platform.CC)]
|
||||
private static extern HSteamUser _ConnectToGlobalUser( IntPtr self, HSteamPipe hSteamPipe );
|
||||
|
||||
#endregion
|
||||
internal HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe )
|
||||
{
|
||||
var returnValue = _ConnectToGlobalUser( Self, hSteamPipe );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_CreateLocalUser", CallingConvention = Platform.CC)]
|
||||
private static extern HSteamUser _CreateLocalUser( IntPtr self, ref HSteamPipe phSteamPipe, AccountType eAccountType );
|
||||
|
||||
#endregion
|
||||
internal HSteamUser CreateLocalUser( ref HSteamPipe phSteamPipe, AccountType eAccountType )
|
||||
{
|
||||
var returnValue = _CreateLocalUser( Self, ref phSteamPipe, eAccountType );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_ReleaseUser", CallingConvention = Platform.CC)]
|
||||
private static extern void _ReleaseUser( IntPtr self, HSteamPipe hSteamPipe, HSteamUser hUser );
|
||||
|
||||
#endregion
|
||||
internal void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser )
|
||||
{
|
||||
_ReleaseUser( Self, hSteamPipe, hUser );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUser", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamUser( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamUser( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServer", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamGameServer( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamGameServer( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_SetLocalIPBinding", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetLocalIPBinding( IntPtr self, ref SteamIPAddress unIP, ushort usPort );
|
||||
|
||||
#endregion
|
||||
internal void SetLocalIPBinding( ref SteamIPAddress unIP, ushort usPort )
|
||||
{
|
||||
_SetLocalIPBinding( Self, ref unIP, usPort );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamFriends", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamFriends( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamFriends( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUtils", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamUtils( IntPtr self, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamUtils( HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamUtils( Self, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmaking", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamMatchmaking( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamMatchmaking( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmakingServers", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamMatchmakingServers( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamMatchmakingServers( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGenericInterface", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamGenericInterface( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamGenericInterface( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUserStats", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamUserStats( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamUserStats( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServerStats", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamGameServerStats( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamGameServerStats( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamApps", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamApps( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamApps( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamNetworking", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamNetworking( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamNetworking( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemoteStorage", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamRemoteStorage( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamRemoteStorage( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamScreenshots", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamScreenshots( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamScreenshots( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameSearch", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamGameSearch( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamGameSearch( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamGameSearch( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetIPCCallCount", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetIPCCallCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetIPCCallCount()
|
||||
{
|
||||
var returnValue = _GetIPCCallCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_SetWarningMessageHook", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetWarningMessageHook( IntPtr self, IntPtr pFunction );
|
||||
|
||||
#endregion
|
||||
internal void SetWarningMessageHook( IntPtr pFunction )
|
||||
{
|
||||
_SetWarningMessageHook( Self, pFunction );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_BShutdownIfAllPipesClosed", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BShutdownIfAllPipesClosed( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BShutdownIfAllPipesClosed()
|
||||
{
|
||||
var returnValue = _BShutdownIfAllPipesClosed( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTTP", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamHTTP( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamHTTP( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamController", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamController( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamController( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUGC", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamUGC( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamUGC( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamAppList", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamAppList( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamAppList( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusic", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamMusic( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamMusic( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusicRemote", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamMusicRemote( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamMusicRemote( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamMusicRemote( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTMLSurface", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamHTMLSurface( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamHTMLSurface( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamHTMLSurface( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamInventory", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamInventory( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamInventory( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamInventory( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamVideo", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamVideo( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamVideo( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamParentalSettings", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamParentalSettings( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamParentalSettings( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamInput", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamInput( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamInput( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamParties", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamParties( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamParties( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamParties( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemotePlay", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamRemotePlay( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamRemotePlay( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
392
Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs
Normal file
392
Facepunch.Steamworks/Generated/Interfaces/ISteamController.cs
Normal file
@@ -0,0 +1,392 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamController : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamController( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamController_v007", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamController_v007();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamController_v007();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_Init", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _Init( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool Init()
|
||||
{
|
||||
var returnValue = _Init( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_Shutdown", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _Shutdown( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool Shutdown()
|
||||
{
|
||||
var returnValue = _Shutdown( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_RunFrame", CallingConvention = Platform.CC)]
|
||||
private static extern void _RunFrame( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RunFrame()
|
||||
{
|
||||
_RunFrame( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetConnectedControllers", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetConnectedControllers( IntPtr self, [In,Out] ControllerHandle_t[] handlesOut );
|
||||
|
||||
#endregion
|
||||
internal int GetConnectedControllers( [In,Out] ControllerHandle_t[] handlesOut )
|
||||
{
|
||||
var returnValue = _GetConnectedControllers( Self, handlesOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActionSetHandle", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerActionSetHandle_t _GetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
|
||||
|
||||
#endregion
|
||||
internal ControllerActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName )
|
||||
{
|
||||
var returnValue = _GetActionSetHandle( Self, pszActionSetName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ActivateActionSet", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateActionSet( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle );
|
||||
|
||||
#endregion
|
||||
internal void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle )
|
||||
{
|
||||
_ActivateActionSet( Self, controllerHandle, actionSetHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetCurrentActionSet", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerActionSetHandle_t _GetCurrentActionSet( IntPtr self, ControllerHandle_t controllerHandle );
|
||||
|
||||
#endregion
|
||||
internal ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle )
|
||||
{
|
||||
var returnValue = _GetCurrentActionSet( Self, controllerHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ActivateActionSetLayer", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateActionSetLayer( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle );
|
||||
|
||||
#endregion
|
||||
internal void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle )
|
||||
{
|
||||
_ActivateActionSetLayer( Self, controllerHandle, actionSetLayerHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_DeactivateActionSetLayer", CallingConvention = Platform.CC)]
|
||||
private static extern void _DeactivateActionSetLayer( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle );
|
||||
|
||||
#endregion
|
||||
internal void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle )
|
||||
{
|
||||
_DeactivateActionSetLayer( Self, controllerHandle, actionSetLayerHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_DeactivateAllActionSetLayers", CallingConvention = Platform.CC)]
|
||||
private static extern void _DeactivateAllActionSetLayers( IntPtr self, ControllerHandle_t controllerHandle );
|
||||
|
||||
#endregion
|
||||
internal void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle )
|
||||
{
|
||||
_DeactivateAllActionSetLayers( Self, controllerHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActiveActionSetLayers", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetActiveActionSetLayers( IntPtr self, ControllerHandle_t controllerHandle, [In,Out] ControllerActionSetHandle_t[] handlesOut );
|
||||
|
||||
#endregion
|
||||
internal int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, [In,Out] ControllerActionSetHandle_t[] handlesOut )
|
||||
{
|
||||
var returnValue = _GetActiveActionSetLayers( Self, controllerHandle, handlesOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionHandle", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerDigitalActionHandle_t _GetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
|
||||
#endregion
|
||||
internal ControllerDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
|
||||
{
|
||||
var returnValue = _GetDigitalActionHandle( Self, pszActionName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionData", CallingConvention = Platform.CC)]
|
||||
private static extern DigitalState _GetDigitalActionData( IntPtr self, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle );
|
||||
|
||||
#endregion
|
||||
internal DigitalState GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle )
|
||||
{
|
||||
var returnValue = _GetDigitalActionData( Self, controllerHandle, digitalActionHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionOrigins", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetDigitalActionOrigins( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, ref ControllerActionOrigin originsOut );
|
||||
|
||||
#endregion
|
||||
internal int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, ref ControllerActionOrigin originsOut )
|
||||
{
|
||||
var returnValue = _GetDigitalActionOrigins( Self, controllerHandle, actionSetHandle, digitalActionHandle, ref originsOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionHandle", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerAnalogActionHandle_t _GetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
|
||||
#endregion
|
||||
internal ControllerAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
|
||||
{
|
||||
var returnValue = _GetAnalogActionHandle( Self, pszActionName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionData", CallingConvention = Platform.CC)]
|
||||
private static extern AnalogState _GetAnalogActionData( IntPtr self, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle );
|
||||
|
||||
#endregion
|
||||
internal AnalogState GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle )
|
||||
{
|
||||
var returnValue = _GetAnalogActionData( Self, controllerHandle, analogActionHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionOrigins", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAnalogActionOrigins( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, ref ControllerActionOrigin originsOut );
|
||||
|
||||
#endregion
|
||||
internal int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, ref ControllerActionOrigin originsOut )
|
||||
{
|
||||
var returnValue = _GetAnalogActionOrigins( Self, controllerHandle, actionSetHandle, analogActionHandle, ref originsOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGlyphForActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetGlyphForActionOrigin( IntPtr self, ControllerActionOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetGlyphForActionOrigin( ControllerActionOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetGlyphForActionOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetStringForActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetStringForActionOrigin( IntPtr self, ControllerActionOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetStringForActionOrigin( ControllerActionOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetStringForActionOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_StopAnalogActionMomentum", CallingConvention = Platform.CC)]
|
||||
private static extern void _StopAnalogActionMomentum( IntPtr self, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction );
|
||||
|
||||
#endregion
|
||||
internal void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction )
|
||||
{
|
||||
_StopAnalogActionMomentum( Self, controllerHandle, eAction );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetMotionData", CallingConvention = Platform.CC)]
|
||||
private static extern MotionState _GetMotionData( IntPtr self, ControllerHandle_t controllerHandle );
|
||||
|
||||
#endregion
|
||||
internal MotionState GetMotionData( ControllerHandle_t controllerHandle )
|
||||
{
|
||||
var returnValue = _GetMotionData( Self, controllerHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerHapticPulse", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerHapticPulse( IntPtr self, ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
|
||||
|
||||
#endregion
|
||||
internal void TriggerHapticPulse( ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec )
|
||||
{
|
||||
_TriggerHapticPulse( Self, controllerHandle, eTargetPad, usDurationMicroSec );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerRepeatedHapticPulse", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerRepeatedHapticPulse( IntPtr self, ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
|
||||
|
||||
#endregion
|
||||
internal void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags )
|
||||
{
|
||||
_TriggerRepeatedHapticPulse( Self, controllerHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerVibration", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerVibration( IntPtr self, ControllerHandle_t controllerHandle, ushort usLeftSpeed, ushort usRightSpeed );
|
||||
|
||||
#endregion
|
||||
internal void TriggerVibration( ControllerHandle_t controllerHandle, ushort usLeftSpeed, ushort usRightSpeed )
|
||||
{
|
||||
_TriggerVibration( Self, controllerHandle, usLeftSpeed, usRightSpeed );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_SetLEDColor", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetLEDColor( IntPtr self, ControllerHandle_t controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags );
|
||||
|
||||
#endregion
|
||||
internal void SetLEDColor( ControllerHandle_t controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags )
|
||||
{
|
||||
_SetLEDColor( Self, controllerHandle, nColorR, nColorG, nColorB, nFlags );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ShowBindingPanel", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ShowBindingPanel( IntPtr self, ControllerHandle_t controllerHandle );
|
||||
|
||||
#endregion
|
||||
internal bool ShowBindingPanel( ControllerHandle_t controllerHandle )
|
||||
{
|
||||
var returnValue = _ShowBindingPanel( Self, controllerHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetInputTypeForHandle", CallingConvention = Platform.CC)]
|
||||
private static extern InputType _GetInputTypeForHandle( IntPtr self, ControllerHandle_t controllerHandle );
|
||||
|
||||
#endregion
|
||||
internal InputType GetInputTypeForHandle( ControllerHandle_t controllerHandle )
|
||||
{
|
||||
var returnValue = _GetInputTypeForHandle( Self, controllerHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetControllerForGamepadIndex", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerHandle_t _GetControllerForGamepadIndex( IntPtr self, int nIndex );
|
||||
|
||||
#endregion
|
||||
internal ControllerHandle_t GetControllerForGamepadIndex( int nIndex )
|
||||
{
|
||||
var returnValue = _GetControllerForGamepadIndex( Self, nIndex );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGamepadIndexForController", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetGamepadIndexForController( IntPtr self, ControllerHandle_t ulControllerHandle );
|
||||
|
||||
#endregion
|
||||
internal int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle )
|
||||
{
|
||||
var returnValue = _GetGamepadIndexForController( Self, ulControllerHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetStringForXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetStringForXboxOrigin( XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetStringForXboxOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGlyphForXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetGlyphForXboxOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActionOriginFromXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerActionOrigin _GetActionOriginFromXboxOrigin( IntPtr self, ControllerHandle_t controllerHandle, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal ControllerActionOrigin GetActionOriginFromXboxOrigin( ControllerHandle_t controllerHandle, XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetActionOriginFromXboxOrigin( Self, controllerHandle, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TranslateActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerActionOrigin _TranslateActionOrigin( IntPtr self, InputType eDestinationInputType, ControllerActionOrigin eSourceOrigin );
|
||||
|
||||
#endregion
|
||||
internal ControllerActionOrigin TranslateActionOrigin( InputType eDestinationInputType, ControllerActionOrigin eSourceOrigin )
|
||||
{
|
||||
var returnValue = _TranslateActionOrigin( Self, eDestinationInputType, eSourceOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetControllerBindingRevision", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetControllerBindingRevision( IntPtr self, ControllerHandle_t controllerHandle, ref int pMajor, ref int pMinor );
|
||||
|
||||
#endregion
|
||||
internal bool GetControllerBindingRevision( ControllerHandle_t controllerHandle, ref int pMajor, ref int pMinor )
|
||||
{
|
||||
var returnValue = _GetControllerBindingRevision( Self, controllerHandle, ref pMajor, ref pMinor );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
844
Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs
Normal file
844
Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs
Normal file
@@ -0,0 +1,844 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamFriends : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamFriends( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamFriends_v017", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamFriends_v017();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamFriends_v017();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaName", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetPersonaName( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal string GetPersonaName()
|
||||
{
|
||||
var returnValue = _GetPersonaName( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetPersonaName", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _SetPersonaName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName );
|
||||
|
||||
#endregion
|
||||
internal CallResult<SetPersonaNameResponse_t> SetPersonaName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPersonaName )
|
||||
{
|
||||
var returnValue = _SetPersonaName( Self, pchPersonaName );
|
||||
return new CallResult<SetPersonaNameResponse_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPersonaState", CallingConvention = Platform.CC)]
|
||||
private static extern FriendState _GetPersonaState( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal FriendState GetPersonaState()
|
||||
{
|
||||
var returnValue = _GetPersonaState( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFriendCount( IntPtr self, int iFriendFlags );
|
||||
|
||||
#endregion
|
||||
internal int GetFriendCount( int iFriendFlags )
|
||||
{
|
||||
var returnValue = _GetFriendCount( Self, iFriendFlags );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetFriendByIndex( IntPtr self, int iFriend, int iFriendFlags );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetFriendByIndex( int iFriend, int iFriendFlags )
|
||||
{
|
||||
var returnValue = _GetFriendByIndex( Self, iFriend, iFriendFlags );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRelationship", CallingConvention = Platform.CC)]
|
||||
private static extern Relationship _GetFriendRelationship( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal Relationship GetFriendRelationship( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _GetFriendRelationship( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaState", CallingConvention = Platform.CC)]
|
||||
private static extern FriendState _GetFriendPersonaState( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal FriendState GetFriendPersonaState( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _GetFriendPersonaState( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaName", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetFriendPersonaName( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal string GetFriendPersonaName( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _GetFriendPersonaName( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendGamePlayed", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetFriendGamePlayed( IntPtr self, SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo );
|
||||
|
||||
#endregion
|
||||
internal bool GetFriendGamePlayed( SteamId steamIDFriend, ref FriendGameInfo_t pFriendGameInfo )
|
||||
{
|
||||
var returnValue = _GetFriendGamePlayed( Self, steamIDFriend, ref pFriendGameInfo );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendPersonaNameHistory", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetFriendPersonaNameHistory( IntPtr self, SteamId steamIDFriend, int iPersonaName );
|
||||
|
||||
#endregion
|
||||
internal string GetFriendPersonaNameHistory( SteamId steamIDFriend, int iPersonaName )
|
||||
{
|
||||
var returnValue = _GetFriendPersonaNameHistory( Self, steamIDFriend, iPersonaName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendSteamLevel", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFriendSteamLevel( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal int GetFriendSteamLevel( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _GetFriendSteamLevel( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetPlayerNickname", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetPlayerNickname( IntPtr self, SteamId steamIDPlayer );
|
||||
|
||||
#endregion
|
||||
internal string GetPlayerNickname( SteamId steamIDPlayer )
|
||||
{
|
||||
var returnValue = _GetPlayerNickname( Self, steamIDPlayer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFriendsGroupCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetFriendsGroupCount()
|
||||
{
|
||||
var returnValue = _GetFriendsGroupCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupIDByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern FriendsGroupID_t _GetFriendsGroupIDByIndex( IntPtr self, int iFG );
|
||||
|
||||
#endregion
|
||||
internal FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG )
|
||||
{
|
||||
var returnValue = _GetFriendsGroupIDByIndex( Self, iFG );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupName", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetFriendsGroupName( IntPtr self, FriendsGroupID_t friendsGroupID );
|
||||
|
||||
#endregion
|
||||
internal string GetFriendsGroupName( FriendsGroupID_t friendsGroupID )
|
||||
{
|
||||
var returnValue = _GetFriendsGroupName( Self, friendsGroupID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFriendsGroupMembersCount( IntPtr self, FriendsGroupID_t friendsGroupID );
|
||||
|
||||
#endregion
|
||||
internal int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID )
|
||||
{
|
||||
var returnValue = _GetFriendsGroupMembersCount( Self, friendsGroupID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendsGroupMembersList", CallingConvention = Platform.CC)]
|
||||
private static extern void _GetFriendsGroupMembersList( IntPtr self, FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount );
|
||||
|
||||
#endregion
|
||||
internal void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, [In,Out] SteamId[] pOutSteamIDMembers, int nMembersCount )
|
||||
{
|
||||
_GetFriendsGroupMembersList( Self, friendsGroupID, pOutSteamIDMembers, nMembersCount );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_HasFriend", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _HasFriend( IntPtr self, SteamId steamIDFriend, int iFriendFlags );
|
||||
|
||||
#endregion
|
||||
internal bool HasFriend( SteamId steamIDFriend, int iFriendFlags )
|
||||
{
|
||||
var returnValue = _HasFriend( Self, steamIDFriend, iFriendFlags );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetClanCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetClanCount()
|
||||
{
|
||||
var returnValue = _GetClanCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetClanByIndex( IntPtr self, int iClan );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetClanByIndex( int iClan )
|
||||
{
|
||||
var returnValue = _GetClanByIndex( Self, iClan );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanName", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetClanName( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal string GetClanName( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _GetClanName( Self, steamIDClan );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanTag", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetClanTag( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal string GetClanTag( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _GetClanTag( Self, steamIDClan );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanActivityCounts", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetClanActivityCounts( Self, steamIDClan, ref pnOnline, ref pnInGame, ref pnChatting );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_DownloadClanActivityCounts", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _DownloadClanActivityCounts( IntPtr self, [In,Out] SteamId[] psteamIDClans, int cClansToRequest );
|
||||
|
||||
#endregion
|
||||
internal CallResult<DownloadClanActivityCountsResult_t> DownloadClanActivityCounts( [In,Out] SteamId[] psteamIDClans, int cClansToRequest )
|
||||
{
|
||||
var returnValue = _DownloadClanActivityCounts( Self, psteamIDClans, cClansToRequest );
|
||||
return new CallResult<DownloadClanActivityCountsResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCountFromSource", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFriendCountFromSource( IntPtr self, SteamId steamIDSource );
|
||||
|
||||
#endregion
|
||||
internal int GetFriendCountFromSource( SteamId steamIDSource )
|
||||
{
|
||||
var returnValue = _GetFriendCountFromSource( Self, steamIDSource );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendFromSourceByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetFriendFromSourceByIndex( IntPtr self, SteamId steamIDSource, int iFriend );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetFriendFromSourceByIndex( SteamId steamIDSource, int iFriend )
|
||||
{
|
||||
var returnValue = _GetFriendFromSourceByIndex( Self, steamIDSource, iFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsUserInSource", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsUserInSource( IntPtr self, SteamId steamIDUser, SteamId steamIDSource );
|
||||
|
||||
#endregion
|
||||
internal bool IsUserInSource( SteamId steamIDUser, SteamId steamIDSource )
|
||||
{
|
||||
var returnValue = _IsUserInSource( Self, steamIDUser, steamIDSource );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetInGameVoiceSpeaking", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetInGameVoiceSpeaking( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking );
|
||||
|
||||
#endregion
|
||||
internal void SetInGameVoiceSpeaking( SteamId steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking )
|
||||
{
|
||||
_SetInGameVoiceSpeaking( Self, steamIDUser, bSpeaking );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlay", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateGameOverlay( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog );
|
||||
|
||||
#endregion
|
||||
internal void ActivateGameOverlay( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog )
|
||||
{
|
||||
_ActivateGameOverlay( Self, pchDialog );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToUser", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateGameOverlayToUser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal void ActivateGameOverlayToUser( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDialog, SteamId steamID )
|
||||
{
|
||||
_ActivateGameOverlayToUser( Self, pchDialog, steamID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToWebPage", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateGameOverlayToWebPage( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode );
|
||||
|
||||
#endregion
|
||||
internal void ActivateGameOverlayToWebPage( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, ActivateGameOverlayToWebPageMode eMode )
|
||||
{
|
||||
_ActivateGameOverlayToWebPage( Self, pchURL, eMode );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayToStore", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateGameOverlayToStore( IntPtr self, AppId nAppID, OverlayToStoreFlag eFlag );
|
||||
|
||||
#endregion
|
||||
internal void ActivateGameOverlayToStore( AppId nAppID, OverlayToStoreFlag eFlag )
|
||||
{
|
||||
_ActivateGameOverlayToStore( Self, nAppID, eFlag );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetPlayedWith", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetPlayedWith( IntPtr self, SteamId steamIDUserPlayedWith );
|
||||
|
||||
#endregion
|
||||
internal void SetPlayedWith( SteamId steamIDUserPlayedWith )
|
||||
{
|
||||
_SetPlayedWith( Self, steamIDUserPlayedWith );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayInviteDialog", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateGameOverlayInviteDialog( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal void ActivateGameOverlayInviteDialog( SteamId steamIDLobby )
|
||||
{
|
||||
_ActivateGameOverlayInviteDialog( Self, steamIDLobby );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetSmallFriendAvatar", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetSmallFriendAvatar( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal int GetSmallFriendAvatar( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _GetSmallFriendAvatar( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetMediumFriendAvatar", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetMediumFriendAvatar( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal int GetMediumFriendAvatar( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _GetMediumFriendAvatar( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetLargeFriendAvatar", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetLargeFriendAvatar( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal int GetLargeFriendAvatar( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _GetLargeFriendAvatar( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestUserInformation", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _RequestUserInformation( Self, steamIDUser, bRequireNameOnly );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestClanOfficerList", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestClanOfficerList( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal CallResult<ClanOfficerListResponse_t> RequestClanOfficerList( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _RequestClanOfficerList( Self, steamIDClan );
|
||||
return new CallResult<ClanOfficerListResponse_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOwner", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetClanOwner( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetClanOwner( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _GetClanOwner( Self, steamIDClan );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOfficerCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetClanOfficerCount( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal int GetClanOfficerCount( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _GetClanOfficerCount( Self, steamIDClan );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanOfficerByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetClanOfficerByIndex( IntPtr self, SteamId steamIDClan, int iOfficer );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetClanOfficerByIndex( SteamId steamIDClan, int iOfficer )
|
||||
{
|
||||
var returnValue = _GetClanOfficerByIndex( Self, steamIDClan, iOfficer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetUserRestrictions", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetUserRestrictions( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetUserRestrictions()
|
||||
{
|
||||
var returnValue = _GetUserRestrictions( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetRichPresence", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetRichPresence( Self, pchKey, pchValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ClearRichPresence", CallingConvention = Platform.CC)]
|
||||
private static extern void _ClearRichPresence( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void ClearRichPresence()
|
||||
{
|
||||
_ClearRichPresence( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresence", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetFriendRichPresence( IntPtr self, SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal string GetFriendRichPresence( SteamId steamIDFriend, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
var returnValue = _GetFriendRichPresence( Self, steamIDFriend, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresenceKeyCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFriendRichPresenceKeyCount( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal int GetFriendRichPresenceKeyCount( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _GetFriendRichPresenceKeyCount( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendRichPresenceKeyByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetFriendRichPresenceKeyByIndex( IntPtr self, SteamId steamIDFriend, int iKey );
|
||||
|
||||
#endregion
|
||||
internal string GetFriendRichPresenceKeyByIndex( SteamId steamIDFriend, int iKey )
|
||||
{
|
||||
var returnValue = _GetFriendRichPresenceKeyByIndex( Self, steamIDFriend, iKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RequestFriendRichPresence", CallingConvention = Platform.CC)]
|
||||
private static extern void _RequestFriendRichPresence( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal void RequestFriendRichPresence( SteamId steamIDFriend )
|
||||
{
|
||||
_RequestFriendRichPresence( Self, steamIDFriend );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_InviteUserToGame", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _InviteUserToGame( Self, steamIDFriend, pchConnectString );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetCoplayFriendCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetCoplayFriendCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetCoplayFriendCount()
|
||||
{
|
||||
var returnValue = _GetCoplayFriendCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetCoplayFriend", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetCoplayFriend( IntPtr self, int iCoplayFriend );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetCoplayFriend( int iCoplayFriend )
|
||||
{
|
||||
var returnValue = _GetCoplayFriend( Self, iCoplayFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCoplayTime", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFriendCoplayTime( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal int GetFriendCoplayTime( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _GetFriendCoplayTime( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendCoplayGame", CallingConvention = Platform.CC)]
|
||||
private static extern AppId _GetFriendCoplayGame( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal AppId GetFriendCoplayGame( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _GetFriendCoplayGame( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_JoinClanChatRoom", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _JoinClanChatRoom( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal CallResult<JoinClanChatRoomCompletionResult_t> JoinClanChatRoom( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _JoinClanChatRoom( Self, steamIDClan );
|
||||
return new CallResult<JoinClanChatRoomCompletionResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_LeaveClanChatRoom", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _LeaveClanChatRoom( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal bool LeaveClanChatRoom( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _LeaveClanChatRoom( Self, steamIDClan );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanChatMemberCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetClanChatMemberCount( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal int GetClanChatMemberCount( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _GetClanChatMemberCount( Self, steamIDClan );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetChatMemberByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetChatMemberByIndex( IntPtr self, SteamId steamIDClan, int iUser );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetChatMemberByIndex( SteamId steamIDClan, int iUser )
|
||||
{
|
||||
var returnValue = _GetChatMemberByIndex( Self, steamIDClan, iUser );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SendClanChatMessage", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SendClanChatMessage( Self, steamIDClanChat, pchText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetClanChatMessage", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetClanChatMessage( IntPtr self, SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter );
|
||||
|
||||
#endregion
|
||||
internal int GetClanChatMessage( SteamId steamIDClanChat, int iMessage, IntPtr prgchText, int cchTextMax, ref ChatEntryType peChatEntryType, ref SteamId psteamidChatter )
|
||||
{
|
||||
var returnValue = _GetClanChatMessage( Self, steamIDClanChat, iMessage, prgchText, cchTextMax, ref peChatEntryType, ref psteamidChatter );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanChatAdmin", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsClanChatAdmin( IntPtr self, SteamId steamIDClanChat, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal bool IsClanChatAdmin( SteamId steamIDClanChat, SteamId steamIDUser )
|
||||
{
|
||||
var returnValue = _IsClanChatAdmin( Self, steamIDClanChat, steamIDUser );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanChatWindowOpenInSteam", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsClanChatWindowOpenInSteam( IntPtr self, SteamId steamIDClanChat );
|
||||
|
||||
#endregion
|
||||
internal bool IsClanChatWindowOpenInSteam( SteamId steamIDClanChat )
|
||||
{
|
||||
var returnValue = _IsClanChatWindowOpenInSteam( Self, steamIDClanChat );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_OpenClanChatWindowInSteam", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _OpenClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat );
|
||||
|
||||
#endregion
|
||||
internal bool OpenClanChatWindowInSteam( SteamId steamIDClanChat )
|
||||
{
|
||||
var returnValue = _OpenClanChatWindowInSteam( Self, steamIDClanChat );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_CloseClanChatWindowInSteam", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CloseClanChatWindowInSteam( IntPtr self, SteamId steamIDClanChat );
|
||||
|
||||
#endregion
|
||||
internal bool CloseClanChatWindowInSteam( SteamId steamIDClanChat )
|
||||
{
|
||||
var returnValue = _CloseClanChatWindowInSteam( Self, steamIDClanChat );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_SetListenForFriendsMessages", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetListenForFriendsMessages( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled );
|
||||
|
||||
#endregion
|
||||
internal bool SetListenForFriendsMessages( [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled )
|
||||
{
|
||||
var returnValue = _SetListenForFriendsMessages( Self, bInterceptEnabled );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ReplyToFriendMessage", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _ReplyToFriendMessage( Self, steamIDFriend, pchMsgToSend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFriendMessage", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFriendMessage( IntPtr self, SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType );
|
||||
|
||||
#endregion
|
||||
internal int GetFriendMessage( SteamId steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType )
|
||||
{
|
||||
var returnValue = _GetFriendMessage( Self, steamIDFriend, iMessageID, pvData, cubData, ref peChatEntryType );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetFollowerCount", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetFollowerCount( IntPtr self, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<FriendsGetFollowerCount_t> GetFollowerCount( SteamId steamID )
|
||||
{
|
||||
var returnValue = _GetFollowerCount( Self, steamID );
|
||||
return new CallResult<FriendsGetFollowerCount_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsFollowing", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _IsFollowing( IntPtr self, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<FriendsIsFollowing_t> IsFollowing( SteamId steamID )
|
||||
{
|
||||
var returnValue = _IsFollowing( Self, steamID );
|
||||
return new CallResult<FriendsIsFollowing_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_EnumerateFollowingList", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _EnumerateFollowingList( IntPtr self, uint unStartIndex );
|
||||
|
||||
#endregion
|
||||
internal CallResult<FriendsEnumerateFollowingList_t> EnumerateFollowingList( uint unStartIndex )
|
||||
{
|
||||
var returnValue = _EnumerateFollowingList( Self, unStartIndex );
|
||||
return new CallResult<FriendsEnumerateFollowingList_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanPublic", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsClanPublic( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal bool IsClanPublic( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _IsClanPublic( Self, steamIDClan );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_IsClanOfficialGameGroup", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsClanOfficialGameGroup( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal bool IsClanOfficialGameGroup( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _IsClanOfficialGameGroup( Self, steamIDClan );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_GetNumChatsWithUnreadPriorityMessages", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetNumChatsWithUnreadPriorityMessages( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetNumChatsWithUnreadPriorityMessages()
|
||||
{
|
||||
var returnValue = _GetNumChatsWithUnreadPriorityMessages( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_ActivateGameOverlayRemotePlayTogetherInviteDialog", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateGameOverlayRemotePlayTogetherInviteDialog( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal void ActivateGameOverlayRemotePlayTogetherInviteDialog( SteamId steamIDLobby )
|
||||
{
|
||||
_ActivateGameOverlayRemotePlayTogetherInviteDialog( Self, steamIDLobby );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
180
Facepunch.Steamworks/Generated/Interfaces/ISteamGameSearch.cs
Normal file
180
Facepunch.Steamworks/Generated/Interfaces/ISteamGameSearch.cs
Normal file
@@ -0,0 +1,180 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamGameSearch : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamGameSearch( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameSearch_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameSearch_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamGameSearch_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_AddGameSearchParams", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _AddGameSearchParams( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToFind, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValuesToFind );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t AddGameSearchParams( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToFind, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValuesToFind )
|
||||
{
|
||||
var returnValue = _AddGameSearchParams( Self, pchKeyToFind, pchValuesToFind );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameWithLobby", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _SearchForGameWithLobby( IntPtr self, SteamId steamIDLobby, int nPlayerMin, int nPlayerMax );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t SearchForGameWithLobby( SteamId steamIDLobby, int nPlayerMin, int nPlayerMax )
|
||||
{
|
||||
var returnValue = _SearchForGameWithLobby( Self, steamIDLobby, nPlayerMin, nPlayerMax );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameSolo", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _SearchForGameSolo( IntPtr self, int nPlayerMin, int nPlayerMax );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t SearchForGameSolo( int nPlayerMin, int nPlayerMax )
|
||||
{
|
||||
var returnValue = _SearchForGameSolo( Self, nPlayerMin, nPlayerMax );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_AcceptGame", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _AcceptGame( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t AcceptGame()
|
||||
{
|
||||
var returnValue = _AcceptGame( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_DeclineGame", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _DeclineGame( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t DeclineGame()
|
||||
{
|
||||
var returnValue = _DeclineGame( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_RetrieveConnectionDetails", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _RetrieveConnectionDetails( IntPtr self, SteamId steamIDHost, IntPtr pchConnectionDetails, int cubConnectionDetails );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t RetrieveConnectionDetails( SteamId steamIDHost, out string pchConnectionDetails )
|
||||
{
|
||||
IntPtr mempchConnectionDetails = Helpers.TakeMemory();
|
||||
var returnValue = _RetrieveConnectionDetails( Self, steamIDHost, mempchConnectionDetails, (1024 * 32) );
|
||||
pchConnectionDetails = Helpers.MemoryToString( mempchConnectionDetails );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_EndGameSearch", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _EndGameSearch( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t EndGameSearch()
|
||||
{
|
||||
var returnValue = _EndGameSearch( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SetGameHostParams", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _SetGameHostParams( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t SetGameHostParams( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
{
|
||||
var returnValue = _SetGameHostParams( Self, pchKey, pchValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SetConnectionDetails", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _SetConnectionDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectionDetails, int cubConnectionDetails );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t SetConnectionDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectionDetails, int cubConnectionDetails )
|
||||
{
|
||||
var returnValue = _SetConnectionDetails( Self, pchConnectionDetails, cubConnectionDetails );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_RequestPlayersForGame", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _RequestPlayersForGame( IntPtr self, int nPlayerMin, int nPlayerMax, int nMaxTeamSize );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t RequestPlayersForGame( int nPlayerMin, int nPlayerMax, int nMaxTeamSize )
|
||||
{
|
||||
var returnValue = _RequestPlayersForGame( Self, nPlayerMin, nPlayerMax, nMaxTeamSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_HostConfirmGameStart", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _HostConfirmGameStart( IntPtr self, ulong ullUniqueGameID );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t HostConfirmGameStart( ulong ullUniqueGameID )
|
||||
{
|
||||
var returnValue = _HostConfirmGameStart( Self, ullUniqueGameID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _CancelRequestPlayersForGame( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t CancelRequestPlayersForGame()
|
||||
{
|
||||
var returnValue = _CancelRequestPlayersForGame( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SubmitPlayerResult", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _SubmitPlayerResult( IntPtr self, ulong ullUniqueGameID, SteamId steamIDPlayer, PlayerResult_t EPlayerResult );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t SubmitPlayerResult( ulong ullUniqueGameID, SteamId steamIDPlayer, PlayerResult_t EPlayerResult )
|
||||
{
|
||||
var returnValue = _SubmitPlayerResult( Self, ullUniqueGameID, steamIDPlayer, EPlayerResult );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_EndGame", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _EndGame( IntPtr self, ulong ullUniqueGameID );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t EndGame( ulong ullUniqueGameID )
|
||||
{
|
||||
var returnValue = _EndGame( Self, ullUniqueGameID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
478
Facepunch.Steamworks/Generated/Interfaces/ISteamGameServer.cs
Normal file
478
Facepunch.Steamworks/Generated/Interfaces/ISteamGameServer.cs
Normal file
@@ -0,0 +1,478 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamGameServer : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamGameServer( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServer_v013", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServer_v013();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServer_v013();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetProduct", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetProduct( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct );
|
||||
|
||||
#endregion
|
||||
internal void SetProduct( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct )
|
||||
{
|
||||
_SetProduct( Self, pszProduct );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameDescription", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription );
|
||||
|
||||
#endregion
|
||||
internal void SetGameDescription( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription )
|
||||
{
|
||||
_SetGameDescription( Self, pszGameDescription );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetModDir", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir );
|
||||
|
||||
#endregion
|
||||
internal void SetModDir( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir )
|
||||
{
|
||||
_SetModDir( Self, pszModDir );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetDedicatedServer", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated );
|
||||
|
||||
#endregion
|
||||
internal void SetDedicatedServer( [MarshalAs( UnmanagedType.U1 )] bool bDedicated )
|
||||
{
|
||||
_SetDedicatedServer( Self, bDedicated );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOn", CallingConvention = Platform.CC)]
|
||||
private static extern void _LogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken );
|
||||
|
||||
#endregion
|
||||
internal void LogOn( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken )
|
||||
{
|
||||
_LogOn( Self, pszToken );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOnAnonymous", CallingConvention = Platform.CC)]
|
||||
private static extern void _LogOnAnonymous( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void LogOnAnonymous()
|
||||
{
|
||||
_LogOnAnonymous( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOff", CallingConvention = Platform.CC)]
|
||||
private static extern void _LogOff( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void LogOff()
|
||||
{
|
||||
_LogOff( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BLoggedOn", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BLoggedOn( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BLoggedOn()
|
||||
{
|
||||
var returnValue = _BLoggedOn( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BSecure", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BSecure( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BSecure()
|
||||
{
|
||||
var returnValue = _BSecure( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetSteamID", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetSteamID( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetSteamID()
|
||||
{
|
||||
var returnValue = _GetSteamID( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_WasRestartRequested", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _WasRestartRequested( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool WasRestartRequested()
|
||||
{
|
||||
var returnValue = _WasRestartRequested( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMaxPlayerCount", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetMaxPlayerCount( IntPtr self, int cPlayersMax );
|
||||
|
||||
#endregion
|
||||
internal void SetMaxPlayerCount( int cPlayersMax )
|
||||
{
|
||||
_SetMaxPlayerCount( Self, cPlayersMax );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetBotPlayerCount", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetBotPlayerCount( IntPtr self, int cBotplayers );
|
||||
|
||||
#endregion
|
||||
internal void SetBotPlayerCount( int cBotplayers )
|
||||
{
|
||||
_SetBotPlayerCount( Self, cBotplayers );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetServerName", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName );
|
||||
|
||||
#endregion
|
||||
internal void SetServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName )
|
||||
{
|
||||
_SetServerName( Self, pszServerName );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMapName", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName );
|
||||
|
||||
#endregion
|
||||
internal void SetMapName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName )
|
||||
{
|
||||
_SetMapName( Self, pszMapName );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetPasswordProtected", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected );
|
||||
|
||||
#endregion
|
||||
internal void SetPasswordProtected( [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected )
|
||||
{
|
||||
_SetPasswordProtected( Self, bPasswordProtected );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorPort", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetSpectatorPort( IntPtr self, ushort unSpectatorPort );
|
||||
|
||||
#endregion
|
||||
internal void SetSpectatorPort( ushort unSpectatorPort )
|
||||
{
|
||||
_SetSpectatorPort( Self, unSpectatorPort );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorServerName", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName );
|
||||
|
||||
#endregion
|
||||
internal void SetSpectatorServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName )
|
||||
{
|
||||
_SetSpectatorServerName( Self, pszSpectatorServerName );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ClearAllKeyValues", CallingConvention = Platform.CC)]
|
||||
private static extern void _ClearAllKeyValues( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void ClearAllKeyValues()
|
||||
{
|
||||
_ClearAllKeyValues( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetKeyValue", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetKeyValue( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue );
|
||||
|
||||
#endregion
|
||||
internal void SetKeyValue( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue )
|
||||
{
|
||||
_SetKeyValue( Self, pKey, pValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameTags", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags );
|
||||
|
||||
#endregion
|
||||
internal void SetGameTags( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags )
|
||||
{
|
||||
_SetGameTags( Self, pchGameTags );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameData", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData );
|
||||
|
||||
#endregion
|
||||
internal void SetGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData )
|
||||
{
|
||||
_SetGameData( Self, pchGameData );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetRegion", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion );
|
||||
|
||||
#endregion
|
||||
internal void SetRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion )
|
||||
{
|
||||
_SetRegion( Self, pszRegion );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SendUserConnectAndAuthenticate( Self, unIPClient, pvAuthBlob, cubAuthBlobSize, ref pSteamIDUser );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _CreateUnauthenticatedUserConnection( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamId CreateUnauthenticatedUserConnection()
|
||||
{
|
||||
var returnValue = _CreateUnauthenticatedUserConnection( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserDisconnect", CallingConvention = Platform.CC)]
|
||||
private static extern void _SendUserDisconnect( IntPtr self, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal void SendUserDisconnect( SteamId steamIDUser )
|
||||
{
|
||||
_SendUserDisconnect( Self, steamIDUser );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BUpdateUserData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BUpdateUserData( IntPtr self, SteamId steamIDUser, [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 )
|
||||
{
|
||||
var returnValue = _BUpdateUserData( Self, steamIDUser, pchPlayerName, uScore );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetAuthSessionTicket", CallingConvention = Platform.CC)]
|
||||
private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
|
||||
|
||||
#endregion
|
||||
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
|
||||
{
|
||||
var returnValue = _GetAuthSessionTicket( Self, pTicket, cbMaxTicket, ref pcbTicket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BeginAuthSession", CallingConvention = Platform.CC)]
|
||||
private static extern BeginAuthResult _BeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID )
|
||||
{
|
||||
var returnValue = _BeginAuthSession( Self, pAuthTicket, cbAuthTicket, steamID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_EndAuthSession", CallingConvention = Platform.CC)]
|
||||
private static extern void _EndAuthSession( IntPtr self, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal void EndAuthSession( SteamId steamID )
|
||||
{
|
||||
_EndAuthSession( Self, steamID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CancelAuthTicket", CallingConvention = Platform.CC)]
|
||||
private static extern void _CancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
|
||||
|
||||
#endregion
|
||||
internal void CancelAuthTicket( HAuthTicket hAuthTicket )
|
||||
{
|
||||
_CancelAuthTicket( Self, hAuthTicket );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_UserHasLicenseForApp", CallingConvention = Platform.CC)]
|
||||
private static extern UserHasLicenseForAppResult _UserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
|
||||
|
||||
#endregion
|
||||
internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID )
|
||||
{
|
||||
var returnValue = _UserHasLicenseForApp( Self, steamID, appID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_RequestUserGroupStatus", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _RequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup );
|
||||
|
||||
#endregion
|
||||
internal bool RequestUserGroupStatus( SteamId steamIDUser, SteamId steamIDGroup )
|
||||
{
|
||||
var returnValue = _RequestUserGroupStatus( Self, steamIDUser, steamIDGroup );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetGameplayStats", CallingConvention = Platform.CC)]
|
||||
private static extern void _GetGameplayStats( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void GetGameplayStats()
|
||||
{
|
||||
_GetGameplayStats( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetServerReputation", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetServerReputation( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal CallResult<GSReputation_t> GetServerReputation()
|
||||
{
|
||||
var returnValue = _GetServerReputation( Self );
|
||||
return new CallResult<GSReputation_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetPublicIP", CallingConvention = Platform.CC)]
|
||||
private static extern SteamIPAddress _GetPublicIP( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamIPAddress GetPublicIP()
|
||||
{
|
||||
var returnValue = _GetPublicIP( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_HandleIncomingPacket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _HandleIncomingPacket( Self, pData, cbData, srcIP, srcPort );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetNextOutgoingPacket", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort );
|
||||
|
||||
#endregion
|
||||
internal int GetNextOutgoingPacket( IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort )
|
||||
{
|
||||
var returnValue = _GetNextOutgoingPacket( Self, pOut, cbMaxOut, ref pNetAdr, ref pPort );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_EnableHeartbeats", CallingConvention = Platform.CC)]
|
||||
private static extern void _EnableHeartbeats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive );
|
||||
|
||||
#endregion
|
||||
internal void EnableHeartbeats( [MarshalAs( UnmanagedType.U1 )] bool bActive )
|
||||
{
|
||||
_EnableHeartbeats( Self, bActive );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetHeartbeatInterval", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetHeartbeatInterval( IntPtr self, int iHeartbeatInterval );
|
||||
|
||||
#endregion
|
||||
internal void SetHeartbeatInterval( int iHeartbeatInterval )
|
||||
{
|
||||
_SetHeartbeatInterval( Self, iHeartbeatInterval );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ForceHeartbeat", CallingConvention = Platform.CC)]
|
||||
private static extern void _ForceHeartbeat( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void ForceHeartbeat()
|
||||
{
|
||||
_ForceHeartbeat( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_AssociateWithClan", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _AssociateWithClan( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal CallResult<AssociateWithClanResult_t> AssociateWithClan( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _AssociateWithClan( Self, steamIDClan );
|
||||
return new CallResult<AssociateWithClanResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _ComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer );
|
||||
|
||||
#endregion
|
||||
internal CallResult<ComputeNewPlayerCompatibilityResult_t> ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer )
|
||||
{
|
||||
var returnValue = _ComputeNewPlayerCompatibility( Self, steamIDNewPlayer );
|
||||
return new CallResult<ComputeNewPlayerCompatibilityResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamGameServerStats : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamGameServerStats( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerStats_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerStats_v001();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerStats_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_RequestUserStats", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal CallResult<GSStatsReceived_t> RequestUserStats( SteamId steamIDUser )
|
||||
{
|
||||
var returnValue = _RequestUserStats( Self, steamIDUser );
|
||||
return new CallResult<GSStatsReceived_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
{
|
||||
var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
{
|
||||
var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetUserAchievement( IntPtr self, SteamId steamIDUser, [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 )
|
||||
{
|
||||
var returnValue = _GetUserAchievement( Self, steamIDUser, pchName, ref pbAchieved );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
|
||||
|
||||
#endregion
|
||||
internal bool SetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
|
||||
{
|
||||
var returnValue = _SetUserStat( Self, steamIDUser, pchName, nData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
|
||||
|
||||
#endregion
|
||||
internal bool SetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
|
||||
{
|
||||
var returnValue = _SetUserStat( Self, steamIDUser, pchName, fData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_UpdateUserAvgRateStat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateUserAvgRateStat( IntPtr self, SteamId steamIDUser, [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 )
|
||||
{
|
||||
var returnValue = _UpdateUserAvgRateStat( Self, steamIDUser, pchName, flCountThisSession, dSessionLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
|
||||
#endregion
|
||||
internal bool SetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
{
|
||||
var returnValue = _SetUserAchievement( Self, steamIDUser, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_ClearUserAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
|
||||
#endregion
|
||||
internal bool ClearUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
{
|
||||
var returnValue = _ClearUserAchievement( Self, steamIDUser, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_StoreUserStats", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _StoreUserStats( IntPtr self, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal CallResult<GSStatsStored_t> StoreUserStats( SteamId steamIDUser )
|
||||
{
|
||||
var returnValue = _StoreUserStats( Self, steamIDUser );
|
||||
return new CallResult<GSStatsStored_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
399
Facepunch.Steamworks/Generated/Interfaces/ISteamHTMLSurface.cs
Normal file
399
Facepunch.Steamworks/Generated/Interfaces/ISteamHTMLSurface.cs
Normal file
@@ -0,0 +1,399 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamHTMLSurface : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamHTMLSurface( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamHTMLSurface_v005", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamHTMLSurface_v005();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamHTMLSurface_v005();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Init", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _Init( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool Init()
|
||||
{
|
||||
var returnValue = _Init( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Shutdown", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _Shutdown( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool Shutdown()
|
||||
{
|
||||
var returnValue = _Shutdown( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_CreateBrowser", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _CreateBrowser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserCSS );
|
||||
|
||||
#endregion
|
||||
internal CallResult<HTML_BrowserReady_t> CreateBrowser( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserCSS )
|
||||
{
|
||||
var returnValue = _CreateBrowser( Self, pchUserAgent, pchUserCSS );
|
||||
return new CallResult<HTML_BrowserReady_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_RemoveBrowser", CallingConvention = Platform.CC)]
|
||||
private static extern void _RemoveBrowser( IntPtr self, HHTMLBrowser unBrowserHandle );
|
||||
|
||||
#endregion
|
||||
internal void RemoveBrowser( HHTMLBrowser unBrowserHandle )
|
||||
{
|
||||
_RemoveBrowser( Self, unBrowserHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_LoadURL", CallingConvention = Platform.CC)]
|
||||
private static extern void _LoadURL( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPostData );
|
||||
|
||||
#endregion
|
||||
internal void LoadURL( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchURL, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPostData )
|
||||
{
|
||||
_LoadURL( Self, unBrowserHandle, pchURL, pchPostData );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetSize", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetSize( IntPtr self, HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight );
|
||||
|
||||
#endregion
|
||||
internal void SetSize( HHTMLBrowser unBrowserHandle, uint unWidth, uint unHeight )
|
||||
{
|
||||
_SetSize( Self, unBrowserHandle, unWidth, unHeight );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_StopLoad", CallingConvention = Platform.CC)]
|
||||
private static extern void _StopLoad( IntPtr self, HHTMLBrowser unBrowserHandle );
|
||||
|
||||
#endregion
|
||||
internal void StopLoad( HHTMLBrowser unBrowserHandle )
|
||||
{
|
||||
_StopLoad( Self, unBrowserHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Reload", CallingConvention = Platform.CC)]
|
||||
private static extern void _Reload( IntPtr self, HHTMLBrowser unBrowserHandle );
|
||||
|
||||
#endregion
|
||||
internal void Reload( HHTMLBrowser unBrowserHandle )
|
||||
{
|
||||
_Reload( Self, unBrowserHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_GoBack", CallingConvention = Platform.CC)]
|
||||
private static extern void _GoBack( IntPtr self, HHTMLBrowser unBrowserHandle );
|
||||
|
||||
#endregion
|
||||
internal void GoBack( HHTMLBrowser unBrowserHandle )
|
||||
{
|
||||
_GoBack( Self, unBrowserHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_GoForward", CallingConvention = Platform.CC)]
|
||||
private static extern void _GoForward( IntPtr self, HHTMLBrowser unBrowserHandle );
|
||||
|
||||
#endregion
|
||||
internal void GoForward( HHTMLBrowser unBrowserHandle )
|
||||
{
|
||||
_GoForward( Self, unBrowserHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_AddHeader", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddHeader( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
|
||||
#endregion
|
||||
internal void AddHeader( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
{
|
||||
_AddHeader( Self, unBrowserHandle, pchKey, pchValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_ExecuteJavascript", CallingConvention = Platform.CC)]
|
||||
private static extern void _ExecuteJavascript( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchScript );
|
||||
|
||||
#endregion
|
||||
internal void ExecuteJavascript( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchScript )
|
||||
{
|
||||
_ExecuteJavascript( Self, unBrowserHandle, pchScript );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseUp", CallingConvention = Platform.CC)]
|
||||
private static extern void _MouseUp( IntPtr self, HHTMLBrowser unBrowserHandle, IntPtr eMouseButton );
|
||||
|
||||
#endregion
|
||||
internal void MouseUp( HHTMLBrowser unBrowserHandle, IntPtr eMouseButton )
|
||||
{
|
||||
_MouseUp( Self, unBrowserHandle, eMouseButton );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseDown", CallingConvention = Platform.CC)]
|
||||
private static extern void _MouseDown( IntPtr self, HHTMLBrowser unBrowserHandle, IntPtr eMouseButton );
|
||||
|
||||
#endregion
|
||||
internal void MouseDown( HHTMLBrowser unBrowserHandle, IntPtr eMouseButton )
|
||||
{
|
||||
_MouseDown( Self, unBrowserHandle, eMouseButton );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseDoubleClick", CallingConvention = Platform.CC)]
|
||||
private static extern void _MouseDoubleClick( IntPtr self, HHTMLBrowser unBrowserHandle, IntPtr eMouseButton );
|
||||
|
||||
#endregion
|
||||
internal void MouseDoubleClick( HHTMLBrowser unBrowserHandle, IntPtr eMouseButton )
|
||||
{
|
||||
_MouseDoubleClick( Self, unBrowserHandle, eMouseButton );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseMove", CallingConvention = Platform.CC)]
|
||||
private static extern void _MouseMove( IntPtr self, HHTMLBrowser unBrowserHandle, int x, int y );
|
||||
|
||||
#endregion
|
||||
internal void MouseMove( HHTMLBrowser unBrowserHandle, int x, int y )
|
||||
{
|
||||
_MouseMove( Self, unBrowserHandle, x, y );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_MouseWheel", CallingConvention = Platform.CC)]
|
||||
private static extern void _MouseWheel( IntPtr self, HHTMLBrowser unBrowserHandle, int nDelta );
|
||||
|
||||
#endregion
|
||||
internal void MouseWheel( HHTMLBrowser unBrowserHandle, int nDelta )
|
||||
{
|
||||
_MouseWheel( Self, unBrowserHandle, nDelta );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyDown", CallingConvention = Platform.CC)]
|
||||
private static extern void _KeyDown( IntPtr self, HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers, [MarshalAs( UnmanagedType.U1 )] bool bIsSystemKey );
|
||||
|
||||
#endregion
|
||||
internal void KeyDown( HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers, [MarshalAs( UnmanagedType.U1 )] bool bIsSystemKey )
|
||||
{
|
||||
_KeyDown( Self, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers, bIsSystemKey );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyUp", CallingConvention = Platform.CC)]
|
||||
private static extern void _KeyUp( IntPtr self, HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers );
|
||||
|
||||
#endregion
|
||||
internal void KeyUp( HHTMLBrowser unBrowserHandle, uint nNativeKeyCode, IntPtr eHTMLKeyModifiers )
|
||||
{
|
||||
_KeyUp( Self, unBrowserHandle, nNativeKeyCode, eHTMLKeyModifiers );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_KeyChar", CallingConvention = Platform.CC)]
|
||||
private static extern void _KeyChar( IntPtr self, HHTMLBrowser unBrowserHandle, uint cUnicodeChar, IntPtr eHTMLKeyModifiers );
|
||||
|
||||
#endregion
|
||||
internal void KeyChar( HHTMLBrowser unBrowserHandle, uint cUnicodeChar, IntPtr eHTMLKeyModifiers )
|
||||
{
|
||||
_KeyChar( Self, unBrowserHandle, cUnicodeChar, eHTMLKeyModifiers );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetHorizontalScroll", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetHorizontalScroll( IntPtr self, HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll );
|
||||
|
||||
#endregion
|
||||
internal void SetHorizontalScroll( HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll )
|
||||
{
|
||||
_SetHorizontalScroll( Self, unBrowserHandle, nAbsolutePixelScroll );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetVerticalScroll", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetVerticalScroll( IntPtr self, HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll );
|
||||
|
||||
#endregion
|
||||
internal void SetVerticalScroll( HHTMLBrowser unBrowserHandle, uint nAbsolutePixelScroll )
|
||||
{
|
||||
_SetVerticalScroll( Self, unBrowserHandle, nAbsolutePixelScroll );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetKeyFocus", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetKeyFocus( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bHasKeyFocus );
|
||||
|
||||
#endregion
|
||||
internal void SetKeyFocus( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bHasKeyFocus )
|
||||
{
|
||||
_SetKeyFocus( Self, unBrowserHandle, bHasKeyFocus );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_ViewSource", CallingConvention = Platform.CC)]
|
||||
private static extern void _ViewSource( IntPtr self, HHTMLBrowser unBrowserHandle );
|
||||
|
||||
#endregion
|
||||
internal void ViewSource( HHTMLBrowser unBrowserHandle )
|
||||
{
|
||||
_ViewSource( Self, unBrowserHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_CopyToClipboard", CallingConvention = Platform.CC)]
|
||||
private static extern void _CopyToClipboard( IntPtr self, HHTMLBrowser unBrowserHandle );
|
||||
|
||||
#endregion
|
||||
internal void CopyToClipboard( HHTMLBrowser unBrowserHandle )
|
||||
{
|
||||
_CopyToClipboard( Self, unBrowserHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_PasteFromClipboard", CallingConvention = Platform.CC)]
|
||||
private static extern void _PasteFromClipboard( IntPtr self, HHTMLBrowser unBrowserHandle );
|
||||
|
||||
#endregion
|
||||
internal void PasteFromClipboard( HHTMLBrowser unBrowserHandle )
|
||||
{
|
||||
_PasteFromClipboard( Self, unBrowserHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Find", CallingConvention = Platform.CC)]
|
||||
private static extern void _Find( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSearchStr, [MarshalAs( UnmanagedType.U1 )] bool bCurrentlyInFind, [MarshalAs( UnmanagedType.U1 )] bool bReverse );
|
||||
|
||||
#endregion
|
||||
internal void Find( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSearchStr, [MarshalAs( UnmanagedType.U1 )] bool bCurrentlyInFind, [MarshalAs( UnmanagedType.U1 )] bool bReverse )
|
||||
{
|
||||
_Find( Self, unBrowserHandle, pchSearchStr, bCurrentlyInFind, bReverse );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_StopFind", CallingConvention = Platform.CC)]
|
||||
private static extern void _StopFind( IntPtr self, HHTMLBrowser unBrowserHandle );
|
||||
|
||||
#endregion
|
||||
internal void StopFind( HHTMLBrowser unBrowserHandle )
|
||||
{
|
||||
_StopFind( Self, unBrowserHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_GetLinkAtPosition", CallingConvention = Platform.CC)]
|
||||
private static extern void _GetLinkAtPosition( IntPtr self, HHTMLBrowser unBrowserHandle, int x, int y );
|
||||
|
||||
#endregion
|
||||
internal void GetLinkAtPosition( HHTMLBrowser unBrowserHandle, int x, int y )
|
||||
{
|
||||
_GetLinkAtPosition( Self, unBrowserHandle, x, y );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetCookie", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetCookie( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHostname, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPath, RTime32 nExpires, [MarshalAs( UnmanagedType.U1 )] bool bSecure, [MarshalAs( UnmanagedType.U1 )] bool bHTTPOnly );
|
||||
|
||||
#endregion
|
||||
internal void SetCookie( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHostname, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPath, RTime32 nExpires, [MarshalAs( UnmanagedType.U1 )] bool bSecure, [MarshalAs( UnmanagedType.U1 )] bool bHTTPOnly )
|
||||
{
|
||||
_SetCookie( Self, pchHostname, pchKey, pchValue, pchPath, nExpires, bSecure, bHTTPOnly );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetPageScaleFactor", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetPageScaleFactor( IntPtr self, HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY );
|
||||
|
||||
#endregion
|
||||
internal void SetPageScaleFactor( HHTMLBrowser unBrowserHandle, float flZoom, int nPointX, int nPointY )
|
||||
{
|
||||
_SetPageScaleFactor( Self, unBrowserHandle, flZoom, nPointX, nPointY );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetBackgroundMode", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetBackgroundMode( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bBackgroundMode );
|
||||
|
||||
#endregion
|
||||
internal void SetBackgroundMode( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bBackgroundMode )
|
||||
{
|
||||
_SetBackgroundMode( Self, unBrowserHandle, bBackgroundMode );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_SetDPIScalingFactor", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetDPIScalingFactor( IntPtr self, HHTMLBrowser unBrowserHandle, float flDPIScaling );
|
||||
|
||||
#endregion
|
||||
internal void SetDPIScalingFactor( HHTMLBrowser unBrowserHandle, float flDPIScaling )
|
||||
{
|
||||
_SetDPIScalingFactor( Self, unBrowserHandle, flDPIScaling );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_OpenDeveloperTools", CallingConvention = Platform.CC)]
|
||||
private static extern void _OpenDeveloperTools( IntPtr self, HHTMLBrowser unBrowserHandle );
|
||||
|
||||
#endregion
|
||||
internal void OpenDeveloperTools( HHTMLBrowser unBrowserHandle )
|
||||
{
|
||||
_OpenDeveloperTools( Self, unBrowserHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_AllowStartRequest", CallingConvention = Platform.CC)]
|
||||
private static extern void _AllowStartRequest( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bAllowed );
|
||||
|
||||
#endregion
|
||||
internal void AllowStartRequest( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bAllowed )
|
||||
{
|
||||
_AllowStartRequest( Self, unBrowserHandle, bAllowed );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_JSDialogResponse", CallingConvention = Platform.CC)]
|
||||
private static extern void _JSDialogResponse( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bResult );
|
||||
|
||||
#endregion
|
||||
internal void JSDialogResponse( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.U1 )] bool bResult )
|
||||
{
|
||||
_JSDialogResponse( Self, unBrowserHandle, bResult );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_FileLoadDialogResponse", CallingConvention = Platform.CC)]
|
||||
private static extern void _FileLoadDialogResponse( IntPtr self, HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSelectedFiles );
|
||||
|
||||
#endregion
|
||||
internal void FileLoadDialogResponse( HHTMLBrowser unBrowserHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchSelectedFiles )
|
||||
{
|
||||
_FileLoadDialogResponse( Self, unBrowserHandle, pchSelectedFiles );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
325
Facepunch.Steamworks/Generated/Interfaces/ISteamHTTP.cs
Normal file
325
Facepunch.Steamworks/Generated/Interfaces/ISteamHTTP.cs
Normal file
@@ -0,0 +1,325 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamHTTP : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamHTTP( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamHTTP_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamHTTP_v003();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamHTTP_v003();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerHTTP_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerHTTP_v003();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerHTTP_v003();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_CreateHTTPRequest", CallingConvention = Platform.CC)]
|
||||
private static extern HTTPRequestHandle _CreateHTTPRequest( IntPtr self, HTTPMethod eHTTPRequestMethod, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchAbsoluteURL );
|
||||
|
||||
#endregion
|
||||
internal HTTPRequestHandle CreateHTTPRequest( HTTPMethod eHTTPRequestMethod, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchAbsoluteURL )
|
||||
{
|
||||
var returnValue = _CreateHTTPRequest( Self, eHTTPRequestMethod, pchAbsoluteURL );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestContextValue", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestContextValue( IntPtr self, HTTPRequestHandle hRequest, ulong ulContextValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestContextValue( HTTPRequestHandle hRequest, ulong ulContextValue )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestContextValue( Self, hRequest, ulContextValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestNetworkActivityTimeout", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestNetworkActivityTimeout( IntPtr self, HTTPRequestHandle hRequest, uint unTimeoutSeconds );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hRequest, uint unTimeoutSeconds )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestNetworkActivityTimeout( Self, hRequest, unTimeoutSeconds );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestHeaderValue", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestHeaderValue( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderValue )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestHeaderValue( Self, hRequest, pchHeaderName, pchHeaderValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestGetOrPostParameter", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestGetOrPostParameter( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamValue )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestGetOrPostParameter( Self, hRequest, pchParamName, pchParamValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SendHTTPRequest", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SendHTTPRequest( IntPtr self, HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle );
|
||||
|
||||
#endregion
|
||||
internal bool SendHTTPRequest( HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle )
|
||||
{
|
||||
var returnValue = _SendHTTPRequest( Self, hRequest, ref pCallHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SendHTTPRequestAndStreamResponse", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SendHTTPRequestAndStreamResponse( IntPtr self, HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle );
|
||||
|
||||
#endregion
|
||||
internal bool SendHTTPRequestAndStreamResponse( HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle )
|
||||
{
|
||||
var returnValue = _SendHTTPRequestAndStreamResponse( Self, hRequest, ref pCallHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_DeferHTTPRequest", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _DeferHTTPRequest( IntPtr self, HTTPRequestHandle hRequest );
|
||||
|
||||
#endregion
|
||||
internal bool DeferHTTPRequest( HTTPRequestHandle hRequest )
|
||||
{
|
||||
var returnValue = _DeferHTTPRequest( Self, hRequest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_PrioritizeHTTPRequest", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _PrioritizeHTTPRequest( IntPtr self, HTTPRequestHandle hRequest );
|
||||
|
||||
#endregion
|
||||
internal bool PrioritizeHTTPRequest( HTTPRequestHandle hRequest )
|
||||
{
|
||||
var returnValue = _PrioritizeHTTPRequest( Self, hRequest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseHeaderSize", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPResponseHeaderSize( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref uint unResponseHeaderSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref uint unResponseHeaderSize )
|
||||
{
|
||||
var returnValue = _GetHTTPResponseHeaderSize( Self, hRequest, pchHeaderName, ref unResponseHeaderSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseHeaderValue", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPResponseHeaderValue( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref byte pHeaderValueBuffer, uint unBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref byte pHeaderValueBuffer, uint unBufferSize )
|
||||
{
|
||||
var returnValue = _GetHTTPResponseHeaderValue( Self, hRequest, pchHeaderName, ref pHeaderValueBuffer, unBufferSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseBodySize", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPResponseBodySize( IntPtr self, HTTPRequestHandle hRequest, ref uint unBodySize );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPResponseBodySize( HTTPRequestHandle hRequest, ref uint unBodySize )
|
||||
{
|
||||
var returnValue = _GetHTTPResponseBodySize( Self, hRequest, ref unBodySize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseBodyData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPResponseBodyData( IntPtr self, HTTPRequestHandle hRequest, ref byte pBodyDataBuffer, uint unBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPResponseBodyData( HTTPRequestHandle hRequest, ref byte pBodyDataBuffer, uint unBufferSize )
|
||||
{
|
||||
var returnValue = _GetHTTPResponseBodyData( Self, hRequest, ref pBodyDataBuffer, unBufferSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPStreamingResponseBodyData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPStreamingResponseBodyData( IntPtr self, HTTPRequestHandle hRequest, uint cOffset, ref byte pBodyDataBuffer, uint unBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest, uint cOffset, ref byte pBodyDataBuffer, uint unBufferSize )
|
||||
{
|
||||
var returnValue = _GetHTTPStreamingResponseBodyData( Self, hRequest, cOffset, ref pBodyDataBuffer, unBufferSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_ReleaseHTTPRequest", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ReleaseHTTPRequest( IntPtr self, HTTPRequestHandle hRequest );
|
||||
|
||||
#endregion
|
||||
internal bool ReleaseHTTPRequest( HTTPRequestHandle hRequest )
|
||||
{
|
||||
var returnValue = _ReleaseHTTPRequest( Self, hRequest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPDownloadProgressPct", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPDownloadProgressPct( IntPtr self, HTTPRequestHandle hRequest, ref float pflPercentOut );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, ref float pflPercentOut )
|
||||
{
|
||||
var returnValue = _GetHTTPDownloadProgressPct( Self, hRequest, ref pflPercentOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestRawPostBody", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestRawPostBody( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchContentType, [In,Out] byte[] pubBody, uint unBodyLen );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchContentType, [In,Out] byte[] pubBody, uint unBodyLen )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestRawPostBody( Self, hRequest, pchContentType, pubBody, unBodyLen );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_CreateCookieContainer", CallingConvention = Platform.CC)]
|
||||
private static extern HTTPCookieContainerHandle _CreateCookieContainer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllowResponsesToModify );
|
||||
|
||||
#endregion
|
||||
internal HTTPCookieContainerHandle CreateCookieContainer( [MarshalAs( UnmanagedType.U1 )] bool bAllowResponsesToModify )
|
||||
{
|
||||
var returnValue = _CreateCookieContainer( Self, bAllowResponsesToModify );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_ReleaseCookieContainer", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ReleaseCookieContainer( IntPtr self, HTTPCookieContainerHandle hCookieContainer );
|
||||
|
||||
#endregion
|
||||
internal bool ReleaseCookieContainer( HTTPCookieContainerHandle hCookieContainer )
|
||||
{
|
||||
var returnValue = _ReleaseCookieContainer( Self, hCookieContainer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetCookie", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetCookie( IntPtr self, HTTPCookieContainerHandle hCookieContainer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHost, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUrl, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCookie );
|
||||
|
||||
#endregion
|
||||
internal bool SetCookie( HTTPCookieContainerHandle hCookieContainer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHost, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUrl, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCookie )
|
||||
{
|
||||
var returnValue = _SetCookie( Self, hCookieContainer, pchHost, pchUrl, pchCookie );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestCookieContainer", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestCookieContainer( IntPtr self, HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestCookieContainer( HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestCookieContainer( Self, hRequest, hCookieContainer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestUserAgentInfo", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestUserAgentInfo( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgentInfo );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgentInfo )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestUserAgentInfo( Self, hRequest, pchUserAgentInfo );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestRequiresVerifiedCertificate( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] bool bRequireVerifiedCertificate );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestRequiresVerifiedCertificate( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] bool bRequireVerifiedCertificate )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestRequiresVerifiedCertificate( Self, hRequest, bRequireVerifiedCertificate );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestAbsoluteTimeoutMS( IntPtr self, HTTPRequestHandle hRequest, uint unMilliseconds );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestAbsoluteTimeoutMS( HTTPRequestHandle hRequest, uint unMilliseconds )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestAbsoluteTimeoutMS( Self, hRequest, unMilliseconds );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPRequestWasTimedOut( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] ref bool pbWasTimedOut );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] ref bool pbWasTimedOut )
|
||||
{
|
||||
var returnValue = _GetHTTPRequestWasTimedOut( Self, hRequest, ref pbWasTimedOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
403
Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs
Normal file
403
Facepunch.Steamworks/Generated/Interfaces/ISteamInput.cs
Normal file
@@ -0,0 +1,403 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamInput : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamInput( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamInput_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamInput_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamInput_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Init", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _Init( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool Init()
|
||||
{
|
||||
var returnValue = _Init( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Shutdown", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _Shutdown( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool Shutdown()
|
||||
{
|
||||
var returnValue = _Shutdown( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_RunFrame", CallingConvention = Platform.CC)]
|
||||
private static extern void _RunFrame( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RunFrame()
|
||||
{
|
||||
_RunFrame( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetConnectedControllers", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut );
|
||||
|
||||
#endregion
|
||||
internal int GetConnectedControllers( [In,Out] InputHandle_t[] handlesOut )
|
||||
{
|
||||
var returnValue = _GetConnectedControllers( Self, handlesOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionSetHandle", CallingConvention = Platform.CC)]
|
||||
private static extern InputActionSetHandle_t _GetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
|
||||
|
||||
#endregion
|
||||
internal InputActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName )
|
||||
{
|
||||
var returnValue = _GetActionSetHandle( Self, pszActionSetName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSet", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
|
||||
|
||||
#endregion
|
||||
internal void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle )
|
||||
{
|
||||
_ActivateActionSet( Self, inputHandle, actionSetHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetCurrentActionSet", CallingConvention = Platform.CC)]
|
||||
private static extern InputActionSetHandle_t _GetCurrentActionSet( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle )
|
||||
{
|
||||
var returnValue = _GetCurrentActionSet( Self, inputHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSetLayer", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
|
||||
|
||||
#endregion
|
||||
internal void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
|
||||
{
|
||||
_ActivateActionSetLayer( Self, inputHandle, actionSetLayerHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateActionSetLayer", CallingConvention = Platform.CC)]
|
||||
private static extern void _DeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
|
||||
|
||||
#endregion
|
||||
internal void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
|
||||
{
|
||||
_DeactivateActionSetLayer( Self, inputHandle, actionSetLayerHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateAllActionSetLayers", CallingConvention = Platform.CC)]
|
||||
private static extern void _DeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal void DeactivateAllActionSetLayers( InputHandle_t inputHandle )
|
||||
{
|
||||
_DeactivateAllActionSetLayers( Self, inputHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActiveActionSetLayers", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut );
|
||||
|
||||
#endregion
|
||||
internal int GetActiveActionSetLayers( InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut )
|
||||
{
|
||||
var returnValue = _GetActiveActionSetLayers( Self, inputHandle, handlesOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionHandle", CallingConvention = Platform.CC)]
|
||||
private static extern InputDigitalActionHandle_t _GetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
|
||||
#endregion
|
||||
internal InputDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
|
||||
{
|
||||
var returnValue = _GetDigitalActionHandle( Self, pszActionName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionData", CallingConvention = Platform.CC)]
|
||||
private static extern DigitalState _GetDigitalActionData( IntPtr self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
|
||||
|
||||
#endregion
|
||||
internal DigitalState GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle )
|
||||
{
|
||||
var returnValue = _GetDigitalActionData( Self, inputHandle, digitalActionHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionOrigins", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetDigitalActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut );
|
||||
|
||||
#endregion
|
||||
internal int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut )
|
||||
{
|
||||
var returnValue = _GetDigitalActionOrigins( Self, inputHandle, actionSetHandle, digitalActionHandle, ref originsOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionHandle", CallingConvention = Platform.CC)]
|
||||
private static extern InputAnalogActionHandle_t _GetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
|
||||
#endregion
|
||||
internal InputAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
|
||||
{
|
||||
var returnValue = _GetAnalogActionHandle( Self, pszActionName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionData", CallingConvention = Platform.CC)]
|
||||
private static extern AnalogState _GetAnalogActionData( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
|
||||
|
||||
#endregion
|
||||
internal AnalogState GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle )
|
||||
{
|
||||
var returnValue = _GetAnalogActionData( Self, inputHandle, analogActionHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionOrigins", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAnalogActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut );
|
||||
|
||||
#endregion
|
||||
internal int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut )
|
||||
{
|
||||
var returnValue = _GetAnalogActionOrigins( Self, inputHandle, actionSetHandle, analogActionHandle, ref originsOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetGlyphForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetGlyphForActionOrigin( InputActionOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetGlyphForActionOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetStringForActionOrigin( InputActionOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetStringForActionOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_StopAnalogActionMomentum", CallingConvention = Platform.CC)]
|
||||
private static extern void _StopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
|
||||
|
||||
#endregion
|
||||
internal void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction )
|
||||
{
|
||||
_StopAnalogActionMomentum( Self, inputHandle, eAction );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetMotionData", CallingConvention = Platform.CC)]
|
||||
private static extern MotionState _GetMotionData( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal MotionState GetMotionData( InputHandle_t inputHandle )
|
||||
{
|
||||
var returnValue = _GetMotionData( Self, inputHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerVibration", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerVibration( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed );
|
||||
|
||||
#endregion
|
||||
internal void TriggerVibration( InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed )
|
||||
{
|
||||
_TriggerVibration( Self, inputHandle, usLeftSpeed, usRightSpeed );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_SetLEDColor", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetLEDColor( IntPtr self, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags );
|
||||
|
||||
#endregion
|
||||
internal void SetLEDColor( InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags )
|
||||
{
|
||||
_SetLEDColor( Self, inputHandle, nColorR, nColorG, nColorB, nFlags );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerHapticPulse", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
|
||||
|
||||
#endregion
|
||||
internal void TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec )
|
||||
{
|
||||
_TriggerHapticPulse( Self, inputHandle, eTargetPad, usDurationMicroSec );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerRepeatedHapticPulse", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
|
||||
|
||||
#endregion
|
||||
internal void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags )
|
||||
{
|
||||
_TriggerRepeatedHapticPulse( Self, inputHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ShowBindingPanel", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ShowBindingPanel( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal bool ShowBindingPanel( InputHandle_t inputHandle )
|
||||
{
|
||||
var returnValue = _ShowBindingPanel( Self, inputHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetInputTypeForHandle", CallingConvention = Platform.CC)]
|
||||
private static extern InputType _GetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal InputType GetInputTypeForHandle( InputHandle_t inputHandle )
|
||||
{
|
||||
var returnValue = _GetInputTypeForHandle( Self, inputHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetControllerForGamepadIndex", CallingConvention = Platform.CC)]
|
||||
private static extern InputHandle_t _GetControllerForGamepadIndex( IntPtr self, int nIndex );
|
||||
|
||||
#endregion
|
||||
internal InputHandle_t GetControllerForGamepadIndex( int nIndex )
|
||||
{
|
||||
var returnValue = _GetControllerForGamepadIndex( Self, nIndex );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGamepadIndexForController", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle );
|
||||
|
||||
#endregion
|
||||
internal int GetGamepadIndexForController( InputHandle_t ulinputHandle )
|
||||
{
|
||||
var returnValue = _GetGamepadIndexForController( Self, ulinputHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetStringForXboxOrigin( XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetStringForXboxOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetGlyphForXboxOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern InputActionOrigin _GetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal InputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetActionOriginFromXboxOrigin( Self, inputHandle, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TranslateActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern InputActionOrigin _TranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin );
|
||||
|
||||
#endregion
|
||||
internal InputActionOrigin TranslateActionOrigin( InputType eDestinationInputType, InputActionOrigin eSourceOrigin )
|
||||
{
|
||||
var returnValue = _TranslateActionOrigin( Self, eDestinationInputType, eSourceOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDeviceBindingRevision", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetDeviceBindingRevision( IntPtr self, InputHandle_t inputHandle, ref int pMajor, ref int pMinor );
|
||||
|
||||
#endregion
|
||||
internal bool GetDeviceBindingRevision( InputHandle_t inputHandle, ref int pMajor, ref int pMinor )
|
||||
{
|
||||
var returnValue = _GetDeviceBindingRevision( Self, inputHandle, ref pMajor, ref pMinor );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetRemotePlaySessionID", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetRemotePlaySessionID( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal uint GetRemotePlaySessionID( InputHandle_t inputHandle )
|
||||
{
|
||||
var returnValue = _GetRemotePlaySessionID( Self, inputHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
500
Facepunch.Steamworks/Generated/Interfaces/ISteamInventory.cs
Normal file
500
Facepunch.Steamworks/Generated/Interfaces/ISteamInventory.cs
Normal file
@@ -0,0 +1,500 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamInventory : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamInventory( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamInventory_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamInventory_v003();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamInventory_v003();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerInventory_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerInventory_v003();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerInventory_v003();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultStatus", CallingConvention = Platform.CC)]
|
||||
private static extern Result _GetResultStatus( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Find out the status of an asynchronous inventory result handle.
|
||||
/// </summary>
|
||||
internal Result GetResultStatus( SteamInventoryResult_t resultHandle )
|
||||
{
|
||||
var returnValue = _GetResultStatus( Self, resultHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetResultItems( IntPtr self, SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Copies the contents of a result set into a flat array. The specific contents of the result set depend on which query which was used.
|
||||
/// </summary>
|
||||
internal bool GetResultItems( SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize )
|
||||
{
|
||||
var returnValue = _GetResultItems( Self, resultHandle, pOutItemsArray, ref punOutItemsArraySize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultItemProperty", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
IntPtr mempchValueBuffer = Helpers.TakeMemory();
|
||||
var returnValue = _GetResultItemProperty( Self, resultHandle, unItemIndex, pchPropertyName, mempchValueBuffer, ref punValueBufferSizeOut );
|
||||
pchValueBuffer = Helpers.MemoryToString( mempchValueBuffer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultTimestamp", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetResultTimestamp( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.
|
||||
/// </summary>
|
||||
internal uint GetResultTimestamp( SteamInventoryResult_t resultHandle )
|
||||
{
|
||||
var returnValue = _GetResultTimestamp( Self, resultHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_CheckResultSteamID", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CheckResultSteamID( IntPtr self, SteamInventoryResult_t resultHandle, SteamId steamIDExpected );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.
|
||||
/// </summary>
|
||||
internal bool CheckResultSteamID( SteamInventoryResult_t resultHandle, SteamId steamIDExpected )
|
||||
{
|
||||
var returnValue = _CheckResultSteamID( Self, resultHandle, steamIDExpected );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_DestroyResult", CallingConvention = Platform.CC)]
|
||||
private static extern void _DestroyResult( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Destroys a result handle and frees all associated memory.
|
||||
/// </summary>
|
||||
internal void DestroyResult( SteamInventoryResult_t resultHandle )
|
||||
{
|
||||
_DestroyResult( Self, resultHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetAllItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetAllItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Captures the entire state of the current users Steam inventory.
|
||||
/// </summary>
|
||||
internal bool GetAllItems( ref SteamInventoryResult_t pResultHandle )
|
||||
{
|
||||
var returnValue = _GetAllItems( Self, ref pResultHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemsByID", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetItemsByID( IntPtr self, ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.
|
||||
/// </summary>
|
||||
internal bool GetItemsByID( ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs )
|
||||
{
|
||||
var returnValue = _GetItemsByID( Self, ref pResultHandle, ref pInstanceIDs, unCountInstanceIDs );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SerializeResult", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SerializeResult( Self, resultHandle, pOutBuffer, ref punOutBufferSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_DeserializeResult", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _DeserializeResult( Self, ref pOutResultHandle, pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GenerateItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GenerateItems( Self, ref pResultHandle, pArrayItemDefs, punArrayQuantity, unArrayLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GrantPromoItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GrantPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).
|
||||
/// </summary>
|
||||
internal bool GrantPromoItems( ref SteamInventoryResult_t pResultHandle )
|
||||
{
|
||||
var returnValue = _GrantPromoItems( Self, ref pResultHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_AddPromoItem", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _AddPromoItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef );
|
||||
|
||||
#endregion
|
||||
internal bool AddPromoItem( ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef )
|
||||
{
|
||||
var returnValue = _AddPromoItem( Self, ref pResultHandle, itemDef );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_AddPromoItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _AddPromoItems( Self, ref pResultHandle, pArrayItemDefs, unArrayLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_ConsumeItem", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ConsumeItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// ConsumeItem() removes items from the inventory permanently.
|
||||
/// </summary>
|
||||
internal bool ConsumeItem( ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity )
|
||||
{
|
||||
var returnValue = _ConsumeItem( Self, ref pResultHandle, itemConsume, unQuantity );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_ExchangeItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _ExchangeItems( Self, ref pResultHandle, pArrayGenerate, punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy, punArrayDestroyQuantity, unArrayDestroyLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TransferItemQuantity", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _TransferItemQuantity( Self, ref pResultHandle, itemIdSource, unQuantity, itemIdDest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SendItemDropHeartbeat", CallingConvention = Platform.CC)]
|
||||
private static extern void _SendItemDropHeartbeat( IntPtr self );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Deprecated method. Playtime accounting is performed on the Steam servers.
|
||||
/// </summary>
|
||||
internal void SendItemDropHeartbeat()
|
||||
{
|
||||
_SendItemDropHeartbeat( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TriggerItemDrop", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _TriggerItemDrop( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Playtime credit must be consumed and turned into item drops by your game.
|
||||
/// </summary>
|
||||
internal bool TriggerItemDrop( ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition )
|
||||
{
|
||||
var returnValue = _TriggerItemDrop( Self, ref pResultHandle, dropListDefinition );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TradeItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _TradeItems( Self, ref pResultHandle, steamIDTradePartner, pArrayGive, pArrayGiveQuantity, nArrayGiveLength, pArrayGet, pArrayGetQuantity, nArrayGetLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_LoadItemDefinitions", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _LoadItemDefinitions( IntPtr self );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// LoadItemDefinitions triggers the automatic load and refresh of item definitions.
|
||||
/// </summary>
|
||||
internal bool LoadItemDefinitions()
|
||||
{
|
||||
var returnValue = _LoadItemDefinitions( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemDefinitionIDs", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetItemDefinitionIDs( Self, pItemDefIDs, ref punItemDefIDsArraySize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemDefinitionProperty", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
IntPtr mempchValueBuffer = Helpers.TakeMemory();
|
||||
var returnValue = _GetItemDefinitionProperty( Self, iDefinition, pchPropertyName, mempchValueBuffer, ref punValueBufferSizeOut );
|
||||
pchValueBuffer = Helpers.MemoryToString( mempchValueBuffer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RequestEligiblePromoItemDefinitionsIDs", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestEligiblePromoItemDefinitionsIDs( IntPtr self, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<SteamInventoryEligiblePromoItemDefIDs_t> RequestEligiblePromoItemDefinitionsIDs( SteamId steamID )
|
||||
{
|
||||
var returnValue = _RequestEligiblePromoItemDefinitionsIDs( Self, steamID );
|
||||
return new CallResult<SteamInventoryEligiblePromoItemDefIDs_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetEligiblePromoItemDefinitionIDs", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetEligiblePromoItemDefinitionIDs( Self, steamID, pItemDefIDs, ref punItemDefIDsArraySize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_StartPurchase", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _StartPurchase( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength );
|
||||
|
||||
#endregion
|
||||
internal CallResult<SteamInventoryStartPurchaseResult_t> StartPurchase( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength )
|
||||
{
|
||||
var returnValue = _StartPurchase( Self, pArrayItemDefs, punArrayQuantity, unArrayLength );
|
||||
return new CallResult<SteamInventoryStartPurchaseResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RequestPrices", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestPrices( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal CallResult<SteamInventoryRequestPricesResult_t> RequestPrices()
|
||||
{
|
||||
var returnValue = _RequestPrices( Self );
|
||||
return new CallResult<SteamInventoryRequestPricesResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetNumItemsWithPrices", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetNumItemsWithPrices( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetNumItemsWithPrices()
|
||||
{
|
||||
var returnValue = _GetNumItemsWithPrices( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemsWithPrices", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetItemsWithPrices( Self, pArrayItemDefs, pCurrentPrices, pBasePrices, unArrayLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemPrice", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetItemPrice( Self, iDefinition, ref pCurrentPrice, ref pBasePrice );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_StartUpdateProperties", CallingConvention = Platform.CC)]
|
||||
private static extern SteamInventoryUpdateHandle_t _StartUpdateProperties( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamInventoryUpdateHandle_t StartUpdateProperties()
|
||||
{
|
||||
var returnValue = _StartUpdateProperties( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RemoveProperty", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _RemoveProperty( Self, handle, nItemID, pchPropertyName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue )
|
||||
{
|
||||
var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, pchPropertyValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyBool", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyInt64", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue )
|
||||
{
|
||||
var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, nValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue )
|
||||
{
|
||||
var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, flValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SubmitUpdateProperties", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SubmitUpdateProperties( Self, handle, ref pResultHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
450
Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmaking.cs
Normal file
450
Facepunch.Steamworks/Generated/Interfaces/ISteamMatchmaking.cs
Normal file
@@ -0,0 +1,450 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamMatchmaking : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmaking( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMatchmaking_v009", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamMatchmaking_v009();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMatchmaking_v009();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGameCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFavoriteGameCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetFavoriteGameCount()
|
||||
{
|
||||
var returnValue = _GetFavoriteGameCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGame", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetFavoriteGame( IntPtr self, int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer );
|
||||
|
||||
#endregion
|
||||
internal bool GetFavoriteGame( int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer )
|
||||
{
|
||||
var returnValue = _GetFavoriteGame( Self, iGame, ref pnAppID, ref pnIP, ref pnConnPort, ref pnQueryPort, ref punFlags, ref pRTime32LastPlayedOnServer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddFavoriteGame", CallingConvention = Platform.CC)]
|
||||
private static extern int _AddFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer );
|
||||
|
||||
#endregion
|
||||
internal int AddFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer )
|
||||
{
|
||||
var returnValue = _AddFavoriteGame( Self, nAppID, nIP, nConnPort, nQueryPort, unFlags, rTime32LastPlayedOnServer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RemoveFavoriteGame", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _RemoveFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags );
|
||||
|
||||
#endregion
|
||||
internal bool RemoveFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags )
|
||||
{
|
||||
var returnValue = _RemoveFavoriteGame( Self, nAppID, nIP, nConnPort, nQueryPort, unFlags );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyList", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestLobbyList( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal CallResult<LobbyMatchList_t> RequestLobbyList()
|
||||
{
|
||||
var returnValue = _RequestLobbyList( Self );
|
||||
return new CallResult<LobbyMatchList_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListStringFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListStringFilter( IntPtr self, [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 )
|
||||
{
|
||||
_AddRequestLobbyListStringFilter( Self, pchKeyToMatch, pchValueToMatch, eComparisonType );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNumericalFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListNumericalFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListNumericalFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType )
|
||||
{
|
||||
_AddRequestLobbyListNumericalFilter( Self, pchKeyToMatch, nValueToMatch, eComparisonType );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNearValueFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListNearValueFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListNearValueFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo )
|
||||
{
|
||||
_AddRequestLobbyListNearValueFilter( Self, pchKeyToMatch, nValueToBeCloseTo );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListFilterSlotsAvailable( IntPtr self, int nSlotsAvailable );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable )
|
||||
{
|
||||
_AddRequestLobbyListFilterSlotsAvailable( Self, nSlotsAvailable );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListDistanceFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListDistanceFilter( IntPtr self, LobbyDistanceFilter eLobbyDistanceFilter );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListDistanceFilter( LobbyDistanceFilter eLobbyDistanceFilter )
|
||||
{
|
||||
_AddRequestLobbyListDistanceFilter( Self, eLobbyDistanceFilter );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListResultCountFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListResultCountFilter( IntPtr self, int cMaxResults );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListResultCountFilter( int cMaxResults )
|
||||
{
|
||||
_AddRequestLobbyListResultCountFilter( Self, cMaxResults );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListCompatibleMembersFilter( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListCompatibleMembersFilter( SteamId steamIDLobby )
|
||||
{
|
||||
_AddRequestLobbyListCompatibleMembersFilter( Self, steamIDLobby );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetLobbyByIndex( IntPtr self, int iLobby );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetLobbyByIndex( int iLobby )
|
||||
{
|
||||
var returnValue = _GetLobbyByIndex( Self, iLobby );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_CreateLobby", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _CreateLobby( IntPtr self, LobbyType eLobbyType, int cMaxMembers );
|
||||
|
||||
#endregion
|
||||
internal CallResult<LobbyCreated_t> CreateLobby( LobbyType eLobbyType, int cMaxMembers )
|
||||
{
|
||||
var returnValue = _CreateLobby( Self, eLobbyType, cMaxMembers );
|
||||
return new CallResult<LobbyCreated_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_JoinLobby", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _JoinLobby( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal CallResult<LobbyEnter_t> JoinLobby( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _JoinLobby( Self, steamIDLobby );
|
||||
return new CallResult<LobbyEnter_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_LeaveLobby", CallingConvention = Platform.CC)]
|
||||
private static extern void _LeaveLobby( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal void LeaveLobby( SteamId steamIDLobby )
|
||||
{
|
||||
_LeaveLobby( Self, steamIDLobby );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_InviteUserToLobby", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _InviteUserToLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDInvitee );
|
||||
|
||||
#endregion
|
||||
internal bool InviteUserToLobby( SteamId steamIDLobby, SteamId steamIDInvitee )
|
||||
{
|
||||
var returnValue = _InviteUserToLobby( Self, steamIDLobby, steamIDInvitee );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetNumLobbyMembers", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetNumLobbyMembers( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal int GetNumLobbyMembers( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _GetNumLobbyMembers( Self, steamIDLobby );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetLobbyMemberByIndex( IntPtr self, SteamId steamIDLobby, int iMember );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetLobbyMemberByIndex( SteamId steamIDLobby, int iMember )
|
||||
{
|
||||
var returnValue = _GetLobbyMemberByIndex( Self, steamIDLobby, iMember );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyData", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal string GetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
var returnValue = _GetLobbyData( Self, steamIDLobby, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetLobbyData( IntPtr self, SteamId steamIDLobby, [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 )
|
||||
{
|
||||
var returnValue = _SetLobbyData( Self, steamIDLobby, pchKey, pchValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyDataCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetLobbyDataCount( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal int GetLobbyDataCount( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _GetLobbyDataCount( Self, steamIDLobby );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyDataByIndex", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetLobbyDataByIndex( IntPtr self, SteamId steamIDLobby, int iLobbyData, IntPtr pchKey, int cchKeyBufferSize, IntPtr pchValue, int cchValueBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetLobbyDataByIndex( SteamId steamIDLobby, int iLobbyData, out string pchKey, out string pchValue )
|
||||
{
|
||||
IntPtr mempchKey = Helpers.TakeMemory();
|
||||
IntPtr mempchValue = Helpers.TakeMemory();
|
||||
var returnValue = _GetLobbyDataByIndex( Self, steamIDLobby, iLobbyData, mempchKey, (1024 * 32), mempchValue, (1024 * 32) );
|
||||
pchKey = Helpers.MemoryToString( mempchKey );
|
||||
pchValue = Helpers.MemoryToString( mempchValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_DeleteLobbyData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _DeleteLobbyData( Self, steamIDLobby, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberData", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetLobbyMemberData( IntPtr self, SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal string GetLobbyMemberData( SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
var returnValue = _GetLobbyMemberData( Self, steamIDLobby, steamIDUser, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberData", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetLobbyMemberData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
|
||||
#endregion
|
||||
internal void SetLobbyMemberData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
{
|
||||
_SetLobbyMemberData( Self, steamIDLobby, pchKey, pchValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SendLobbyChatMsg", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SendLobbyChatMsg( IntPtr self, SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody );
|
||||
|
||||
#endregion
|
||||
internal bool SendLobbyChatMsg( SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody )
|
||||
{
|
||||
var returnValue = _SendLobbyChatMsg( Self, steamIDLobby, pvMsgBody, cubMsgBody );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyChatEntry", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetLobbyChatEntry( IntPtr self, SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType );
|
||||
|
||||
#endregion
|
||||
internal int GetLobbyChatEntry( SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType )
|
||||
{
|
||||
var returnValue = _GetLobbyChatEntry( Self, steamIDLobby, iChatID, ref pSteamIDUser, pvData, cubData, ref peChatEntryType );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _RequestLobbyData( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal bool RequestLobbyData( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _RequestLobbyData( Self, steamIDLobby );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyGameServer", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetLobbyGameServer( IntPtr self, SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer );
|
||||
|
||||
#endregion
|
||||
internal void SetLobbyGameServer( SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer )
|
||||
{
|
||||
_SetLobbyGameServer( Self, steamIDLobby, unGameServerIP, unGameServerPort, steamIDGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyGameServer", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetLobbyGameServer( IntPtr self, SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer );
|
||||
|
||||
#endregion
|
||||
internal bool GetLobbyGameServer( SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer )
|
||||
{
|
||||
var returnValue = _GetLobbyGameServer( Self, steamIDLobby, ref punGameServerIP, ref punGameServerPort, ref psteamIDGameServer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberLimit", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby, int cMaxMembers );
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyMemberLimit( SteamId steamIDLobby, int cMaxMembers )
|
||||
{
|
||||
var returnValue = _SetLobbyMemberLimit( Self, steamIDLobby, cMaxMembers );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberLimit", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal int GetLobbyMemberLimit( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _GetLobbyMemberLimit( Self, steamIDLobby );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyType", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetLobbyType( IntPtr self, SteamId steamIDLobby, LobbyType eLobbyType );
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyType( SteamId steamIDLobby, LobbyType eLobbyType )
|
||||
{
|
||||
var returnValue = _SetLobbyType( Self, steamIDLobby, eLobbyType );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyJoinable", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetLobbyJoinable( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable );
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyJoinable( SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable )
|
||||
{
|
||||
var returnValue = _SetLobbyJoinable( Self, steamIDLobby, bLobbyJoinable );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyOwner", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetLobbyOwner( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetLobbyOwner( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _GetLobbyOwner( Self, steamIDLobby );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyOwner", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetLobbyOwner( IntPtr self, SteamId steamIDLobby, SteamId steamIDNewOwner );
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyOwner( SteamId steamIDLobby, SteamId steamIDNewOwner )
|
||||
{
|
||||
var returnValue = _SetLobbyOwner( Self, steamIDLobby, steamIDNewOwner );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLinkedLobby", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetLinkedLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDLobbyDependent );
|
||||
|
||||
#endregion
|
||||
internal bool SetLinkedLobby( SteamId steamIDLobby, SteamId steamIDLobbyDependent )
|
||||
{
|
||||
var returnValue = _SetLinkedLobby( Self, steamIDLobby, steamIDLobbyDependent );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamMatchmakingPingResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingPingResponse( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPingResponse_ServerResponded", CallingConvention = Platform.CC)]
|
||||
private static extern void _ServerResponded( IntPtr self, ref gameserveritem_t server );
|
||||
|
||||
#endregion
|
||||
internal void ServerResponded( ref gameserveritem_t server )
|
||||
{
|
||||
_ServerResponded( Self, ref server );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPingResponse_ServerFailedToRespond", CallingConvention = Platform.CC)]
|
||||
private static extern void _ServerFailedToRespond( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void ServerFailedToRespond()
|
||||
{
|
||||
_ServerFailedToRespond( Self );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamMatchmakingPlayersResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingPlayersResponse( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddPlayerToList( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nScore, float flTimePlayed );
|
||||
|
||||
#endregion
|
||||
internal void AddPlayerToList( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nScore, float flTimePlayed )
|
||||
{
|
||||
_AddPlayerToList( Self, pchName, nScore, flTimePlayed );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond", CallingConvention = Platform.CC)]
|
||||
private static extern void _PlayersFailedToRespond( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void PlayersFailedToRespond()
|
||||
{
|
||||
_PlayersFailedToRespond( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPlayersResponse_PlayersRefreshComplete", CallingConvention = Platform.CC)]
|
||||
private static extern void _PlayersRefreshComplete( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void PlayersRefreshComplete()
|
||||
{
|
||||
_PlayersRefreshComplete( Self );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamMatchmakingRulesResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingRulesResponse( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded", CallingConvention = Platform.CC)]
|
||||
private static extern void _RulesResponded( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRule, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
|
||||
#endregion
|
||||
internal void RulesResponded( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRule, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
{
|
||||
_RulesResponded( Self, pchRule, pchValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingRulesResponse_RulesFailedToRespond", CallingConvention = Platform.CC)]
|
||||
private static extern void _RulesFailedToRespond( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RulesFailedToRespond()
|
||||
{
|
||||
_RulesFailedToRespond( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingRulesResponse_RulesRefreshComplete", CallingConvention = Platform.CC)]
|
||||
private static extern void _RulesRefreshComplete( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RulesRefreshComplete()
|
||||
{
|
||||
_RulesRefreshComplete( Self );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamMatchmakingServerListResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingServerListResponse( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServerListResponse_ServerResponded", CallingConvention = Platform.CC)]
|
||||
private static extern void _ServerResponded( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
|
||||
#endregion
|
||||
internal void ServerResponded( HServerListRequest hRequest, int iServer )
|
||||
{
|
||||
_ServerResponded( Self, hRequest, iServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServerListResponse_ServerFailedToRespond", CallingConvention = Platform.CC)]
|
||||
private static extern void _ServerFailedToRespond( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
|
||||
#endregion
|
||||
internal void ServerFailedToRespond( HServerListRequest hRequest, int iServer )
|
||||
{
|
||||
_ServerFailedToRespond( Self, hRequest, iServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServerListResponse_RefreshComplete", CallingConvention = Platform.CC)]
|
||||
private static extern void _RefreshComplete( IntPtr self, HServerListRequest hRequest, MatchMakingServerResponse response );
|
||||
|
||||
#endregion
|
||||
internal void RefreshComplete( HServerListRequest hRequest, MatchMakingServerResponse response )
|
||||
{
|
||||
_RefreshComplete( Self, hRequest, response );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamMatchmakingServers : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingServers( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMatchmakingServers_v002", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamMatchmakingServers_v002();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMatchmakingServers_v002();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestInternetServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestInternetServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestInternetServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _RequestInternetServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestLANServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestLANServerList( IntPtr self, AppId iApp, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestLANServerList( AppId iApp, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _RequestLANServerList( Self, iApp, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestFriendsServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestFriendsServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestFriendsServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _RequestFriendsServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestFavoritesServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestFavoritesServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestFavoritesServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _RequestFavoritesServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestHistoryServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestHistoryServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestHistoryServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _RequestHistoryServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestSpectatorServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestSpectatorServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestSpectatorServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _RequestSpectatorServerList( Self, iApp, ref ppchFilters, nFilters, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_ReleaseRequest", CallingConvention = Platform.CC)]
|
||||
private static extern void _ReleaseRequest( IntPtr self, HServerListRequest hServerListRequest );
|
||||
|
||||
#endregion
|
||||
internal void ReleaseRequest( HServerListRequest hServerListRequest )
|
||||
{
|
||||
_ReleaseRequest( Self, hServerListRequest );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_GetServerDetails", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetServerDetails( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
|
||||
#endregion
|
||||
internal gameserveritem_t GetServerDetails( HServerListRequest hRequest, int iServer )
|
||||
{
|
||||
var returnValue = _GetServerDetails( Self, hRequest, iServer );
|
||||
return returnValue.ToType<gameserveritem_t>();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelQuery", CallingConvention = Platform.CC)]
|
||||
private static extern void _CancelQuery( IntPtr self, HServerListRequest hRequest );
|
||||
|
||||
#endregion
|
||||
internal void CancelQuery( HServerListRequest hRequest )
|
||||
{
|
||||
_CancelQuery( Self, hRequest );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RefreshQuery", CallingConvention = Platform.CC)]
|
||||
private static extern void _RefreshQuery( IntPtr self, HServerListRequest hRequest );
|
||||
|
||||
#endregion
|
||||
internal void RefreshQuery( HServerListRequest hRequest )
|
||||
{
|
||||
_RefreshQuery( Self, hRequest );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_IsRefreshing", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsRefreshing( IntPtr self, HServerListRequest hRequest );
|
||||
|
||||
#endregion
|
||||
internal bool IsRefreshing( HServerListRequest hRequest )
|
||||
{
|
||||
var returnValue = _IsRefreshing( Self, hRequest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_GetServerCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetServerCount( IntPtr self, HServerListRequest hRequest );
|
||||
|
||||
#endregion
|
||||
internal int GetServerCount( HServerListRequest hRequest )
|
||||
{
|
||||
var returnValue = _GetServerCount( Self, hRequest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RefreshServer", CallingConvention = Platform.CC)]
|
||||
private static extern void _RefreshServer( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
|
||||
#endregion
|
||||
internal void RefreshServer( HServerListRequest hRequest, int iServer )
|
||||
{
|
||||
_RefreshServer( Self, hRequest, iServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_PingServer", CallingConvention = Platform.CC)]
|
||||
private static extern HServerQuery _PingServer( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerQuery PingServer( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _PingServer( Self, unIP, usPort, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_PlayerDetails", CallingConvention = Platform.CC)]
|
||||
private static extern HServerQuery _PlayerDetails( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerQuery PlayerDetails( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _PlayerDetails( Self, unIP, usPort, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_ServerRules", CallingConvention = Platform.CC)]
|
||||
private static extern HServerQuery _ServerRules( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerQuery ServerRules( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
|
||||
{
|
||||
var returnValue = _ServerRules( Self, unIP, usPort, pRequestServersResponse );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelServerQuery", CallingConvention = Platform.CC)]
|
||||
private static extern void _CancelServerQuery( IntPtr self, HServerQuery hServerQuery );
|
||||
|
||||
#endregion
|
||||
internal void CancelServerQuery( HServerQuery hServerQuery )
|
||||
{
|
||||
_CancelServerQuery( Self, hServerQuery );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
120
Facepunch.Steamworks/Generated/Interfaces/ISteamMusic.cs
Normal file
120
Facepunch.Steamworks/Generated/Interfaces/ISteamMusic.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamMusic : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMusic( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMusic_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamMusic_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMusic_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_BIsEnabled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsEnabled( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsEnabled()
|
||||
{
|
||||
var returnValue = _BIsEnabled( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_BIsPlaying", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsPlaying( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsPlaying()
|
||||
{
|
||||
var returnValue = _BIsPlaying( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_GetPlaybackStatus", CallingConvention = Platform.CC)]
|
||||
private static extern MusicStatus _GetPlaybackStatus( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal MusicStatus GetPlaybackStatus()
|
||||
{
|
||||
var returnValue = _GetPlaybackStatus( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_Play", CallingConvention = Platform.CC)]
|
||||
private static extern void _Play( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void Play()
|
||||
{
|
||||
_Play( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_Pause", CallingConvention = Platform.CC)]
|
||||
private static extern void _Pause( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void Pause()
|
||||
{
|
||||
_Pause( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_PlayPrevious", CallingConvention = Platform.CC)]
|
||||
private static extern void _PlayPrevious( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void PlayPrevious()
|
||||
{
|
||||
_PlayPrevious( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_PlayNext", CallingConvention = Platform.CC)]
|
||||
private static extern void _PlayNext( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void PlayNext()
|
||||
{
|
||||
_PlayNext( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_SetVolume", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetVolume( IntPtr self, float flVolume );
|
||||
|
||||
#endregion
|
||||
internal void SetVolume( float flVolume )
|
||||
{
|
||||
_SetVolume( Self, flVolume );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_GetVolume", CallingConvention = Platform.CC)]
|
||||
private static extern float _GetVolume( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal float GetVolume()
|
||||
{
|
||||
var returnValue = _GetVolume( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
408
Facepunch.Steamworks/Generated/Interfaces/ISteamMusicRemote.cs
Normal file
408
Facepunch.Steamworks/Generated/Interfaces/ISteamMusicRemote.cs
Normal file
@@ -0,0 +1,408 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamMusicRemote : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMusicRemote( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMusicRemote_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamMusicRemote_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMusicRemote_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_RegisterSteamMusicRemote", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _RegisterSteamMusicRemote( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
|
||||
#endregion
|
||||
internal bool RegisterSteamMusicRemote( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
{
|
||||
var returnValue = _RegisterSteamMusicRemote( Self, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_DeregisterSteamMusicRemote", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _DeregisterSteamMusicRemote( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool DeregisterSteamMusicRemote()
|
||||
{
|
||||
var returnValue = _DeregisterSteamMusicRemote( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_BIsCurrentMusicRemote", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsCurrentMusicRemote( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsCurrentMusicRemote()
|
||||
{
|
||||
var returnValue = _BIsCurrentMusicRemote( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_BActivationSuccess", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BActivationSuccess( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool BActivationSuccess( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _BActivationSuccess( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetDisplayName", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetDisplayName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDisplayName );
|
||||
|
||||
#endregion
|
||||
internal bool SetDisplayName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDisplayName )
|
||||
{
|
||||
var returnValue = _SetDisplayName( Self, pchDisplayName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetPNGIcon_64x64", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetPNGIcon_64x64( IntPtr self, IntPtr pvBuffer, uint cbBufferLength );
|
||||
|
||||
#endregion
|
||||
internal bool SetPNGIcon_64x64( IntPtr pvBuffer, uint cbBufferLength )
|
||||
{
|
||||
var returnValue = _SetPNGIcon_64x64( Self, pvBuffer, cbBufferLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlayPrevious", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnablePlayPrevious( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnablePlayPrevious( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnablePlayPrevious( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlayNext", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnablePlayNext( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnablePlayNext( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnablePlayNext( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableShuffled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnableShuffled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnableShuffled( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnableShuffled( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableLooped", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnableLooped( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnableLooped( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnableLooped( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableQueue", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnableQueue( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnableQueue( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnableQueue( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlaylists", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnablePlaylists( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnablePlaylists( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnablePlaylists( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdatePlaybackStatus", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdatePlaybackStatus( IntPtr self, MusicStatus nStatus );
|
||||
|
||||
#endregion
|
||||
internal bool UpdatePlaybackStatus( MusicStatus nStatus )
|
||||
{
|
||||
var returnValue = _UpdatePlaybackStatus( Self, nStatus );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateShuffled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateShuffled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateShuffled( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _UpdateShuffled( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateLooped", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateLooped( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateLooped( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _UpdateLooped( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateVolume", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateVolume( IntPtr self, float flValue );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateVolume( float flValue )
|
||||
{
|
||||
var returnValue = _UpdateVolume( Self, flValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryWillChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CurrentEntryWillChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool CurrentEntryWillChange()
|
||||
{
|
||||
var returnValue = _CurrentEntryWillChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryIsAvailable", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CurrentEntryIsAvailable( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAvailable );
|
||||
|
||||
#endregion
|
||||
internal bool CurrentEntryIsAvailable( [MarshalAs( UnmanagedType.U1 )] bool bAvailable )
|
||||
{
|
||||
var returnValue = _CurrentEntryIsAvailable( Self, bAvailable );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryText", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateCurrentEntryText( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateCurrentEntryText( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText )
|
||||
{
|
||||
var returnValue = _UpdateCurrentEntryText( Self, pchText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryElapsedSeconds", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateCurrentEntryElapsedSeconds( IntPtr self, int nValue );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateCurrentEntryElapsedSeconds( int nValue )
|
||||
{
|
||||
var returnValue = _UpdateCurrentEntryElapsedSeconds( Self, nValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryCoverArt", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateCurrentEntryCoverArt( IntPtr self, IntPtr pvBuffer, uint cbBufferLength );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateCurrentEntryCoverArt( IntPtr pvBuffer, uint cbBufferLength )
|
||||
{
|
||||
var returnValue = _UpdateCurrentEntryCoverArt( Self, pvBuffer, cbBufferLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryDidChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CurrentEntryDidChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool CurrentEntryDidChange()
|
||||
{
|
||||
var returnValue = _CurrentEntryDidChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_QueueWillChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _QueueWillChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool QueueWillChange()
|
||||
{
|
||||
var returnValue = _QueueWillChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_ResetQueueEntries", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ResetQueueEntries( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool ResetQueueEntries()
|
||||
{
|
||||
var returnValue = _ResetQueueEntries( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetQueueEntry", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetQueueEntry( IntPtr self, int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText );
|
||||
|
||||
#endregion
|
||||
internal bool SetQueueEntry( int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText )
|
||||
{
|
||||
var returnValue = _SetQueueEntry( Self, nID, nPosition, pchEntryText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetCurrentQueueEntry", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetCurrentQueueEntry( IntPtr self, int nID );
|
||||
|
||||
#endregion
|
||||
internal bool SetCurrentQueueEntry( int nID )
|
||||
{
|
||||
var returnValue = _SetCurrentQueueEntry( Self, nID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_QueueDidChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _QueueDidChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool QueueDidChange()
|
||||
{
|
||||
var returnValue = _QueueDidChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_PlaylistWillChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _PlaylistWillChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool PlaylistWillChange()
|
||||
{
|
||||
var returnValue = _PlaylistWillChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_ResetPlaylistEntries", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ResetPlaylistEntries( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool ResetPlaylistEntries()
|
||||
{
|
||||
var returnValue = _ResetPlaylistEntries( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetPlaylistEntry", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetPlaylistEntry( IntPtr self, int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText );
|
||||
|
||||
#endregion
|
||||
internal bool SetPlaylistEntry( int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText )
|
||||
{
|
||||
var returnValue = _SetPlaylistEntry( Self, nID, nPosition, pchEntryText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetCurrentPlaylistEntry", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetCurrentPlaylistEntry( IntPtr self, int nID );
|
||||
|
||||
#endregion
|
||||
internal bool SetCurrentPlaylistEntry( int nID )
|
||||
{
|
||||
var returnValue = _SetCurrentPlaylistEntry( Self, nID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_PlaylistDidChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _PlaylistDidChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool PlaylistDidChange()
|
||||
{
|
||||
var returnValue = _PlaylistDidChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
134
Facepunch.Steamworks/Generated/Interfaces/ISteamNetworking.cs
Normal file
134
Facepunch.Steamworks/Generated/Interfaces/ISteamNetworking.cs
Normal file
@@ -0,0 +1,134 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamNetworking : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworking( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworking_v006", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamNetworking_v006();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamNetworking_v006();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerNetworking_v006", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerNetworking_v006();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerNetworking_v006();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_SendP2PPacket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SendP2PPacket( Self, steamIDRemote, pubData, cubData, eP2PSendType, nChannel );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_IsP2PPacketAvailable", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsP2PPacketAvailable( IntPtr self, ref uint pcubMsgSize, int nChannel );
|
||||
|
||||
#endregion
|
||||
internal bool IsP2PPacketAvailable( ref uint pcubMsgSize, int nChannel )
|
||||
{
|
||||
var returnValue = _IsP2PPacketAvailable( Self, ref pcubMsgSize, nChannel );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_ReadP2PPacket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _ReadP2PPacket( Self, pubDest, cubDest, ref pcubMsgSize, ref psteamIDRemote, nChannel );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_AcceptP2PSessionWithUser", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _AcceptP2PSessionWithUser( IntPtr self, SteamId steamIDRemote );
|
||||
|
||||
#endregion
|
||||
internal bool AcceptP2PSessionWithUser( SteamId steamIDRemote )
|
||||
{
|
||||
var returnValue = _AcceptP2PSessionWithUser( Self, steamIDRemote );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CloseP2PSessionWithUser", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CloseP2PSessionWithUser( IntPtr self, SteamId steamIDRemote );
|
||||
|
||||
#endregion
|
||||
internal bool CloseP2PSessionWithUser( SteamId steamIDRemote )
|
||||
{
|
||||
var returnValue = _CloseP2PSessionWithUser( Self, steamIDRemote );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CloseP2PChannelWithUser", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CloseP2PChannelWithUser( IntPtr self, SteamId steamIDRemote, int nChannel );
|
||||
|
||||
#endregion
|
||||
internal bool CloseP2PChannelWithUser( SteamId steamIDRemote, int nChannel )
|
||||
{
|
||||
var returnValue = _CloseP2PChannelWithUser( Self, steamIDRemote, nChannel );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetP2PSessionState", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetP2PSessionState( IntPtr self, SteamId steamIDRemote, ref P2PSessionState_t pConnectionState );
|
||||
|
||||
#endregion
|
||||
internal bool GetP2PSessionState( SteamId steamIDRemote, ref P2PSessionState_t pConnectionState )
|
||||
{
|
||||
var returnValue = _GetP2PSessionState( Self, steamIDRemote, ref pConnectionState );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_AllowP2PPacketRelay", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _AllowP2PPacketRelay( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllow );
|
||||
|
||||
#endregion
|
||||
internal bool AllowP2PPacketRelay( [MarshalAs( UnmanagedType.U1 )] bool bAllow )
|
||||
{
|
||||
var returnValue = _AllowP2PPacketRelay( Self, bAllow );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CreateP2PConnectionSocket", CallingConvention = Platform.CC)]
|
||||
private static extern SNetSocket_t _CreateP2PConnectionSocket( IntPtr self, SteamId steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay );
|
||||
|
||||
#endregion
|
||||
internal SNetSocket_t CreateP2PConnectionSocket( SteamId steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay )
|
||||
{
|
||||
var returnValue = _CreateP2PConnectionSocket( Self, steamIDTarget, nVirtualPort, nTimeoutSec, bAllowUseOfPacketRelay );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamNetworkingConnectionCustomSignaling : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworkingConnectionCustomSignaling( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingConnectionCustomSignaling_SendSignal", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SendSignal( IntPtr self, Connection hConn, ref ConnectionInfo info, IntPtr pMsg, int cbMsg );
|
||||
|
||||
#endregion
|
||||
internal bool SendSignal( Connection hConn, ref ConnectionInfo info, IntPtr pMsg, int cbMsg )
|
||||
{
|
||||
var returnValue = _SendSignal( Self, hConn, ref info, pMsg, cbMsg );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingConnectionCustomSignaling_Release", CallingConvention = Platform.CC)]
|
||||
private static extern void _Release( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void Release()
|
||||
{
|
||||
_Release( Self );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamNetworkingCustomSignalingRecvContext : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworkingCustomSignalingRecvContext( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingCustomSignalingRecvContext_OnConnectRequest", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _OnConnectRequest( IntPtr self, Connection hConn, ref NetIdentity identityPeer );
|
||||
|
||||
#endregion
|
||||
internal IntPtr OnConnectRequest( Connection hConn, ref NetIdentity identityPeer )
|
||||
{
|
||||
var returnValue = _OnConnectRequest( Self, hConn, ref identityPeer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingCustomSignalingRecvContext_SendRejectionSignal", CallingConvention = Platform.CC)]
|
||||
private static extern void _SendRejectionSignal( IntPtr self, ref NetIdentity identityPeer, IntPtr pMsg, int cbMsg );
|
||||
|
||||
#endregion
|
||||
internal void SendRejectionSignal( ref NetIdentity identityPeer, IntPtr pMsg, int cbMsg )
|
||||
{
|
||||
_SendRejectionSignal( Self, ref identityPeer, pMsg, cbMsg );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,473 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamNetworkingSockets : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworkingSockets( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingSockets_v008", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamNetworkingSockets_v008();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamNetworkingSockets_v008();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerNetworkingSockets_v008", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerNetworkingSockets_v008();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerNetworkingSockets_v008();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateListenSocketIP", CallingConvention = Platform.CC)]
|
||||
private static extern Socket _CreateListenSocketIP( IntPtr self, ref NetAddress localAddress, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Socket CreateListenSocketIP( ref NetAddress localAddress, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _CreateListenSocketIP( Self, ref localAddress, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectByIPAddress", CallingConvention = Platform.CC)]
|
||||
private static extern Connection _ConnectByIPAddress( IntPtr self, ref NetAddress address, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Connection ConnectByIPAddress( ref NetAddress address, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _ConnectByIPAddress( Self, ref address, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateListenSocketP2P", CallingConvention = Platform.CC)]
|
||||
private static extern Socket _CreateListenSocketP2P( IntPtr self, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Socket CreateListenSocketP2P( int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _CreateListenSocketP2P( Self, nVirtualPort, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectP2P", CallingConvention = Platform.CC)]
|
||||
private static extern Connection _ConnectP2P( IntPtr self, ref NetIdentity identityRemote, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Connection ConnectP2P( ref NetIdentity identityRemote, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _ConnectP2P( Self, ref identityRemote, nVirtualPort, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_AcceptConnection", CallingConvention = Platform.CC)]
|
||||
private static extern Result _AcceptConnection( IntPtr self, Connection hConn );
|
||||
|
||||
#endregion
|
||||
internal Result AcceptConnection( Connection hConn )
|
||||
{
|
||||
var returnValue = _AcceptConnection( Self, hConn );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CloseConnection", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CloseConnection( IntPtr self, Connection hPeer, int nReason, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszDebug, [MarshalAs( UnmanagedType.U1 )] bool bEnableLinger );
|
||||
|
||||
#endregion
|
||||
internal bool CloseConnection( Connection hPeer, int nReason, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszDebug, [MarshalAs( UnmanagedType.U1 )] bool bEnableLinger )
|
||||
{
|
||||
var returnValue = _CloseConnection( Self, hPeer, nReason, pszDebug, bEnableLinger );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CloseListenSocket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CloseListenSocket( IntPtr self, Socket hSocket );
|
||||
|
||||
#endregion
|
||||
internal bool CloseListenSocket( Socket hSocket )
|
||||
{
|
||||
var returnValue = _CloseListenSocket( Self, hSocket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionUserData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConnectionUserData( IntPtr self, Connection hPeer, long nUserData );
|
||||
|
||||
#endregion
|
||||
internal bool SetConnectionUserData( Connection hPeer, long nUserData )
|
||||
{
|
||||
var returnValue = _SetConnectionUserData( Self, hPeer, nUserData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionUserData", CallingConvention = Platform.CC)]
|
||||
private static extern long _GetConnectionUserData( IntPtr self, Connection hPeer );
|
||||
|
||||
#endregion
|
||||
internal long GetConnectionUserData( Connection hPeer )
|
||||
{
|
||||
var returnValue = _GetConnectionUserData( Self, hPeer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionName", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetConnectionName( IntPtr self, Connection hPeer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszName );
|
||||
|
||||
#endregion
|
||||
internal void SetConnectionName( Connection hPeer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszName )
|
||||
{
|
||||
_SetConnectionName( Self, hPeer, pszName );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionName", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetConnectionName( IntPtr self, Connection hPeer, IntPtr pszName, int nMaxLen );
|
||||
|
||||
#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
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SendMessageToConnection", CallingConvention = Platform.CC)]
|
||||
private static extern Result _SendMessageToConnection( IntPtr self, Connection hConn, IntPtr pData, uint cbData, int nSendFlags, ref long pOutMessageNumber );
|
||||
|
||||
#endregion
|
||||
internal Result SendMessageToConnection( Connection hConn, IntPtr pData, uint cbData, int nSendFlags, ref long pOutMessageNumber )
|
||||
{
|
||||
var returnValue = _SendMessageToConnection( Self, hConn, pData, cbData, nSendFlags, ref pOutMessageNumber );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SendMessages", CallingConvention = Platform.CC)]
|
||||
private static extern void _SendMessages( IntPtr self, int nMessages, ref NetMsg pMessages, [In,Out] long[] pOutMessageNumberOrResult );
|
||||
|
||||
#endregion
|
||||
internal void SendMessages( int nMessages, ref NetMsg pMessages, [In,Out] long[] pOutMessageNumberOrResult )
|
||||
{
|
||||
_SendMessages( Self, nMessages, ref pMessages, pOutMessageNumberOrResult );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_FlushMessagesOnConnection", CallingConvention = Platform.CC)]
|
||||
private static extern Result _FlushMessagesOnConnection( IntPtr self, Connection hConn );
|
||||
|
||||
#endregion
|
||||
internal Result FlushMessagesOnConnection( Connection hConn )
|
||||
{
|
||||
var returnValue = _FlushMessagesOnConnection( Self, hConn );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceiveMessagesOnConnection", CallingConvention = Platform.CC)]
|
||||
private static extern int _ReceiveMessagesOnConnection( IntPtr self, Connection hConn, IntPtr ppOutMessages, int nMaxMessages );
|
||||
|
||||
#endregion
|
||||
internal int ReceiveMessagesOnConnection( Connection hConn, IntPtr ppOutMessages, int nMaxMessages )
|
||||
{
|
||||
var returnValue = _ReceiveMessagesOnConnection( Self, hConn, ppOutMessages, nMaxMessages );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionInfo", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetConnectionInfo( IntPtr self, Connection hConn, ref ConnectionInfo pInfo );
|
||||
|
||||
#endregion
|
||||
internal bool GetConnectionInfo( Connection hConn, ref ConnectionInfo pInfo )
|
||||
{
|
||||
var returnValue = _GetConnectionInfo( Self, hConn, ref pInfo );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetQuickConnectionStatus", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetQuickConnectionStatus( IntPtr self, Connection hConn, ref SteamNetworkingQuickConnectionStatus pStats );
|
||||
|
||||
#endregion
|
||||
internal bool GetQuickConnectionStatus( Connection hConn, ref SteamNetworkingQuickConnectionStatus pStats )
|
||||
{
|
||||
var returnValue = _GetQuickConnectionStatus( Self, hConn, ref pStats );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetDetailedConnectionStatus", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetDetailedConnectionStatus( IntPtr self, Connection hConn, IntPtr pszBuf, int cbBuf );
|
||||
|
||||
#endregion
|
||||
internal int GetDetailedConnectionStatus( Connection hConn, out string pszBuf )
|
||||
{
|
||||
IntPtr mempszBuf = Helpers.TakeMemory();
|
||||
var returnValue = _GetDetailedConnectionStatus( Self, hConn, mempszBuf, (1024 * 32) );
|
||||
pszBuf = Helpers.MemoryToString( mempszBuf );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetListenSocketAddress", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetListenSocketAddress( IntPtr self, Socket hSocket, ref NetAddress address );
|
||||
|
||||
#endregion
|
||||
internal bool GetListenSocketAddress( Socket hSocket, ref NetAddress address )
|
||||
{
|
||||
var returnValue = _GetListenSocketAddress( Self, hSocket, ref address );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateSocketPair", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CreateSocketPair( IntPtr self, [In,Out] Connection[] pOutConnection1, [In,Out] Connection[] pOutConnection2, [MarshalAs( UnmanagedType.U1 )] bool bUseNetworkLoopback, ref NetIdentity pIdentity1, ref NetIdentity pIdentity2 );
|
||||
|
||||
#endregion
|
||||
internal bool CreateSocketPair( [In,Out] Connection[] pOutConnection1, [In,Out] Connection[] pOutConnection2, [MarshalAs( UnmanagedType.U1 )] bool bUseNetworkLoopback, ref NetIdentity pIdentity1, ref NetIdentity pIdentity2 )
|
||||
{
|
||||
var returnValue = _CreateSocketPair( Self, pOutConnection1, pOutConnection2, bUseNetworkLoopback, ref pIdentity1, ref pIdentity2 );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetIdentity", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetIdentity( IntPtr self, ref NetIdentity pIdentity );
|
||||
|
||||
#endregion
|
||||
internal bool GetIdentity( ref NetIdentity pIdentity )
|
||||
{
|
||||
var returnValue = _GetIdentity( Self, ref pIdentity );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_InitAuthentication", CallingConvention = Platform.CC)]
|
||||
private static extern SteamNetworkingAvailability _InitAuthentication( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamNetworkingAvailability InitAuthentication()
|
||||
{
|
||||
var returnValue = _InitAuthentication( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetAuthenticationStatus", CallingConvention = Platform.CC)]
|
||||
private static extern SteamNetworkingAvailability _GetAuthenticationStatus( IntPtr self, ref SteamNetAuthenticationStatus_t pDetails );
|
||||
|
||||
#endregion
|
||||
internal SteamNetworkingAvailability GetAuthenticationStatus( ref SteamNetAuthenticationStatus_t pDetails )
|
||||
{
|
||||
var returnValue = _GetAuthenticationStatus( Self, ref pDetails );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreatePollGroup", CallingConvention = Platform.CC)]
|
||||
private static extern HSteamNetPollGroup _CreatePollGroup( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal HSteamNetPollGroup CreatePollGroup()
|
||||
{
|
||||
var returnValue = _CreatePollGroup( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_DestroyPollGroup", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _DestroyPollGroup( IntPtr self, HSteamNetPollGroup hPollGroup );
|
||||
|
||||
#endregion
|
||||
internal bool DestroyPollGroup( HSteamNetPollGroup hPollGroup )
|
||||
{
|
||||
var returnValue = _DestroyPollGroup( Self, hPollGroup );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionPollGroup", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConnectionPollGroup( IntPtr self, Connection hConn, HSteamNetPollGroup hPollGroup );
|
||||
|
||||
#endregion
|
||||
internal bool SetConnectionPollGroup( Connection hConn, HSteamNetPollGroup hPollGroup )
|
||||
{
|
||||
var returnValue = _SetConnectionPollGroup( Self, hConn, hPollGroup );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceiveMessagesOnPollGroup", CallingConvention = Platform.CC)]
|
||||
private static extern int _ReceiveMessagesOnPollGroup( IntPtr self, HSteamNetPollGroup hPollGroup, IntPtr ppOutMessages, int nMaxMessages );
|
||||
|
||||
#endregion
|
||||
internal int ReceiveMessagesOnPollGroup( HSteamNetPollGroup hPollGroup, IntPtr ppOutMessages, int nMaxMessages )
|
||||
{
|
||||
var returnValue = _ReceiveMessagesOnPollGroup( Self, hPollGroup, ppOutMessages, nMaxMessages );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceivedRelayAuthTicket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ReceivedRelayAuthTicket( IntPtr self, IntPtr pvTicket, int cbTicket, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket );
|
||||
|
||||
#endregion
|
||||
internal bool ReceivedRelayAuthTicket( IntPtr pvTicket, int cbTicket, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket )
|
||||
{
|
||||
var returnValue = _ReceivedRelayAuthTicket( Self, pvTicket, cbTicket, pOutParsedTicket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_FindRelayAuthTicketForServer", CallingConvention = Platform.CC)]
|
||||
private static extern int _FindRelayAuthTicketForServer( IntPtr self, ref NetIdentity identityGameServer, int nVirtualPort, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket );
|
||||
|
||||
#endregion
|
||||
internal int FindRelayAuthTicketForServer( ref NetIdentity identityGameServer, int nVirtualPort, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket )
|
||||
{
|
||||
var returnValue = _FindRelayAuthTicketForServer( Self, ref identityGameServer, nVirtualPort, pOutParsedTicket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectToHostedDedicatedServer", CallingConvention = Platform.CC)]
|
||||
private static extern Connection _ConnectToHostedDedicatedServer( IntPtr self, ref NetIdentity identityTarget, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Connection ConnectToHostedDedicatedServer( ref NetIdentity identityTarget, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _ConnectToHostedDedicatedServer( Self, ref identityTarget, nVirtualPort, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerPort", CallingConvention = Platform.CC)]
|
||||
private static extern ushort _GetHostedDedicatedServerPort( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal ushort GetHostedDedicatedServerPort()
|
||||
{
|
||||
var returnValue = _GetHostedDedicatedServerPort( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerPOPID", CallingConvention = Platform.CC)]
|
||||
private static extern SteamNetworkingPOPID _GetHostedDedicatedServerPOPID( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamNetworkingPOPID GetHostedDedicatedServerPOPID()
|
||||
{
|
||||
var returnValue = _GetHostedDedicatedServerPOPID( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerAddress", CallingConvention = Platform.CC)]
|
||||
private static extern Result _GetHostedDedicatedServerAddress( IntPtr self, ref SteamDatagramHostedAddress pRouting );
|
||||
|
||||
#endregion
|
||||
internal Result GetHostedDedicatedServerAddress( ref SteamDatagramHostedAddress pRouting )
|
||||
{
|
||||
var returnValue = _GetHostedDedicatedServerAddress( Self, ref pRouting );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateHostedDedicatedServerListenSocket", CallingConvention = Platform.CC)]
|
||||
private static extern Socket _CreateHostedDedicatedServerListenSocket( IntPtr self, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Socket CreateHostedDedicatedServerListenSocket( int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _CreateHostedDedicatedServerListenSocket( Self, nVirtualPort, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetGameCoordinatorServerLogin", CallingConvention = Platform.CC)]
|
||||
private static extern Result _GetGameCoordinatorServerLogin( IntPtr self, ref SteamDatagramGameCoordinatorServerLogin pLoginInfo, ref int pcbSignedBlob, IntPtr pBlob );
|
||||
|
||||
#endregion
|
||||
internal Result GetGameCoordinatorServerLogin( ref SteamDatagramGameCoordinatorServerLogin pLoginInfo, ref int pcbSignedBlob, IntPtr pBlob )
|
||||
{
|
||||
var returnValue = _GetGameCoordinatorServerLogin( Self, ref pLoginInfo, ref pcbSignedBlob, pBlob );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSignaling", CallingConvention = Platform.CC)]
|
||||
private static extern Connection _ConnectP2PCustomSignaling( IntPtr self, IntPtr pSignaling, ref NetIdentity pPeerIdentity, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Connection ConnectP2PCustomSignaling( IntPtr pSignaling, ref NetIdentity pPeerIdentity, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _ConnectP2PCustomSignaling( Self, pSignaling, ref pPeerIdentity, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ReceivedP2PCustomSignal( IntPtr self, IntPtr pMsg, int cbMsg, IntPtr pContext );
|
||||
|
||||
#endregion
|
||||
internal bool ReceivedP2PCustomSignal( IntPtr pMsg, int cbMsg, IntPtr pContext )
|
||||
{
|
||||
var returnValue = _ReceivedP2PCustomSignal( Self, pMsg, cbMsg, pContext );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetCertificateRequest", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetCertificateRequest( IntPtr self, ref int pcbBlob, IntPtr pBlob, ref NetErrorMessage errMsg );
|
||||
|
||||
#endregion
|
||||
internal bool GetCertificateRequest( ref int pcbBlob, IntPtr pBlob, ref NetErrorMessage errMsg )
|
||||
{
|
||||
var returnValue = _GetCertificateRequest( Self, ref pcbBlob, pBlob, ref errMsg );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetCertificate", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetCertificate( IntPtr self, IntPtr pCertificate, int cbCertificate, ref NetErrorMessage errMsg );
|
||||
|
||||
#endregion
|
||||
internal bool SetCertificate( IntPtr pCertificate, int cbCertificate, ref NetErrorMessage errMsg )
|
||||
{
|
||||
var returnValue = _SetCertificate( Self, pCertificate, cbCertificate, ref errMsg );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,368 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamNetworkingUtils : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworkingUtils( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingUtils_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamNetworkingUtils_v003();
|
||||
public override IntPtr GetGlobalInterfacePointer() => SteamAPI_SteamNetworkingUtils_v003();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_AllocateMessage", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _AllocateMessage( IntPtr self, int cbAllocateBuffer );
|
||||
|
||||
#endregion
|
||||
internal NetMsg AllocateMessage( int cbAllocateBuffer )
|
||||
{
|
||||
var returnValue = _AllocateMessage( Self, cbAllocateBuffer );
|
||||
return returnValue.ToType<NetMsg>();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_InitRelayNetworkAccess", CallingConvention = Platform.CC)]
|
||||
private static extern void _InitRelayNetworkAccess( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void InitRelayNetworkAccess()
|
||||
{
|
||||
_InitRelayNetworkAccess( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetRelayNetworkStatus", CallingConvention = Platform.CC)]
|
||||
private static extern SteamNetworkingAvailability _GetRelayNetworkStatus( IntPtr self, ref SteamRelayNetworkStatus_t pDetails );
|
||||
|
||||
#endregion
|
||||
internal SteamNetworkingAvailability GetRelayNetworkStatus( ref SteamRelayNetworkStatus_t pDetails )
|
||||
{
|
||||
var returnValue = _GetRelayNetworkStatus( Self, ref pDetails );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetLocalPingLocation", CallingConvention = Platform.CC)]
|
||||
private static extern float _GetLocalPingLocation( IntPtr self, ref NetPingLocation result );
|
||||
|
||||
#endregion
|
||||
internal float GetLocalPingLocation( ref NetPingLocation result )
|
||||
{
|
||||
var returnValue = _GetLocalPingLocation( Self, ref result );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_EstimatePingTimeBetweenTwoLocations", CallingConvention = Platform.CC)]
|
||||
private static extern int _EstimatePingTimeBetweenTwoLocations( IntPtr self, ref NetPingLocation location1, ref NetPingLocation location2 );
|
||||
|
||||
#endregion
|
||||
internal int EstimatePingTimeBetweenTwoLocations( ref NetPingLocation location1, ref NetPingLocation location2 )
|
||||
{
|
||||
var returnValue = _EstimatePingTimeBetweenTwoLocations( Self, ref location1, ref location2 );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_EstimatePingTimeFromLocalHost", CallingConvention = Platform.CC)]
|
||||
private static extern int _EstimatePingTimeFromLocalHost( IntPtr self, ref NetPingLocation remoteLocation );
|
||||
|
||||
#endregion
|
||||
internal int EstimatePingTimeFromLocalHost( ref NetPingLocation remoteLocation )
|
||||
{
|
||||
var returnValue = _EstimatePingTimeFromLocalHost( Self, ref remoteLocation );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_ConvertPingLocationToString", CallingConvention = Platform.CC)]
|
||||
private static extern void _ConvertPingLocationToString( IntPtr self, ref NetPingLocation location, IntPtr pszBuf, int cchBufSize );
|
||||
|
||||
#endregion
|
||||
internal void ConvertPingLocationToString( ref NetPingLocation location, out string pszBuf )
|
||||
{
|
||||
IntPtr mempszBuf = Helpers.TakeMemory();
|
||||
_ConvertPingLocationToString( Self, ref location, mempszBuf, (1024 * 32) );
|
||||
pszBuf = Helpers.MemoryToString( mempszBuf );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_ParsePingLocationString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ParsePingLocationString( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString, ref NetPingLocation result );
|
||||
|
||||
#endregion
|
||||
internal bool ParsePingLocationString( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString, ref NetPingLocation result )
|
||||
{
|
||||
var returnValue = _ParsePingLocationString( Self, pszString, ref result );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_CheckPingDataUpToDate", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CheckPingDataUpToDate( IntPtr self, float flMaxAgeSeconds );
|
||||
|
||||
#endregion
|
||||
internal bool CheckPingDataUpToDate( float flMaxAgeSeconds )
|
||||
{
|
||||
var returnValue = _CheckPingDataUpToDate( Self, flMaxAgeSeconds );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPingToDataCenter", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetPingToDataCenter( IntPtr self, SteamNetworkingPOPID popID, ref SteamNetworkingPOPID pViaRelayPoP );
|
||||
|
||||
#endregion
|
||||
internal int GetPingToDataCenter( SteamNetworkingPOPID popID, ref SteamNetworkingPOPID pViaRelayPoP )
|
||||
{
|
||||
var returnValue = _GetPingToDataCenter( Self, popID, ref pViaRelayPoP );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetDirectPingToPOP", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetDirectPingToPOP( IntPtr self, SteamNetworkingPOPID popID );
|
||||
|
||||
#endregion
|
||||
internal int GetDirectPingToPOP( SteamNetworkingPOPID popID )
|
||||
{
|
||||
var returnValue = _GetDirectPingToPOP( Self, popID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPOPCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetPOPCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetPOPCount()
|
||||
{
|
||||
var returnValue = _GetPOPCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPOPList", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetPOPList( IntPtr self, ref SteamNetworkingPOPID list, int nListSz );
|
||||
|
||||
#endregion
|
||||
internal int GetPOPList( ref SteamNetworkingPOPID list, int nListSz )
|
||||
{
|
||||
var returnValue = _GetPOPList( Self, ref list, nListSz );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetLocalTimestamp", CallingConvention = Platform.CC)]
|
||||
private static extern long _GetLocalTimestamp( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal long GetLocalTimestamp()
|
||||
{
|
||||
var returnValue = _GetLocalTimestamp( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetDebugOutputFunction", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetDebugOutputFunction( IntPtr self, NetDebugOutput eDetailLevel, NetDebugFunc pfnFunc );
|
||||
|
||||
#endregion
|
||||
internal void SetDebugOutputFunction( NetDebugOutput eDetailLevel, NetDebugFunc pfnFunc )
|
||||
{
|
||||
_SetDebugOutputFunction( Self, eDetailLevel, pfnFunc );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetGlobalConfigValueInt32( IntPtr self, NetConfig eValue, int val );
|
||||
|
||||
#endregion
|
||||
internal bool SetGlobalConfigValueInt32( NetConfig eValue, int val )
|
||||
{
|
||||
var returnValue = _SetGlobalConfigValueInt32( Self, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetGlobalConfigValueFloat( IntPtr self, NetConfig eValue, float val );
|
||||
|
||||
#endregion
|
||||
internal bool SetGlobalConfigValueFloat( NetConfig eValue, float val )
|
||||
{
|
||||
var returnValue = _SetGlobalConfigValueFloat( Self, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetGlobalConfigValueString( IntPtr self, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val );
|
||||
|
||||
#endregion
|
||||
internal bool SetGlobalConfigValueString( NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val )
|
||||
{
|
||||
var returnValue = _SetGlobalConfigValueString( Self, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConnectionConfigValueInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConnectionConfigValueInt32( IntPtr self, Connection hConn, NetConfig eValue, int val );
|
||||
|
||||
#endregion
|
||||
internal bool SetConnectionConfigValueInt32( Connection hConn, NetConfig eValue, int val )
|
||||
{
|
||||
var returnValue = _SetConnectionConfigValueInt32( Self, hConn, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConnectionConfigValueFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConnectionConfigValueFloat( IntPtr self, Connection hConn, NetConfig eValue, float val );
|
||||
|
||||
#endregion
|
||||
internal bool SetConnectionConfigValueFloat( Connection hConn, NetConfig eValue, float val )
|
||||
{
|
||||
var returnValue = _SetConnectionConfigValueFloat( Self, hConn, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConnectionConfigValueString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConnectionConfigValueString( IntPtr self, Connection hConn, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val );
|
||||
|
||||
#endregion
|
||||
internal bool SetConnectionConfigValueString( Connection hConn, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val )
|
||||
{
|
||||
var returnValue = _SetConnectionConfigValueString( Self, hConn, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConfigValue", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConfigValue( IntPtr self, NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, NetConfigType eDataType, IntPtr pArg );
|
||||
|
||||
#endregion
|
||||
internal bool SetConfigValue( NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, NetConfigType eDataType, IntPtr pArg )
|
||||
{
|
||||
var returnValue = _SetConfigValue( Self, eValue, eScopeType, scopeObj, eDataType, pArg );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConfigValueStruct", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConfigValueStruct( IntPtr self, ref NetKeyValue opt, NetConfigScope eScopeType, IntPtr scopeObj );
|
||||
|
||||
#endregion
|
||||
internal bool SetConfigValueStruct( ref NetKeyValue opt, NetConfigScope eScopeType, IntPtr scopeObj )
|
||||
{
|
||||
var returnValue = _SetConfigValueStruct( Self, ref opt, eScopeType, scopeObj );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetConfigValue", CallingConvention = Platform.CC)]
|
||||
private static extern NetConfigResult _GetConfigValue( IntPtr self, NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref UIntPtr cbResult );
|
||||
|
||||
#endregion
|
||||
internal NetConfigResult GetConfigValue( NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref UIntPtr cbResult )
|
||||
{
|
||||
var returnValue = _GetConfigValue( Self, eValue, eScopeType, scopeObj, ref pOutDataType, pResult, ref cbResult );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetConfigValueInfo( IntPtr self, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pOutName, ref NetConfigType pOutDataType, [In,Out] NetConfigScope[] pOutScope, [In,Out] NetConfig[] pOutNextValue );
|
||||
|
||||
#endregion
|
||||
internal bool GetConfigValueInfo( NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pOutName, ref NetConfigType pOutDataType, [In,Out] NetConfigScope[] pOutScope, [In,Out] NetConfig[] pOutNextValue )
|
||||
{
|
||||
var returnValue = _GetConfigValueInfo( Self, eValue, pOutName, ref pOutDataType, pOutScope, pOutNextValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetFirstConfigValue", CallingConvention = Platform.CC)]
|
||||
private static extern NetConfig _GetFirstConfigValue( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal NetConfig GetFirstConfigValue()
|
||||
{
|
||||
var returnValue = _GetFirstConfigValue( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString", CallingConvention = Platform.CC)]
|
||||
private static extern void _SteamNetworkingIPAddr_ToString( IntPtr self, ref NetAddress addr, IntPtr buf, uint cbBuf, [MarshalAs( UnmanagedType.U1 )] bool bWithPort );
|
||||
|
||||
#endregion
|
||||
internal void SteamNetworkingIPAddr_ToString( ref NetAddress addr, out string buf, [MarshalAs( UnmanagedType.U1 )] bool bWithPort )
|
||||
{
|
||||
IntPtr membuf = Helpers.TakeMemory();
|
||||
_SteamNetworkingIPAddr_ToString( Self, ref addr, membuf, (1024 * 32), bWithPort );
|
||||
buf = Helpers.MemoryToString( membuf );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SteamNetworkingIPAddr_ParseString( IntPtr self, ref NetAddress pAddr, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr );
|
||||
|
||||
#endregion
|
||||
internal bool SteamNetworkingIPAddr_ParseString( ref NetAddress pAddr, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr )
|
||||
{
|
||||
var returnValue = _SteamNetworkingIPAddr_ParseString( Self, ref pAddr, pszStr );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ToString", CallingConvention = Platform.CC)]
|
||||
private static extern void _SteamNetworkingIdentity_ToString( IntPtr self, ref NetIdentity identity, IntPtr buf, uint cbBuf );
|
||||
|
||||
#endregion
|
||||
internal void SteamNetworkingIdentity_ToString( ref NetIdentity identity, out string buf )
|
||||
{
|
||||
IntPtr membuf = Helpers.TakeMemory();
|
||||
_SteamNetworkingIdentity_ToString( Self, ref identity, membuf, (1024 * 32) );
|
||||
buf = Helpers.MemoryToString( membuf );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SteamNetworkingIdentity_ParseString( IntPtr self, ref NetIdentity pIdentity, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr );
|
||||
|
||||
#endregion
|
||||
internal bool SteamNetworkingIdentity_ParseString( ref NetIdentity pIdentity, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr )
|
||||
{
|
||||
var returnValue = _SteamNetworkingIdentity_ParseString( Self, ref pIdentity, pszStr );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamParentalSettings : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamParentalSettings( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamParentalSettings_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamParentalSettings_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamParentalSettings_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsParentalLockEnabled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsParentalLockEnabled( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsParentalLockEnabled()
|
||||
{
|
||||
var returnValue = _BIsParentalLockEnabled( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsParentalLockLocked", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsParentalLockLocked( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsParentalLockLocked()
|
||||
{
|
||||
var returnValue = _BIsParentalLockLocked( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsAppBlocked", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsAppBlocked( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal bool BIsAppBlocked( AppId nAppID )
|
||||
{
|
||||
var returnValue = _BIsAppBlocked( Self, nAppID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsAppInBlockList", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsAppInBlockList( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal bool BIsAppInBlockList( AppId nAppID )
|
||||
{
|
||||
var returnValue = _BIsAppInBlockList( Self, nAppID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsFeatureBlocked", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsFeatureBlocked( IntPtr self, ParentalFeature eFeature );
|
||||
|
||||
#endregion
|
||||
internal bool BIsFeatureBlocked( ParentalFeature eFeature )
|
||||
{
|
||||
var returnValue = _BIsFeatureBlocked( Self, eFeature );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsFeatureInBlockList( IntPtr self, ParentalFeature eFeature );
|
||||
|
||||
#endregion
|
||||
internal bool BIsFeatureInBlockList( ParentalFeature eFeature )
|
||||
{
|
||||
var returnValue = _BIsFeatureInBlockList( Self, eFeature );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
163
Facepunch.Steamworks/Generated/Interfaces/ISteamParties.cs
Normal file
163
Facepunch.Steamworks/Generated/Interfaces/ISteamParties.cs
Normal file
@@ -0,0 +1,163 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamParties : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamParties( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamParties_v002", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamParties_v002();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamParties_v002();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetNumActiveBeacons", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetNumActiveBeacons( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetNumActiveBeacons()
|
||||
{
|
||||
var returnValue = _GetNumActiveBeacons( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern PartyBeaconID_t _GetBeaconByIndex( IntPtr self, uint unIndex );
|
||||
|
||||
#endregion
|
||||
internal PartyBeaconID_t GetBeaconByIndex( uint unIndex )
|
||||
{
|
||||
var returnValue = _GetBeaconByIndex( Self, unIndex );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconDetails", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
IntPtr mempchMetadata = Helpers.TakeMemory();
|
||||
var returnValue = _GetBeaconDetails( Self, ulBeaconID, ref pSteamIDBeaconOwner, ref pLocation, mempchMetadata, (1024 * 32) );
|
||||
pchMetadata = Helpers.MemoryToString( mempchMetadata );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_JoinParty", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _JoinParty( IntPtr self, PartyBeaconID_t ulBeaconID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<JoinPartyCallback_t> JoinParty( PartyBeaconID_t ulBeaconID )
|
||||
{
|
||||
var returnValue = _JoinParty( Self, ulBeaconID );
|
||||
return new CallResult<JoinPartyCallback_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetNumAvailableBeaconLocations", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetNumAvailableBeaconLocations( IntPtr self, ref uint puNumLocations );
|
||||
|
||||
#endregion
|
||||
internal bool GetNumAvailableBeaconLocations( ref uint puNumLocations )
|
||||
{
|
||||
var returnValue = _GetNumAvailableBeaconLocations( Self, ref puNumLocations );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetAvailableBeaconLocations", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetAvailableBeaconLocations( IntPtr self, ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations );
|
||||
|
||||
#endregion
|
||||
internal bool GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations )
|
||||
{
|
||||
var returnValue = _GetAvailableBeaconLocations( Self, ref pLocationList, uMaxNumLocations );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_CreateBeacon", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _CreateBeacon( IntPtr self, uint unOpenSlots, ref SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetadata );
|
||||
|
||||
#endregion
|
||||
internal CallResult<CreateBeaconCallback_t> CreateBeacon( uint unOpenSlots, /* ref */ SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetadata )
|
||||
{
|
||||
var returnValue = _CreateBeacon( Self, unOpenSlots, ref pBeaconLocation, pchConnectString, pchMetadata );
|
||||
return new CallResult<CreateBeaconCallback_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_OnReservationCompleted", CallingConvention = Platform.CC)]
|
||||
private static extern void _OnReservationCompleted( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal void OnReservationCompleted( PartyBeaconID_t ulBeacon, SteamId steamIDUser )
|
||||
{
|
||||
_OnReservationCompleted( Self, ulBeacon, steamIDUser );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_CancelReservation", CallingConvention = Platform.CC)]
|
||||
private static extern void _CancelReservation( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal void CancelReservation( PartyBeaconID_t ulBeacon, SteamId steamIDUser )
|
||||
{
|
||||
_CancelReservation( Self, ulBeacon, steamIDUser );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_ChangeNumOpenSlots", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _ChangeNumOpenSlots( IntPtr self, PartyBeaconID_t ulBeacon, uint unOpenSlots );
|
||||
|
||||
#endregion
|
||||
internal CallResult<ChangeNumOpenSlotsCallback_t> ChangeNumOpenSlots( PartyBeaconID_t ulBeacon, uint unOpenSlots )
|
||||
{
|
||||
var returnValue = _ChangeNumOpenSlots( Self, ulBeacon, unOpenSlots );
|
||||
return new CallResult<ChangeNumOpenSlotsCallback_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_DestroyBeacon", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _DestroyBeacon( IntPtr self, PartyBeaconID_t ulBeacon );
|
||||
|
||||
#endregion
|
||||
internal bool DestroyBeacon( PartyBeaconID_t ulBeacon )
|
||||
{
|
||||
var returnValue = _DestroyBeacon( Self, ulBeacon );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconLocationData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
IntPtr mempchDataStringOut = Helpers.TakeMemory();
|
||||
var returnValue = _GetBeaconLocationData( Self, BeaconLocation, eData, mempchDataStringOut, (1024 * 32) );
|
||||
pchDataStringOut = Helpers.MemoryToString( mempchDataStringOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
103
Facepunch.Steamworks/Generated/Interfaces/ISteamRemotePlay.cs
Normal file
103
Facepunch.Steamworks/Generated/Interfaces/ISteamRemotePlay.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamRemotePlay : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamRemotePlay( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamRemotePlay_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamRemotePlay_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamRemotePlay_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionCount", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetSessionCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetSessionCount()
|
||||
{
|
||||
var returnValue = _GetSessionCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionID", CallingConvention = Platform.CC)]
|
||||
private static extern RemotePlaySessionID_t _GetSessionID( IntPtr self, int iSessionIndex );
|
||||
|
||||
#endregion
|
||||
internal RemotePlaySessionID_t GetSessionID( int iSessionIndex )
|
||||
{
|
||||
var returnValue = _GetSessionID( Self, iSessionIndex );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionSteamID", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetSessionSteamID( IntPtr self, RemotePlaySessionID_t unSessionID );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetSessionSteamID( RemotePlaySessionID_t unSessionID )
|
||||
{
|
||||
var returnValue = _GetSessionSteamID( Self, unSessionID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionClientName", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetSessionClientName( IntPtr self, RemotePlaySessionID_t unSessionID );
|
||||
|
||||
#endregion
|
||||
internal string GetSessionClientName( RemotePlaySessionID_t unSessionID )
|
||||
{
|
||||
var returnValue = _GetSessionClientName( Self, unSessionID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionClientFormFactor", CallingConvention = Platform.CC)]
|
||||
private static extern SteamDeviceFormFactor _GetSessionClientFormFactor( IntPtr self, RemotePlaySessionID_t unSessionID );
|
||||
|
||||
#endregion
|
||||
internal SteamDeviceFormFactor GetSessionClientFormFactor( RemotePlaySessionID_t unSessionID )
|
||||
{
|
||||
var returnValue = _GetSessionClientFormFactor( Self, unSessionID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_BGetSessionClientResolution", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BGetSessionClientResolution( IntPtr self, RemotePlaySessionID_t unSessionID, ref int pnResolutionX, ref int pnResolutionY );
|
||||
|
||||
#endregion
|
||||
internal bool BGetSessionClientResolution( RemotePlaySessionID_t unSessionID, ref int pnResolutionX, ref int pnResolutionY )
|
||||
{
|
||||
var returnValue = _BGetSessionClientResolution( Self, unSessionID, ref pnResolutionX, ref pnResolutionY );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BSendRemotePlayTogetherInvite( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal bool BSendRemotePlayTogetherInvite( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _BSendRemotePlayTogetherInvite( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
379
Facepunch.Steamworks/Generated/Interfaces/ISteamRemoteStorage.cs
Normal file
379
Facepunch.Steamworks/Generated/Interfaces/ISteamRemoteStorage.cs
Normal file
@@ -0,0 +1,379 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamRemoteStorage : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamRemoteStorage( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamRemoteStorage_v014", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamRemoteStorage_v014();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamRemoteStorage_v014();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWrite", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _FileWrite( Self, pchFile, pvData, cubData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileRead", CallingConvention = Platform.CC)]
|
||||
private static extern int _FileRead( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead );
|
||||
|
||||
#endregion
|
||||
internal int FileRead( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead )
|
||||
{
|
||||
var returnValue = _FileRead( Self, pchFile, pvData, cubDataToRead );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteAsync", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _FileWriteAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData );
|
||||
|
||||
#endregion
|
||||
internal CallResult<RemoteStorageFileWriteAsyncComplete_t> FileWriteAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData )
|
||||
{
|
||||
var returnValue = _FileWriteAsync( Self, pchFile, pvData, cubData );
|
||||
return new CallResult<RemoteStorageFileWriteAsyncComplete_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsync", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _FileReadAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead );
|
||||
|
||||
#endregion
|
||||
internal CallResult<RemoteStorageFileReadAsyncComplete_t> FileReadAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead )
|
||||
{
|
||||
var returnValue = _FileReadAsync( Self, pchFile, nOffset, cubToRead );
|
||||
return new CallResult<RemoteStorageFileReadAsyncComplete_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsyncComplete", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _FileReadAsyncComplete( Self, hReadCall, pvBuffer, cubToRead );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileForget", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _FileForget( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileDelete", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _FileDelete( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileShare", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _FileShare( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal CallResult<RemoteStorageFileShareResult_t> FileShare( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _FileShare( Self, pchFile );
|
||||
return new CallResult<RemoteStorageFileShareResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetSyncPlatforms", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetSyncPlatforms( Self, pchFile, eRemoteStoragePlatform );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamOpen", CallingConvention = Platform.CC)]
|
||||
private static extern UGCFileWriteStreamHandle_t _FileWriteStreamOpen( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal UGCFileWriteStreamHandle_t FileWriteStreamOpen( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _FileWriteStreamOpen( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamWriteChunk", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _FileWriteStreamWriteChunk( Self, writeHandle, pvData, cubData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamClose", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _FileWriteStreamClose( IntPtr self, UGCFileWriteStreamHandle_t writeHandle );
|
||||
|
||||
#endregion
|
||||
internal bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle )
|
||||
{
|
||||
var returnValue = _FileWriteStreamClose( Self, writeHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamCancel", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _FileWriteStreamCancel( IntPtr self, UGCFileWriteStreamHandle_t writeHandle );
|
||||
|
||||
#endregion
|
||||
internal bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle )
|
||||
{
|
||||
var returnValue = _FileWriteStreamCancel( Self, writeHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileExists", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _FileExists( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FilePersisted", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _FilePersisted( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileSize", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFileSize( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal int GetFileSize( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _GetFileSize( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileTimestamp", CallingConvention = Platform.CC)]
|
||||
private static extern long _GetFileTimestamp( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal long GetFileTimestamp( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _GetFileTimestamp( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetSyncPlatforms", CallingConvention = Platform.CC)]
|
||||
private static extern RemoteStoragePlatform _GetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal RemoteStoragePlatform GetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _GetSyncPlatforms( Self, pchFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFileCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetFileCount()
|
||||
{
|
||||
var returnValue = _GetFileCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileNameAndSize", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetFileNameAndSize( IntPtr self, int iFile, ref int pnFileSizeInBytes );
|
||||
|
||||
#endregion
|
||||
internal string GetFileNameAndSize( int iFile, ref int pnFileSizeInBytes )
|
||||
{
|
||||
var returnValue = _GetFileNameAndSize( Self, iFile, ref pnFileSizeInBytes );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetQuota", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetQuota( IntPtr self, ref ulong pnTotalBytes, ref ulong puAvailableBytes );
|
||||
|
||||
#endregion
|
||||
internal bool GetQuota( ref ulong pnTotalBytes, ref ulong puAvailableBytes )
|
||||
{
|
||||
var returnValue = _GetQuota( Self, ref pnTotalBytes, ref puAvailableBytes );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForAccount", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsCloudEnabledForAccount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsCloudEnabledForAccount()
|
||||
{
|
||||
var returnValue = _IsCloudEnabledForAccount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForApp", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsCloudEnabledForApp( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsCloudEnabledForApp()
|
||||
{
|
||||
var returnValue = _IsCloudEnabledForApp( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetCloudEnabledForApp", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetCloudEnabledForApp( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled );
|
||||
|
||||
#endregion
|
||||
internal void SetCloudEnabledForApp( [MarshalAs( UnmanagedType.U1 )] bool bEnabled )
|
||||
{
|
||||
_SetCloudEnabledForApp( Self, bEnabled );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownload", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _UGCDownload( IntPtr self, UGCHandle_t hContent, uint unPriority );
|
||||
|
||||
#endregion
|
||||
internal CallResult<RemoteStorageDownloadUGCResult_t> UGCDownload( UGCHandle_t hContent, uint unPriority )
|
||||
{
|
||||
var returnValue = _UGCDownload( Self, hContent, unPriority );
|
||||
return new CallResult<RemoteStorageDownloadUGCResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDownloadProgress", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetUGCDownloadProgress( Self, hContent, ref pnBytesDownloaded, ref pnBytesExpected );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDetails", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetUGCDetails( Self, hContent, ref pnAppID, ref ppchName, ref pnFileSizeInBytes, ref pSteamIDOwner );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCRead", CallingConvention = Platform.CC)]
|
||||
private static extern int _UGCRead( IntPtr self, UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction );
|
||||
|
||||
#endregion
|
||||
internal int UGCRead( UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction )
|
||||
{
|
||||
var returnValue = _UGCRead( Self, hContent, pvData, cubDataToRead, cOffset, eAction );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetCachedUGCCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetCachedUGCCount()
|
||||
{
|
||||
var returnValue = _GetCachedUGCCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCHandle", CallingConvention = Platform.CC)]
|
||||
private static extern UGCHandle_t _GetCachedUGCHandle( IntPtr self, int iCachedContent );
|
||||
|
||||
#endregion
|
||||
internal UGCHandle_t GetCachedUGCHandle( int iCachedContent )
|
||||
{
|
||||
var returnValue = _GetCachedUGCHandle( Self, iCachedContent );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _UGCDownloadToLocation( IntPtr self, UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority );
|
||||
|
||||
#endregion
|
||||
internal CallResult<RemoteStorageDownloadUGCResult_t> UGCDownloadToLocation( UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority )
|
||||
{
|
||||
var returnValue = _UGCDownloadToLocation( Self, hContent, pchLocation, unPriority );
|
||||
return new CallResult<RemoteStorageDownloadUGCResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
125
Facepunch.Steamworks/Generated/Interfaces/ISteamScreenshots.cs
Normal file
125
Facepunch.Steamworks/Generated/Interfaces/ISteamScreenshots.cs
Normal file
@@ -0,0 +1,125 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamScreenshots : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamScreenshots( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamScreenshots_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamScreenshots_v003();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamScreenshots_v003();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_WriteScreenshot", CallingConvention = Platform.CC)]
|
||||
private static extern ScreenshotHandle _WriteScreenshot( IntPtr self, IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight );
|
||||
|
||||
#endregion
|
||||
internal ScreenshotHandle WriteScreenshot( IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight )
|
||||
{
|
||||
var returnValue = _WriteScreenshot( Self, pubRGB, cubRGB, nWidth, nHeight );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_AddScreenshotToLibrary", CallingConvention = Platform.CC)]
|
||||
private static extern ScreenshotHandle _AddScreenshotToLibrary( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight );
|
||||
|
||||
#endregion
|
||||
internal ScreenshotHandle AddScreenshotToLibrary( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight )
|
||||
{
|
||||
var returnValue = _AddScreenshotToLibrary( Self, pchFilename, pchThumbnailFilename, nWidth, nHeight );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TriggerScreenshot", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerScreenshot( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void TriggerScreenshot()
|
||||
{
|
||||
_TriggerScreenshot( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_HookScreenshots", CallingConvention = Platform.CC)]
|
||||
private static extern void _HookScreenshots( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bHook );
|
||||
|
||||
#endregion
|
||||
internal void HookScreenshots( [MarshalAs( UnmanagedType.U1 )] bool bHook )
|
||||
{
|
||||
_HookScreenshots( Self, bHook );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_SetLocation", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetLocation( Self, hScreenshot, pchLocation );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TagUser", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _TagUser( IntPtr self, ScreenshotHandle hScreenshot, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal bool TagUser( ScreenshotHandle hScreenshot, SteamId steamID )
|
||||
{
|
||||
var returnValue = _TagUser( Self, hScreenshot, steamID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TagPublishedFile", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _TagPublishedFile( IntPtr self, ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID )
|
||||
{
|
||||
var returnValue = _TagPublishedFile( Self, hScreenshot, unPublishedFileID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_IsScreenshotsHooked", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsScreenshotsHooked( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsScreenshotsHooked()
|
||||
{
|
||||
var returnValue = _IsScreenshotsHooked( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_AddVRScreenshotToLibrary", CallingConvention = Platform.CC)]
|
||||
private static extern ScreenshotHandle _AddVRScreenshotToLibrary( IntPtr self, VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename );
|
||||
|
||||
#endregion
|
||||
internal ScreenshotHandle AddVRScreenshotToLibrary( VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename )
|
||||
{
|
||||
var returnValue = _AddVRScreenshotToLibrary( Self, eType, pchFilename, pchVRFilename );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
97
Facepunch.Steamworks/Generated/Interfaces/ISteamTV.cs
Normal file
97
Facepunch.Steamworks/Generated/Interfaces/ISteamTV.cs
Normal file
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamTV : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamTV( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamTV_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamTV_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamTV_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_IsBroadcasting", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsBroadcasting( IntPtr self, ref int pnNumViewers );
|
||||
|
||||
#endregion
|
||||
internal bool IsBroadcasting( ref int pnNumViewers )
|
||||
{
|
||||
var returnValue = _IsBroadcasting( Self, ref pnNumViewers );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_AddBroadcastGameData", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddBroadcastGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
|
||||
#endregion
|
||||
internal void AddBroadcastGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
{
|
||||
_AddBroadcastGameData( Self, pchKey, pchValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_RemoveBroadcastGameData", CallingConvention = Platform.CC)]
|
||||
private static extern void _RemoveBroadcastGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal void RemoveBroadcastGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
_RemoveBroadcastGameData( Self, pchKey );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_AddTimelineMarker", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddTimelineMarker( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTemplateName, [MarshalAs( UnmanagedType.U1 )] bool bPersistent, byte nColorR, byte nColorG, byte nColorB );
|
||||
|
||||
#endregion
|
||||
internal void AddTimelineMarker( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTemplateName, [MarshalAs( UnmanagedType.U1 )] bool bPersistent, byte nColorR, byte nColorG, byte nColorB )
|
||||
{
|
||||
_AddTimelineMarker( Self, pchTemplateName, bPersistent, nColorR, nColorG, nColorB );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_RemoveTimelineMarker", CallingConvention = Platform.CC)]
|
||||
private static extern void _RemoveTimelineMarker( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RemoveTimelineMarker()
|
||||
{
|
||||
_RemoveTimelineMarker( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_AddRegion", CallingConvention = Platform.CC)]
|
||||
private static extern uint _AddRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchElementName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTimelineDataSection, ref SteamTVRegion_t pSteamTVRegion, SteamTVRegionBehavior eSteamTVRegionBehavior );
|
||||
|
||||
#endregion
|
||||
internal uint AddRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchElementName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTimelineDataSection, ref SteamTVRegion_t pSteamTVRegion, SteamTVRegionBehavior eSteamTVRegionBehavior )
|
||||
{
|
||||
var returnValue = _AddRegion( Self, pchElementName, pchTimelineDataSection, ref pSteamTVRegion, eSteamTVRegionBehavior );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_RemoveRegion", CallingConvention = Platform.CC)]
|
||||
private static extern void _RemoveRegion( IntPtr self, uint unRegionHandle );
|
||||
|
||||
#endregion
|
||||
internal void RemoveRegion( uint unRegionHandle )
|
||||
{
|
||||
_RemoveRegion( Self, unRegionHandle );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
948
Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs
Normal file
948
Facepunch.Steamworks/Generated/Interfaces/ISteamUGC.cs
Normal file
@@ -0,0 +1,948 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamUGC : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamUGC( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUGC_v014", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamUGC_v014();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUGC_v014();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerUGC_v014", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerUGC_v014();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerUGC_v014();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUserUGCRequest", CallingConvention = Platform.CC)]
|
||||
private static extern UGCQueryHandle_t _CreateQueryUserUGCRequest( IntPtr self, AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage );
|
||||
|
||||
#endregion
|
||||
internal UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID, UserUGCList eListType, UgcType eMatchingUGCType, UserUGCListSortOrder eSortOrder, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage )
|
||||
{
|
||||
var returnValue = _CreateQueryUserUGCRequest( Self, unAccountID, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID, nConsumerAppID, unPage );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequestPage", CallingConvention = Platform.CC)]
|
||||
private static extern UGCQueryHandle_t _CreateQueryAllUGCRequest( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage );
|
||||
|
||||
#endregion
|
||||
internal UGCQueryHandle_t CreateQueryAllUGCRequest( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, uint unPage )
|
||||
{
|
||||
var returnValue = _CreateQueryAllUGCRequest( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, unPage );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryAllUGCRequestCursor", CallingConvention = Platform.CC)]
|
||||
private static extern UGCQueryHandle_t _CreateQueryAllUGCRequest( IntPtr self, UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor );
|
||||
|
||||
#endregion
|
||||
internal UGCQueryHandle_t CreateQueryAllUGCRequest( UGCQuery eQueryType, UgcType eMatchingeMatchingUGCTypeFileType, AppId nCreatorAppID, AppId nConsumerAppID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCursor )
|
||||
{
|
||||
var returnValue = _CreateQueryAllUGCRequest( Self, eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID, nConsumerAppID, pchCursor );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateQueryUGCDetailsRequest", CallingConvention = Platform.CC)]
|
||||
private static extern UGCQueryHandle_t _CreateQueryUGCDetailsRequest( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
|
||||
|
||||
#endregion
|
||||
internal UGCQueryHandle_t CreateQueryUGCDetailsRequest( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs )
|
||||
{
|
||||
var returnValue = _CreateQueryUGCDetailsRequest( Self, pvecPublishedFileID, unNumPublishedFileIDs );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SendQueryUGCRequest", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _SendQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle );
|
||||
|
||||
#endregion
|
||||
internal CallResult<SteamUGCQueryCompleted_t> SendQueryUGCRequest( UGCQueryHandle_t handle )
|
||||
{
|
||||
var returnValue = _SendQueryUGCRequest( Self, handle );
|
||||
return new CallResult<SteamUGCQueryCompleted_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCResult", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetQueryUGCResult( Self, handle, index, ref pDetails );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCPreviewURL", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
IntPtr mempchURL = Helpers.TakeMemory();
|
||||
var returnValue = _GetQueryUGCPreviewURL( Self, handle, index, mempchURL, (1024 * 32) );
|
||||
pchURL = Helpers.MemoryToString( mempchURL );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCMetadata", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
IntPtr mempchMetadata = Helpers.TakeMemory();
|
||||
var returnValue = _GetQueryUGCMetadata( Self, handle, index, mempchMetadata, (1024 * 32) );
|
||||
pchMetadata = Helpers.MemoryToString( mempchMetadata );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCChildren", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetQueryUGCChildren( Self, handle, index, pvecPublishedFileID, cMaxEntries );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCStatistic", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetQueryUGCStatistic( Self, handle, index, eStatType, ref pStatValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumAdditionalPreviews", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetQueryUGCNumAdditionalPreviews( IntPtr self, UGCQueryHandle_t handle, uint index );
|
||||
|
||||
#endregion
|
||||
internal uint GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle, uint index )
|
||||
{
|
||||
var returnValue = _GetQueryUGCNumAdditionalPreviews( Self, handle, index );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCAdditionalPreview", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
IntPtr mempchURLOrVideoID = Helpers.TakeMemory();
|
||||
IntPtr mempchOriginalFileName = Helpers.TakeMemory();
|
||||
var returnValue = _GetQueryUGCAdditionalPreview( Self, handle, index, previewIndex, mempchURLOrVideoID, (1024 * 32), mempchOriginalFileName, (1024 * 32), ref pPreviewType );
|
||||
pchURLOrVideoID = Helpers.MemoryToString( mempchURLOrVideoID );
|
||||
pchOriginalFileName = Helpers.MemoryToString( mempchOriginalFileName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCNumKeyValueTags", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetQueryUGCNumKeyValueTags( IntPtr self, UGCQueryHandle_t handle, uint index );
|
||||
|
||||
#endregion
|
||||
internal uint GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle, uint index )
|
||||
{
|
||||
var returnValue = _GetQueryUGCNumKeyValueTags( Self, handle, index );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryUGCKeyValueTag", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
IntPtr mempchKey = Helpers.TakeMemory();
|
||||
IntPtr mempchValue = Helpers.TakeMemory();
|
||||
var returnValue = _GetQueryUGCKeyValueTag( Self, handle, index, keyValueTagIndex, mempchKey, (1024 * 32), mempchValue, (1024 * 32) );
|
||||
pchKey = Helpers.MemoryToString( mempchKey );
|
||||
pchValue = Helpers.MemoryToString( mempchValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetQueryFirstUGCKeyValueTag", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetQueryUGCKeyValueTag( IntPtr self, UGCQueryHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, IntPtr pchValue, uint cchValueSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle, uint index, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, out string pchValue )
|
||||
{
|
||||
IntPtr mempchValue = Helpers.TakeMemory();
|
||||
var returnValue = _GetQueryUGCKeyValueTag( Self, handle, index, pchKey, mempchValue, (1024 * 32) );
|
||||
pchValue = Helpers.MemoryToString( mempchValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_ReleaseQueryUGCRequest", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ReleaseQueryUGCRequest( IntPtr self, UGCQueryHandle_t handle );
|
||||
|
||||
#endregion
|
||||
internal bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle )
|
||||
{
|
||||
var returnValue = _ReleaseQueryUGCRequest( Self, handle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredTag", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _AddRequiredTag( Self, handle, pTagName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredTagGroup", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _AddRequiredTagGroup( IntPtr self, UGCQueryHandle_t handle, ref SteamParamStringArray_t pTagGroups );
|
||||
|
||||
#endregion
|
||||
internal bool AddRequiredTagGroup( UGCQueryHandle_t handle, ref SteamParamStringArray_t pTagGroups )
|
||||
{
|
||||
var returnValue = _AddRequiredTagGroup( Self, handle, ref pTagGroups );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddExcludedTag", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _AddExcludedTag( IntPtr self, UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName );
|
||||
|
||||
#endregion
|
||||
internal bool AddExcludedTag( UGCQueryHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pTagName )
|
||||
{
|
||||
var returnValue = _AddExcludedTag( Self, handle, pTagName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnOnlyIDs", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetReturnOnlyIDs( Self, handle, bReturnOnlyIDs );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnKeyValueTags", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetReturnKeyValueTags( Self, handle, bReturnKeyValueTags );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnLongDescription", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetReturnLongDescription( Self, handle, bReturnLongDescription );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnMetadata", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetReturnMetadata( Self, handle, bReturnMetadata );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnChildren", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetReturnChildren( Self, handle, bReturnChildren );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnAdditionalPreviews", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetReturnAdditionalPreviews( Self, handle, bReturnAdditionalPreviews );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnTotalOnly", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetReturnTotalOnly( Self, handle, bReturnTotalOnly );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetReturnPlaytimeStats", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetReturnPlaytimeStats( IntPtr self, UGCQueryHandle_t handle, uint unDays );
|
||||
|
||||
#endregion
|
||||
internal bool SetReturnPlaytimeStats( UGCQueryHandle_t handle, uint unDays )
|
||||
{
|
||||
var returnValue = _SetReturnPlaytimeStats( Self, handle, unDays );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetLanguage", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetLanguage( Self, handle, pchLanguage );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetAllowCachedResponse", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetAllowCachedResponse( IntPtr self, UGCQueryHandle_t handle, uint unMaxAgeSeconds );
|
||||
|
||||
#endregion
|
||||
internal bool SetAllowCachedResponse( UGCQueryHandle_t handle, uint unMaxAgeSeconds )
|
||||
{
|
||||
var returnValue = _SetAllowCachedResponse( Self, handle, unMaxAgeSeconds );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetCloudFileNameFilter", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetCloudFileNameFilter( Self, handle, pMatchCloudFileName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetMatchAnyTag", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetMatchAnyTag( Self, handle, bMatchAnyTag );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetSearchText", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetSearchText( Self, handle, pSearchText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetRankedByTrendDays", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetRankedByTrendDays( IntPtr self, UGCQueryHandle_t handle, uint unDays );
|
||||
|
||||
#endregion
|
||||
internal bool SetRankedByTrendDays( UGCQueryHandle_t handle, uint unDays )
|
||||
{
|
||||
var returnValue = _SetRankedByTrendDays( Self, handle, unDays );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddRequiredKeyValueTag", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _AddRequiredKeyValueTag( Self, handle, pKey, pValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_CreateItem", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _CreateItem( IntPtr self, AppId nConsumerAppId, WorkshopFileType eFileType );
|
||||
|
||||
#endregion
|
||||
internal CallResult<CreateItemResult_t> CreateItem( AppId nConsumerAppId, WorkshopFileType eFileType )
|
||||
{
|
||||
var returnValue = _CreateItem( Self, nConsumerAppId, eFileType );
|
||||
return new CallResult<CreateItemResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StartItemUpdate", CallingConvention = Platform.CC)]
|
||||
private static extern UGCUpdateHandle_t _StartItemUpdate( IntPtr self, AppId nConsumerAppId, PublishedFileId nPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal UGCUpdateHandle_t StartItemUpdate( AppId nConsumerAppId, PublishedFileId nPublishedFileID )
|
||||
{
|
||||
var returnValue = _StartItemUpdate( Self, nConsumerAppId, nPublishedFileID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemTitle", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetItemTitle( Self, handle, pchTitle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemDescription", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetItemDescription( Self, handle, pchDescription );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemUpdateLanguage", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetItemUpdateLanguage( Self, handle, pchLanguage );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemMetadata", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetItemMetadata( Self, handle, pchMetaData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemVisibility", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetItemVisibility( IntPtr self, UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility );
|
||||
|
||||
#endregion
|
||||
internal bool SetItemVisibility( UGCUpdateHandle_t handle, RemoteStoragePublishedFileVisibility eVisibility )
|
||||
{
|
||||
var returnValue = _SetItemVisibility( Self, handle, eVisibility );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemTags", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetItemTags( Self, updateHandle, ref pTags );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemContent", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetItemContent( Self, handle, pszContentFolder );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetItemPreview", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetItemPreview( Self, handle, pszPreviewFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetAllowLegacyUpload", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetAllowLegacyUpload( Self, handle, bAllowLegacyUpload );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveAllItemKeyValueTags", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _RemoveAllItemKeyValueTags( IntPtr self, UGCUpdateHandle_t handle );
|
||||
|
||||
#endregion
|
||||
internal bool RemoveAllItemKeyValueTags( UGCUpdateHandle_t handle )
|
||||
{
|
||||
var returnValue = _RemoveAllItemKeyValueTags( Self, handle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemKeyValueTags", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _RemoveItemKeyValueTags( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
var returnValue = _RemoveItemKeyValueTags( Self, handle, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemKeyValueTag", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _AddItemKeyValueTag( Self, handle, pchKey, pchValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemPreviewFile", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _AddItemPreviewFile( Self, handle, pszPreviewFile, type );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemPreviewVideo", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _AddItemPreviewVideo( Self, handle, pszVideoID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UpdateItemPreviewFile", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _UpdateItemPreviewFile( Self, handle, index, pszPreviewFile );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UpdateItemPreviewVideo", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _UpdateItemPreviewVideo( Self, handle, index, pszVideoID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemPreview", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _RemoveItemPreview( IntPtr self, UGCUpdateHandle_t handle, uint index );
|
||||
|
||||
#endregion
|
||||
internal bool RemoveItemPreview( UGCUpdateHandle_t handle, uint index )
|
||||
{
|
||||
var returnValue = _RemoveItemPreview( Self, handle, index );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SubmitItemUpdate", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _SubmitItemUpdate( IntPtr self, UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote );
|
||||
|
||||
#endregion
|
||||
internal CallResult<SubmitItemUpdateResult_t> SubmitItemUpdate( UGCUpdateHandle_t handle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchChangeNote )
|
||||
{
|
||||
var returnValue = _SubmitItemUpdate( Self, handle, pchChangeNote );
|
||||
return new CallResult<SubmitItemUpdateResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemUpdateProgress", CallingConvention = Platform.CC)]
|
||||
private static extern ItemUpdateStatus _GetItemUpdateProgress( IntPtr self, UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal );
|
||||
|
||||
#endregion
|
||||
internal ItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle, ref ulong punBytesProcessed, ref ulong punBytesTotal )
|
||||
{
|
||||
var returnValue = _GetItemUpdateProgress( Self, handle, ref punBytesProcessed, ref punBytesTotal );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SetUserItemVote", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _SetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp );
|
||||
|
||||
#endregion
|
||||
internal CallResult<SetUserItemVoteResult_t> SetUserItemVote( PublishedFileId nPublishedFileID, [MarshalAs( UnmanagedType.U1 )] bool bVoteUp )
|
||||
{
|
||||
var returnValue = _SetUserItemVote( Self, nPublishedFileID, bVoteUp );
|
||||
return new CallResult<SetUserItemVoteResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetUserItemVote", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetUserItemVote( IntPtr self, PublishedFileId nPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<GetUserItemVoteResult_t> GetUserItemVote( PublishedFileId nPublishedFileID )
|
||||
{
|
||||
var returnValue = _GetUserItemVote( Self, nPublishedFileID );
|
||||
return new CallResult<GetUserItemVoteResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddItemToFavorites", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _AddItemToFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<UserFavoriteItemsListChanged_t> AddItemToFavorites( AppId nAppId, PublishedFileId nPublishedFileID )
|
||||
{
|
||||
var returnValue = _AddItemToFavorites( Self, nAppId, nPublishedFileID );
|
||||
return new CallResult<UserFavoriteItemsListChanged_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveItemFromFavorites", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RemoveItemFromFavorites( IntPtr self, AppId nAppId, PublishedFileId nPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<UserFavoriteItemsListChanged_t> RemoveItemFromFavorites( AppId nAppId, PublishedFileId nPublishedFileID )
|
||||
{
|
||||
var returnValue = _RemoveItemFromFavorites( Self, nAppId, nPublishedFileID );
|
||||
return new CallResult<UserFavoriteItemsListChanged_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SubscribeItem", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _SubscribeItem( IntPtr self, PublishedFileId nPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<RemoteStorageSubscribePublishedFileResult_t> SubscribeItem( PublishedFileId nPublishedFileID )
|
||||
{
|
||||
var returnValue = _SubscribeItem( Self, nPublishedFileID );
|
||||
return new CallResult<RemoteStorageSubscribePublishedFileResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_UnsubscribeItem", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _UnsubscribeItem( IntPtr self, PublishedFileId nPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<RemoteStorageUnsubscribePublishedFileResult_t> UnsubscribeItem( PublishedFileId nPublishedFileID )
|
||||
{
|
||||
var returnValue = _UnsubscribeItem( Self, nPublishedFileID );
|
||||
return new CallResult<RemoteStorageUnsubscribePublishedFileResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetNumSubscribedItems", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetNumSubscribedItems( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetNumSubscribedItems()
|
||||
{
|
||||
var returnValue = _GetNumSubscribedItems( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetSubscribedItems", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetSubscribedItems( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries );
|
||||
|
||||
#endregion
|
||||
internal uint GetSubscribedItems( [In,Out] PublishedFileId[] pvecPublishedFileID, uint cMaxEntries )
|
||||
{
|
||||
var returnValue = _GetSubscribedItems( Self, pvecPublishedFileID, cMaxEntries );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemState", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetItemState( IntPtr self, PublishedFileId nPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal uint GetItemState( PublishedFileId nPublishedFileID )
|
||||
{
|
||||
var returnValue = _GetItemState( Self, nPublishedFileID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemInstallInfo", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
IntPtr mempchFolder = Helpers.TakeMemory();
|
||||
var returnValue = _GetItemInstallInfo( Self, nPublishedFileID, ref punSizeOnDisk, mempchFolder, (1024 * 32), ref punTimeStamp );
|
||||
pchFolder = Helpers.MemoryToString( mempchFolder );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetItemDownloadInfo", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetItemDownloadInfo( Self, nPublishedFileID, ref punBytesDownloaded, ref punBytesTotal );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_DownloadItem", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _DownloadItem( Self, nPublishedFileID, bHighPriority );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_BInitWorkshopForGameServer", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _BInitWorkshopForGameServer( Self, unWorkshopDepotID, pszFolder );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_SuspendDownloads", CallingConvention = Platform.CC)]
|
||||
private static extern void _SuspendDownloads( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bSuspend );
|
||||
|
||||
#endregion
|
||||
internal void SuspendDownloads( [MarshalAs( UnmanagedType.U1 )] bool bSuspend )
|
||||
{
|
||||
_SuspendDownloads( Self, bSuspend );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StartPlaytimeTracking", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _StartPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
|
||||
|
||||
#endregion
|
||||
internal CallResult<StartPlaytimeTrackingResult_t> StartPlaytimeTracking( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs )
|
||||
{
|
||||
var returnValue = _StartPlaytimeTracking( Self, pvecPublishedFileID, unNumPublishedFileIDs );
|
||||
return new CallResult<StartPlaytimeTrackingResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StopPlaytimeTracking", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _StopPlaytimeTracking( IntPtr self, [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs );
|
||||
|
||||
#endregion
|
||||
internal CallResult<StopPlaytimeTrackingResult_t> StopPlaytimeTracking( [In,Out] PublishedFileId[] pvecPublishedFileID, uint unNumPublishedFileIDs )
|
||||
{
|
||||
var returnValue = _StopPlaytimeTracking( Self, pvecPublishedFileID, unNumPublishedFileIDs );
|
||||
return new CallResult<StopPlaytimeTrackingResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_StopPlaytimeTrackingForAllItems", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _StopPlaytimeTrackingForAllItems( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal CallResult<StopPlaytimeTrackingResult_t> StopPlaytimeTrackingForAllItems()
|
||||
{
|
||||
var returnValue = _StopPlaytimeTrackingForAllItems( Self );
|
||||
return new CallResult<StopPlaytimeTrackingResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddDependency", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _AddDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<AddUGCDependencyResult_t> AddDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID )
|
||||
{
|
||||
var returnValue = _AddDependency( Self, nParentPublishedFileID, nChildPublishedFileID );
|
||||
return new CallResult<AddUGCDependencyResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveDependency", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RemoveDependency( IntPtr self, PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<RemoveUGCDependencyResult_t> RemoveDependency( PublishedFileId nParentPublishedFileID, PublishedFileId nChildPublishedFileID )
|
||||
{
|
||||
var returnValue = _RemoveDependency( Self, nParentPublishedFileID, nChildPublishedFileID );
|
||||
return new CallResult<RemoveUGCDependencyResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_AddAppDependency", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _AddAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<AddAppDependencyResult_t> AddAppDependency( PublishedFileId nPublishedFileID, AppId nAppID )
|
||||
{
|
||||
var returnValue = _AddAppDependency( Self, nPublishedFileID, nAppID );
|
||||
return new CallResult<AddAppDependencyResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_RemoveAppDependency", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RemoveAppDependency( IntPtr self, PublishedFileId nPublishedFileID, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<RemoveAppDependencyResult_t> RemoveAppDependency( PublishedFileId nPublishedFileID, AppId nAppID )
|
||||
{
|
||||
var returnValue = _RemoveAppDependency( Self, nPublishedFileID, nAppID );
|
||||
return new CallResult<RemoveAppDependencyResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_GetAppDependencies", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetAppDependencies( IntPtr self, PublishedFileId nPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<GetAppDependenciesResult_t> GetAppDependencies( PublishedFileId nPublishedFileID )
|
||||
{
|
||||
var returnValue = _GetAppDependencies( Self, nPublishedFileID );
|
||||
return new CallResult<GetAppDependenciesResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUGC_DeleteItem", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _DeleteItem( IntPtr self, PublishedFileId nPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal CallResult<DeleteItemResult_t> DeleteItem( PublishedFileId nPublishedFileID )
|
||||
{
|
||||
var returnValue = _DeleteItem( Self, nPublishedFileID );
|
||||
return new CallResult<DeleteItemResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
368
Facepunch.Steamworks/Generated/Interfaces/ISteamUser.cs
Normal file
368
Facepunch.Steamworks/Generated/Interfaces/ISteamUser.cs
Normal file
@@ -0,0 +1,368 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamUser : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamUser( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUser_v020", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamUser_v020();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUser_v020();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetHSteamUser", CallingConvention = Platform.CC)]
|
||||
private static extern HSteamUser _GetHSteamUser( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal HSteamUser GetHSteamUser()
|
||||
{
|
||||
var returnValue = _GetHSteamUser( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BLoggedOn", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BLoggedOn( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BLoggedOn()
|
||||
{
|
||||
var returnValue = _BLoggedOn( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetSteamID", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetSteamID( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetSteamID()
|
||||
{
|
||||
var returnValue = _GetSteamID( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_InitiateGameConnection", CallingConvention = Platform.CC)]
|
||||
private static extern int _InitiateGameConnection( IntPtr self, IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure );
|
||||
|
||||
#endregion
|
||||
internal int InitiateGameConnection( IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure )
|
||||
{
|
||||
var returnValue = _InitiateGameConnection( Self, pAuthBlob, cbMaxAuthBlob, steamIDGameServer, unIPServer, usPortServer, bSecure );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_TerminateGameConnection", CallingConvention = Platform.CC)]
|
||||
private static extern void _TerminateGameConnection( IntPtr self, uint unIPServer, ushort usPortServer );
|
||||
|
||||
#endregion
|
||||
internal void TerminateGameConnection( uint unIPServer, ushort usPortServer )
|
||||
{
|
||||
_TerminateGameConnection( Self, unIPServer, usPortServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_TrackAppUsageEvent", CallingConvention = Platform.CC)]
|
||||
private static extern void _TrackAppUsageEvent( IntPtr self, GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo );
|
||||
|
||||
#endregion
|
||||
internal void TrackAppUsageEvent( GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo )
|
||||
{
|
||||
_TrackAppUsageEvent( Self, gameID, eAppUsageEvent, pchExtraInfo );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetUserDataFolder", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetUserDataFolder( IntPtr self, IntPtr pchBuffer, int cubBuffer );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserDataFolder( out string pchBuffer )
|
||||
{
|
||||
IntPtr mempchBuffer = Helpers.TakeMemory();
|
||||
var returnValue = _GetUserDataFolder( Self, mempchBuffer, (1024 * 32) );
|
||||
pchBuffer = Helpers.MemoryToString( mempchBuffer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_StartVoiceRecording", CallingConvention = Platform.CC)]
|
||||
private static extern void _StartVoiceRecording( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void StartVoiceRecording()
|
||||
{
|
||||
_StartVoiceRecording( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_StopVoiceRecording", CallingConvention = Platform.CC)]
|
||||
private static extern void _StopVoiceRecording( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void StopVoiceRecording()
|
||||
{
|
||||
_StopVoiceRecording( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetAvailableVoice", CallingConvention = Platform.CC)]
|
||||
private static extern VoiceResult _GetAvailableVoice( IntPtr self, ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
|
||||
|
||||
#endregion
|
||||
internal VoiceResult GetAvailableVoice( ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated )
|
||||
{
|
||||
var returnValue = _GetAvailableVoice( Self, ref pcbCompressed, ref pcbUncompressed_Deprecated, nUncompressedVoiceDesiredSampleRate_Deprecated );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetVoice", CallingConvention = Platform.CC)]
|
||||
private static extern VoiceResult _GetVoice( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
|
||||
|
||||
#endregion
|
||||
internal VoiceResult GetVoice( [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated )
|
||||
{
|
||||
var returnValue = _GetVoice( Self, bWantCompressed, pDestBuffer, cbDestBufferSize, ref nBytesWritten, bWantUncompressed_Deprecated, pUncompressedDestBuffer_Deprecated, cbUncompressedDestBufferSize_Deprecated, ref nUncompressBytesWritten_Deprecated, nUncompressedVoiceDesiredSampleRate_Deprecated );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_DecompressVoice", CallingConvention = Platform.CC)]
|
||||
private static extern VoiceResult _DecompressVoice( IntPtr self, IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate );
|
||||
|
||||
#endregion
|
||||
internal VoiceResult DecompressVoice( IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate )
|
||||
{
|
||||
var returnValue = _DecompressVoice( Self, pCompressed, cbCompressed, pDestBuffer, cbDestBufferSize, ref nBytesWritten, nDesiredSampleRate );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetVoiceOptimalSampleRate", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetVoiceOptimalSampleRate( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetVoiceOptimalSampleRate()
|
||||
{
|
||||
var returnValue = _GetVoiceOptimalSampleRate( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetAuthSessionTicket", CallingConvention = Platform.CC)]
|
||||
private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
|
||||
|
||||
#endregion
|
||||
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
|
||||
{
|
||||
var returnValue = _GetAuthSessionTicket( Self, pTicket, cbMaxTicket, ref pcbTicket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BeginAuthSession", CallingConvention = Platform.CC)]
|
||||
private static extern BeginAuthResult _BeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID )
|
||||
{
|
||||
var returnValue = _BeginAuthSession( Self, pAuthTicket, cbAuthTicket, steamID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_EndAuthSession", CallingConvention = Platform.CC)]
|
||||
private static extern void _EndAuthSession( IntPtr self, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal void EndAuthSession( SteamId steamID )
|
||||
{
|
||||
_EndAuthSession( Self, steamID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_CancelAuthTicket", CallingConvention = Platform.CC)]
|
||||
private static extern void _CancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
|
||||
|
||||
#endregion
|
||||
internal void CancelAuthTicket( HAuthTicket hAuthTicket )
|
||||
{
|
||||
_CancelAuthTicket( Self, hAuthTicket );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_UserHasLicenseForApp", CallingConvention = Platform.CC)]
|
||||
private static extern UserHasLicenseForAppResult _UserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
|
||||
|
||||
#endregion
|
||||
internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID )
|
||||
{
|
||||
var returnValue = _UserHasLicenseForApp( Self, steamID, appID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsBehindNAT", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsBehindNAT( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsBehindNAT()
|
||||
{
|
||||
var returnValue = _BIsBehindNAT( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_AdvertiseGame", CallingConvention = Platform.CC)]
|
||||
private static extern void _AdvertiseGame( IntPtr self, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer );
|
||||
|
||||
#endregion
|
||||
internal void AdvertiseGame( SteamId steamIDGameServer, uint unIPServer, ushort usPortServer )
|
||||
{
|
||||
_AdvertiseGame( Self, steamIDGameServer, unIPServer, usPortServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_RequestEncryptedAppTicket", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestEncryptedAppTicket( IntPtr self, IntPtr pDataToInclude, int cbDataToInclude );
|
||||
|
||||
#endregion
|
||||
internal CallResult<EncryptedAppTicketResponse_t> RequestEncryptedAppTicket( IntPtr pDataToInclude, int cbDataToInclude )
|
||||
{
|
||||
var returnValue = _RequestEncryptedAppTicket( Self, pDataToInclude, cbDataToInclude );
|
||||
return new CallResult<EncryptedAppTicketResponse_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetEncryptedAppTicket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetEncryptedAppTicket( Self, pTicket, cbMaxTicket, ref pcbTicket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetGameBadgeLevel", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetGameBadgeLevel( IntPtr self, int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil );
|
||||
|
||||
#endregion
|
||||
internal int GetGameBadgeLevel( int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil )
|
||||
{
|
||||
var returnValue = _GetGameBadgeLevel( Self, nSeries, bFoil );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetPlayerSteamLevel", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetPlayerSteamLevel( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetPlayerSteamLevel()
|
||||
{
|
||||
var returnValue = _GetPlayerSteamLevel( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_RequestStoreAuthURL", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestStoreAuthURL( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL );
|
||||
|
||||
#endregion
|
||||
internal CallResult<StoreAuthURLResponse_t> RequestStoreAuthURL( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL )
|
||||
{
|
||||
var returnValue = _RequestStoreAuthURL( Self, pchRedirectURL );
|
||||
return new CallResult<StoreAuthURLResponse_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneVerified", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsPhoneVerified( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsPhoneVerified()
|
||||
{
|
||||
var returnValue = _BIsPhoneVerified( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsTwoFactorEnabled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsTwoFactorEnabled( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsTwoFactorEnabled()
|
||||
{
|
||||
var returnValue = _BIsTwoFactorEnabled( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneIdentifying", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsPhoneIdentifying( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsPhoneIdentifying()
|
||||
{
|
||||
var returnValue = _BIsPhoneIdentifying( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneRequiringVerification", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsPhoneRequiringVerification( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsPhoneRequiringVerification()
|
||||
{
|
||||
var returnValue = _BIsPhoneRequiringVerification( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetMarketEligibility", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetMarketEligibility( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal CallResult<MarketEligibilityResponse_t> GetMarketEligibility()
|
||||
{
|
||||
var returnValue = _GetMarketEligibility( Self );
|
||||
return new CallResult<MarketEligibilityResponse_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetDurationControl", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetDurationControl( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal CallResult<DurationControl_t> GetDurationControl()
|
||||
{
|
||||
var returnValue = _GetDurationControl( Self );
|
||||
return new CallResult<DurationControl_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
525
Facepunch.Steamworks/Generated/Interfaces/ISteamUserStats.cs
Normal file
525
Facepunch.Steamworks/Generated/Interfaces/ISteamUserStats.cs
Normal file
@@ -0,0 +1,525 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamUserStats : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamUserStats( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUserStats_v011", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamUserStats_v011();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUserStats_v011();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestCurrentStats", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _RequestCurrentStats( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool RequestCurrentStats()
|
||||
{
|
||||
var returnValue = _RequestCurrentStats( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetStatInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
{
|
||||
var returnValue = _GetStat( Self, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetStatFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
{
|
||||
var returnValue = _GetStat( Self, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetStatInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
|
||||
|
||||
#endregion
|
||||
internal bool SetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
|
||||
{
|
||||
var returnValue = _SetStat( Self, pchName, nData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetStatFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
|
||||
|
||||
#endregion
|
||||
internal bool SetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
|
||||
{
|
||||
var returnValue = _SetStat( Self, pchName, fData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_UpdateAvgRateStat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _UpdateAvgRateStat( Self, pchName, flCountThisSession, dSessionLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetAchievement( Self, pchName, ref pbAchieved );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _SetAchievement( Self, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_ClearAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _ClearAchievement( Self, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAndUnlockTime", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetAchievementAndUnlockTime( Self, pchName, ref pbAchieved, ref punUnlockTime );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_StoreStats", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _StoreStats( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool StoreStats()
|
||||
{
|
||||
var returnValue = _StoreStats( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementIcon", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAchievementIcon( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
|
||||
#endregion
|
||||
internal int GetAchievementIcon( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
{
|
||||
var returnValue = _GetAchievementIcon( Self, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementDisplayAttribute", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetAchievementDisplayAttribute( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal string GetAchievementDisplayAttribute( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
var returnValue = _GetAchievementDisplayAttribute( Self, pchName, pchKey );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_IndicateAchievementProgress", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _IndicateAchievementProgress( Self, pchName, nCurProgress, nMaxProgress );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNumAchievements", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetNumAchievements( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetNumAchievements()
|
||||
{
|
||||
var returnValue = _GetNumAchievements( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementName", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetAchievementName( IntPtr self, uint iAchievement );
|
||||
|
||||
#endregion
|
||||
internal string GetAchievementName( uint iAchievement )
|
||||
{
|
||||
var returnValue = _GetAchievementName( Self, iAchievement );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestUserStats", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal CallResult<UserStatsReceived_t> RequestUserStats( SteamId steamIDUser )
|
||||
{
|
||||
var returnValue = _RequestUserStats( Self, steamIDUser );
|
||||
return new CallResult<UserStatsReceived_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStatInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
{
|
||||
var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStatFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
{
|
||||
var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetUserAchievement( Self, steamIDUser, pchName, ref pbAchieved );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievementAndUnlockTime", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetUserAchievementAndUnlockTime( Self, steamIDUser, pchName, ref pbAchieved, ref punUnlockTime );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_ResetAllStats", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ResetAllStats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo );
|
||||
|
||||
#endregion
|
||||
internal bool ResetAllStats( [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo )
|
||||
{
|
||||
var returnValue = _ResetAllStats( Self, bAchievementsToo );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_FindOrCreateLeaderboard", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _FindOrCreateLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType );
|
||||
|
||||
#endregion
|
||||
internal CallResult<LeaderboardFindResult_t> FindOrCreateLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType )
|
||||
{
|
||||
var returnValue = _FindOrCreateLeaderboard( Self, pchLeaderboardName, eLeaderboardSortMethod, eLeaderboardDisplayType );
|
||||
return new CallResult<LeaderboardFindResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_FindLeaderboard", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _FindLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName );
|
||||
|
||||
#endregion
|
||||
internal CallResult<LeaderboardFindResult_t> FindLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName )
|
||||
{
|
||||
var returnValue = _FindLeaderboard( Self, pchLeaderboardName );
|
||||
return new CallResult<LeaderboardFindResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardName", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetLeaderboardName( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
|
||||
#endregion
|
||||
internal string GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard )
|
||||
{
|
||||
var returnValue = _GetLeaderboardName( Self, hSteamLeaderboard );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardEntryCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetLeaderboardEntryCount( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
|
||||
#endregion
|
||||
internal int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard )
|
||||
{
|
||||
var returnValue = _GetLeaderboardEntryCount( Self, hSteamLeaderboard );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardSortMethod", CallingConvention = Platform.CC)]
|
||||
private static extern LeaderboardSort _GetLeaderboardSortMethod( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
|
||||
#endregion
|
||||
internal LeaderboardSort GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard )
|
||||
{
|
||||
var returnValue = _GetLeaderboardSortMethod( Self, hSteamLeaderboard );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardDisplayType", CallingConvention = Platform.CC)]
|
||||
private static extern LeaderboardDisplay _GetLeaderboardDisplayType( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
|
||||
#endregion
|
||||
internal LeaderboardDisplay GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard )
|
||||
{
|
||||
var returnValue = _GetLeaderboardDisplayType( Self, hSteamLeaderboard );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntries", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _DownloadLeaderboardEntries( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd );
|
||||
|
||||
#endregion
|
||||
internal CallResult<LeaderboardScoresDownloaded_t> DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd )
|
||||
{
|
||||
var returnValue = _DownloadLeaderboardEntries( Self, hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd );
|
||||
return new CallResult<LeaderboardScoresDownloaded_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntriesForUsers", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _DownloadLeaderboardEntriesForUsers( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers
|
||||
/// </summary>
|
||||
internal CallResult<LeaderboardScoresDownloaded_t> DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers )
|
||||
{
|
||||
var returnValue = _DownloadLeaderboardEntriesForUsers( Self, hSteamLeaderboard, prgUsers, cUsers );
|
||||
return new CallResult<LeaderboardScoresDownloaded_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetDownloadedLeaderboardEntry", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetDownloadedLeaderboardEntry( Self, hSteamLeaderboardEntries, index, ref pLeaderboardEntry, pDetails, cDetailsMax );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_UploadLeaderboardScore", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _UploadLeaderboardScore( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount );
|
||||
|
||||
#endregion
|
||||
internal CallResult<LeaderboardScoreUploaded_t> UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount )
|
||||
{
|
||||
var returnValue = _UploadLeaderboardScore( Self, hSteamLeaderboard, eLeaderboardUploadScoreMethod, nScore, pScoreDetails, cScoreDetailsCount );
|
||||
return new CallResult<LeaderboardScoreUploaded_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_AttachLeaderboardUGC", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _AttachLeaderboardUGC( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC );
|
||||
|
||||
#endregion
|
||||
internal CallResult<LeaderboardUGCSet_t> AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC )
|
||||
{
|
||||
var returnValue = _AttachLeaderboardUGC( Self, hSteamLeaderboard, hUGC );
|
||||
return new CallResult<LeaderboardUGCSet_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNumberOfCurrentPlayers", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetNumberOfCurrentPlayers( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal CallResult<NumberOfCurrentPlayers_t> GetNumberOfCurrentPlayers()
|
||||
{
|
||||
var returnValue = _GetNumberOfCurrentPlayers( Self );
|
||||
return new CallResult<NumberOfCurrentPlayers_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalAchievementPercentages", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestGlobalAchievementPercentages( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal CallResult<GlobalAchievementPercentagesReady_t> RequestGlobalAchievementPercentages()
|
||||
{
|
||||
var returnValue = _RequestGlobalAchievementPercentages( Self );
|
||||
return new CallResult<GlobalAchievementPercentagesReady_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetMostAchievedAchievementInfo", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetMostAchievedAchievementInfo( IntPtr self, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
|
||||
#endregion
|
||||
internal int GetMostAchievedAchievementInfo( out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
{
|
||||
IntPtr mempchName = Helpers.TakeMemory();
|
||||
var returnValue = _GetMostAchievedAchievementInfo( Self, mempchName, (1024 * 32), ref pflPercent, ref pbAchieved );
|
||||
pchName = Helpers.MemoryToString( mempchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNextMostAchievedAchievementInfo", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetNextMostAchievedAchievementInfo( IntPtr self, int iIteratorPrevious, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
|
||||
#endregion
|
||||
internal int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
{
|
||||
IntPtr mempchName = Helpers.TakeMemory();
|
||||
var returnValue = _GetNextMostAchievedAchievementInfo( Self, iIteratorPrevious, mempchName, (1024 * 32), ref pflPercent, ref pbAchieved );
|
||||
pchName = Helpers.MemoryToString( mempchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAchievedPercent", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetAchievementAchievedPercent( Self, pchName, ref pflPercent );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalStats", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestGlobalStats( IntPtr self, int nHistoryDays );
|
||||
|
||||
#endregion
|
||||
internal CallResult<GlobalStatsReceived_t> RequestGlobalStats( int nHistoryDays )
|
||||
{
|
||||
var returnValue = _RequestGlobalStats( Self, nHistoryDays );
|
||||
return new CallResult<GlobalStatsReceived_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatInt64", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetGlobalStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetGlobalStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData )
|
||||
{
|
||||
var returnValue = _GetGlobalStat( Self, pchStatName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatDouble", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetGlobalStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetGlobalStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData )
|
||||
{
|
||||
var returnValue = _GetGlobalStat( Self, pchStatName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistoryInt64", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetGlobalStatHistory( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData );
|
||||
|
||||
#endregion
|
||||
internal int GetGlobalStatHistory( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData )
|
||||
{
|
||||
var returnValue = _GetGlobalStatHistory( Self, pchStatName, pData, cubData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistoryDouble", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetGlobalStatHistory( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData );
|
||||
|
||||
#endregion
|
||||
internal int GetGlobalStatHistory( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData )
|
||||
{
|
||||
var returnValue = _GetGlobalStatHistory( Self, pchStatName, pData, cubData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
403
Facepunch.Steamworks/Generated/Interfaces/ISteamUtils.cs
Normal file
403
Facepunch.Steamworks/Generated/Interfaces/ISteamUtils.cs
Normal file
@@ -0,0 +1,403 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamUtils : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamUtils( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUtils_v009", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamUtils_v009();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUtils_v009();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerUtils_v009", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerUtils_v009();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerUtils_v009();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceAppActive", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetSecondsSinceAppActive( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetSecondsSinceAppActive()
|
||||
{
|
||||
var returnValue = _GetSecondsSinceAppActive( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceComputerActive", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetSecondsSinceComputerActive( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetSecondsSinceComputerActive()
|
||||
{
|
||||
var returnValue = _GetSecondsSinceComputerActive( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetConnectedUniverse", CallingConvention = Platform.CC)]
|
||||
private static extern Universe _GetConnectedUniverse( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal Universe GetConnectedUniverse()
|
||||
{
|
||||
var returnValue = _GetConnectedUniverse( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetServerRealTime", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetServerRealTime( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetServerRealTime()
|
||||
{
|
||||
var returnValue = _GetServerRealTime( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetIPCountry", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetIPCountry( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal string GetIPCountry()
|
||||
{
|
||||
var returnValue = _GetIPCountry( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetImageSize", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetImageSize( Self, iImage, ref pnWidth, ref pnHeight );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetImageRGBA", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetImageRGBA( Self, iImage, pubDest, nDestBufferSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetCSERIPPort", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetCSERIPPort( IntPtr self, ref uint unIP, ref ushort usPort );
|
||||
|
||||
#endregion
|
||||
internal bool GetCSERIPPort( ref uint unIP, ref ushort usPort )
|
||||
{
|
||||
var returnValue = _GetCSERIPPort( Self, ref unIP, ref usPort );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetCurrentBatteryPower", CallingConvention = Platform.CC)]
|
||||
private static extern byte _GetCurrentBatteryPower( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal byte GetCurrentBatteryPower()
|
||||
{
|
||||
var returnValue = _GetCurrentBatteryPower( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAppID", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetAppID( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetAppID()
|
||||
{
|
||||
var returnValue = _GetAppID( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetOverlayNotificationPosition", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetOverlayNotificationPosition( IntPtr self, NotificationPosition eNotificationPosition );
|
||||
|
||||
#endregion
|
||||
internal void SetOverlayNotificationPosition( NotificationPosition eNotificationPosition )
|
||||
{
|
||||
_SetOverlayNotificationPosition( Self, eNotificationPosition );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsAPICallCompleted", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _IsAPICallCompleted( Self, hSteamAPICall, ref pbFailed );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAPICallFailureReason", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICallFailure _GetAPICallFailureReason( IntPtr self, SteamAPICall_t hSteamAPICall );
|
||||
|
||||
#endregion
|
||||
internal SteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall )
|
||||
{
|
||||
var returnValue = _GetAPICallFailureReason( Self, hSteamAPICall );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAPICallResult", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _GetAPICallResult( Self, hSteamAPICall, pCallback, cubCallback, iCallbackExpected, ref pbFailed );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetIPCCallCount", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetIPCCallCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetIPCCallCount()
|
||||
{
|
||||
var returnValue = _GetIPCCallCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetWarningMessageHook", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetWarningMessageHook( IntPtr self, IntPtr pFunction );
|
||||
|
||||
#endregion
|
||||
internal void SetWarningMessageHook( IntPtr pFunction )
|
||||
{
|
||||
_SetWarningMessageHook( Self, pFunction );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsOverlayEnabled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsOverlayEnabled( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsOverlayEnabled()
|
||||
{
|
||||
var returnValue = _IsOverlayEnabled( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_BOverlayNeedsPresent", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BOverlayNeedsPresent( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BOverlayNeedsPresent()
|
||||
{
|
||||
var returnValue = _BOverlayNeedsPresent( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_CheckFileSignature", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _CheckFileSignature( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName );
|
||||
|
||||
#endregion
|
||||
internal CallResult<CheckFileSignature_t> CheckFileSignature( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName )
|
||||
{
|
||||
var returnValue = _CheckFileSignature( Self, szFileName );
|
||||
return new CallResult<CheckFileSignature_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_ShowGamepadTextInput", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
var returnValue = _ShowGamepadTextInput( Self, eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetEnteredGamepadTextLength", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetEnteredGamepadTextLength( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetEnteredGamepadTextLength()
|
||||
{
|
||||
var returnValue = _GetEnteredGamepadTextLength( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetEnteredGamepadTextInput", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetEnteredGamepadTextInput( IntPtr self, IntPtr pchText, uint cchText );
|
||||
|
||||
#endregion
|
||||
internal bool GetEnteredGamepadTextInput( out string pchText )
|
||||
{
|
||||
IntPtr mempchText = Helpers.TakeMemory();
|
||||
var returnValue = _GetEnteredGamepadTextInput( Self, mempchText, (1024 * 32) );
|
||||
pchText = Helpers.MemoryToString( mempchText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSteamUILanguage", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetSteamUILanguage( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal string GetSteamUILanguage()
|
||||
{
|
||||
var returnValue = _GetSteamUILanguage( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamRunningInVR", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsSteamRunningInVR( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsSteamRunningInVR()
|
||||
{
|
||||
var returnValue = _IsSteamRunningInVR( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetOverlayNotificationInset", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetOverlayNotificationInset( IntPtr self, int nHorizontalInset, int nVerticalInset );
|
||||
|
||||
#endregion
|
||||
internal void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset )
|
||||
{
|
||||
_SetOverlayNotificationInset( Self, nHorizontalInset, nVerticalInset );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamInBigPictureMode", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsSteamInBigPictureMode( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsSteamInBigPictureMode()
|
||||
{
|
||||
var returnValue = _IsSteamInBigPictureMode( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_StartVRDashboard", CallingConvention = Platform.CC)]
|
||||
private static extern void _StartVRDashboard( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void StartVRDashboard()
|
||||
{
|
||||
_StartVRDashboard( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsVRHeadsetStreamingEnabled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsVRHeadsetStreamingEnabled( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsVRHeadsetStreamingEnabled()
|
||||
{
|
||||
var returnValue = _IsVRHeadsetStreamingEnabled( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetVRHeadsetStreamingEnabled", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetVRHeadsetStreamingEnabled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled );
|
||||
|
||||
#endregion
|
||||
internal void SetVRHeadsetStreamingEnabled( [MarshalAs( UnmanagedType.U1 )] bool bEnabled )
|
||||
{
|
||||
_SetVRHeadsetStreamingEnabled( Self, bEnabled );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamChinaLauncher", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsSteamChinaLauncher( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsSteamChinaLauncher()
|
||||
{
|
||||
var returnValue = _IsSteamChinaLauncher( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_InitFilterText", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _InitFilterText( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool InitFilterText()
|
||||
{
|
||||
var returnValue = _InitFilterText( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_FilterText", CallingConvention = Platform.CC)]
|
||||
private static extern int _FilterText( IntPtr self, IntPtr pchOutFilteredText, uint nByteSizeOutFilteredText, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchInputMessage, [MarshalAs( UnmanagedType.U1 )] bool bLegalOnly );
|
||||
|
||||
#endregion
|
||||
internal int FilterText( out string pchOutFilteredText, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchInputMessage, [MarshalAs( UnmanagedType.U1 )] bool bLegalOnly )
|
||||
{
|
||||
IntPtr mempchOutFilteredText = Helpers.TakeMemory();
|
||||
var returnValue = _FilterText( Self, mempchOutFilteredText, (1024 * 32), pchInputMessage, bLegalOnly );
|
||||
pchOutFilteredText = Helpers.MemoryToString( mempchOutFilteredText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetIPv6ConnectivityState", CallingConvention = Platform.CC)]
|
||||
private static extern SteamIPv6ConnectivityState _GetIPv6ConnectivityState( IntPtr self, SteamIPv6ConnectivityProtocol eProtocol );
|
||||
|
||||
#endregion
|
||||
internal SteamIPv6ConnectivityState GetIPv6ConnectivityState( SteamIPv6ConnectivityProtocol eProtocol )
|
||||
{
|
||||
var returnValue = _GetIPv6ConnectivityState( Self, eProtocol );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
70
Facepunch.Steamworks/Generated/Interfaces/ISteamVideo.cs
Normal file
70
Facepunch.Steamworks/Generated/Interfaces/ISteamVideo.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
internal class ISteamVideo : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamVideo( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamVideo_v002", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamVideo_v002();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamVideo_v002();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetVideoURL", CallingConvention = Platform.CC)]
|
||||
private static extern void _GetVideoURL( IntPtr self, AppId unVideoAppID );
|
||||
|
||||
#endregion
|
||||
internal void GetVideoURL( AppId unVideoAppID )
|
||||
{
|
||||
_GetVideoURL( Self, unVideoAppID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_IsBroadcasting", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsBroadcasting( IntPtr self, ref int pnNumViewers );
|
||||
|
||||
#endregion
|
||||
internal bool IsBroadcasting( ref int pnNumViewers )
|
||||
{
|
||||
var returnValue = _IsBroadcasting( Self, ref pnNumViewers );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetOPFSettings", CallingConvention = Platform.CC)]
|
||||
private static extern void _GetOPFSettings( IntPtr self, AppId unVideoAppID );
|
||||
|
||||
#endregion
|
||||
internal void GetOPFSettings( AppId unVideoAppID )
|
||||
{
|
||||
_GetOPFSettings( Self, unVideoAppID );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetOPFStringForApp", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
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 )
|
||||
{
|
||||
IntPtr mempchBuffer = Helpers.TakeMemory();
|
||||
var returnValue = _GetOPFStringForApp( Self, unVideoAppID, mempchBuffer, ref pnBufferSize );
|
||||
pchBuffer = Helpers.MemoryToString( mempchBuffer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
2909
Facepunch.Steamworks/Generated/SteamCallbacks.cs
Normal file
2909
Facepunch.Steamworks/Generated/SteamCallbacks.cs
Normal file
File diff suppressed because it is too large
Load Diff
104
Facepunch.Steamworks/Generated/SteamConstants.cs
Normal file
104
Facepunch.Steamworks/Generated/SteamConstants.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
internal static class Defines
|
||||
{
|
||||
internal static readonly int k_cubSaltSize = 8;
|
||||
internal static readonly GID_t k_GIDNil = 0xffffffffffffffff;
|
||||
internal static readonly GID_t k_TxnIDNil = k_GIDNil;
|
||||
internal static readonly GID_t k_TxnIDUnknown = 0;
|
||||
internal static readonly JobID_t k_JobIDNil = 0xffffffffffffffff;
|
||||
internal static readonly PackageId_t k_uPackageIdInvalid = 0xFFFFFFFF;
|
||||
internal static readonly BundleId_t k_uBundleIdInvalid = 0;
|
||||
internal static readonly AppId k_uAppIdInvalid = 0x0;
|
||||
internal static readonly AssetClassId_t k_ulAssetClassIdInvalid = 0x0;
|
||||
internal static readonly PhysicalItemId_t k_uPhysicalItemIdInvalid = 0x0;
|
||||
internal static readonly DepotId_t k_uDepotIdInvalid = 0x0;
|
||||
internal static readonly CellID_t k_uCellIDInvalid = 0xFFFFFFFF;
|
||||
internal static readonly SteamAPICall_t k_uAPICallInvalid = 0x0;
|
||||
internal static readonly PartnerId_t k_uPartnerIdInvalid = 0;
|
||||
internal static readonly ManifestId_t k_uManifestIdInvalid = 0;
|
||||
internal static readonly SiteId_t k_ulSiteIdInvalid = 0;
|
||||
internal static readonly PartyBeaconID_t k_ulPartyBeaconIdInvalid = 0;
|
||||
internal static readonly HAuthTicket k_HAuthTicketInvalid = 0;
|
||||
internal static readonly uint k_unSteamAccountIDMask = 0xFFFFFFFF;
|
||||
internal static readonly uint k_unSteamAccountInstanceMask = 0x000FFFFF;
|
||||
internal static readonly uint k_unSteamUserDefaultInstance = 1;
|
||||
internal static readonly int k_cchGameExtraInfoMax = 64;
|
||||
internal static readonly int k_cchMaxFriendsGroupName = 64;
|
||||
internal static readonly int k_cFriendsGroupLimit = 100;
|
||||
internal static readonly FriendsGroupID_t k_FriendsGroupID_Invalid = - 1;
|
||||
internal static readonly int k_cEnumerateFollowersMax = 50;
|
||||
internal static readonly uint k_cubChatMetadataMax = 8192;
|
||||
internal static readonly int k_cbMaxGameServerGameDir = 32;
|
||||
internal static readonly int k_cbMaxGameServerMapName = 32;
|
||||
internal static readonly int k_cbMaxGameServerGameDescription = 64;
|
||||
internal static readonly int k_cbMaxGameServerName = 64;
|
||||
internal static readonly int k_cbMaxGameServerTags = 128;
|
||||
internal static readonly int k_cbMaxGameServerGameData = 2048;
|
||||
internal static readonly int HSERVERQUERY_INVALID = -1;
|
||||
internal static readonly uint k_unFavoriteFlagNone = 0x00;
|
||||
internal static readonly uint k_unFavoriteFlagFavorite = 0x01;
|
||||
internal static readonly uint k_unFavoriteFlagHistory = 0x02;
|
||||
internal static readonly uint k_unMaxCloudFileChunkSize = 100 * 1024 * 1024;
|
||||
internal static readonly PublishedFileId k_PublishedFileIdInvalid = 0;
|
||||
internal static readonly UGCHandle_t k_UGCHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly PublishedFileUpdateHandle_t k_PublishedFileUpdateHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly UGCFileWriteStreamHandle_t k_UGCFileStreamHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly uint k_cchPublishedDocumentTitleMax = 128 + 1;
|
||||
internal static readonly uint k_cchPublishedDocumentDescriptionMax = 8000;
|
||||
internal static readonly uint k_cchPublishedDocumentChangeDescriptionMax = 8000;
|
||||
internal static readonly uint k_unEnumeratePublishedFilesMaxResults = 50;
|
||||
internal static readonly uint k_cchTagListMax = 1024 + 1;
|
||||
internal static readonly uint k_cchFilenameMax = 260;
|
||||
internal static readonly uint k_cchPublishedFileURLMax = 256;
|
||||
internal static readonly int k_cubAppProofOfPurchaseKeyMax = 240;
|
||||
internal static readonly uint k_nScreenshotMaxTaggedUsers = 32;
|
||||
internal static readonly uint k_nScreenshotMaxTaggedPublishedFiles = 32;
|
||||
internal static readonly int k_cubUFSTagTypeMax = 255;
|
||||
internal static readonly int k_cubUFSTagValueMax = 255;
|
||||
internal static readonly int k_ScreenshotThumbWidth = 200;
|
||||
internal static readonly UGCQueryHandle_t k_UGCQueryHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly UGCUpdateHandle_t k_UGCUpdateHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly uint kNumUGCResultsPerPage = 50;
|
||||
internal static readonly uint k_cchDeveloperMetadataMax = 5000;
|
||||
internal static readonly uint INVALID_HTMLBROWSER = 0;
|
||||
internal static readonly InventoryItemId k_SteamItemInstanceIDInvalid = ~default(ulong);
|
||||
internal static readonly SteamInventoryResult_t k_SteamInventoryResultInvalid = - 1;
|
||||
internal static readonly SteamInventoryUpdateHandle_t k_SteamInventoryUpdateHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly Connection k_HSteamNetConnection_Invalid = 0;
|
||||
internal static readonly Socket k_HSteamListenSocket_Invalid = 0;
|
||||
internal static readonly HSteamNetPollGroup k_HSteamNetPollGroup_Invalid = 0;
|
||||
internal static readonly int k_cchMaxSteamNetworkingErrMsg = 1024;
|
||||
internal static readonly int k_cchSteamNetworkingMaxConnectionCloseReason = 128;
|
||||
internal static readonly int k_cchSteamNetworkingMaxConnectionDescription = 128;
|
||||
internal static readonly int k_cbMaxSteamNetworkingSocketsMessageSizeSend = 512 * 1024;
|
||||
internal static readonly int k_nSteamNetworkingSend_Unreliable = 0;
|
||||
internal static readonly int k_nSteamNetworkingSend_NoNagle = 1;
|
||||
internal static readonly int k_nSteamNetworkingSend_UnreliableNoNagle = k_nSteamNetworkingSend_Unreliable | k_nSteamNetworkingSend_NoNagle;
|
||||
internal static readonly int k_nSteamNetworkingSend_NoDelay = 4;
|
||||
internal static readonly int k_nSteamNetworkingSend_UnreliableNoDelay = k_nSteamNetworkingSend_Unreliable | k_nSteamNetworkingSend_NoDelay | k_nSteamNetworkingSend_NoNagle;
|
||||
internal static readonly int k_nSteamNetworkingSend_Reliable = 8;
|
||||
internal static readonly int k_nSteamNetworkingSend_ReliableNoNagle = k_nSteamNetworkingSend_Reliable | k_nSteamNetworkingSend_NoNagle;
|
||||
internal static readonly int k_nSteamNetworkingSend_UseCurrentThread = 16;
|
||||
internal static readonly int k_cchMaxSteamNetworkingPingLocationString = 1024;
|
||||
internal static readonly int k_nSteamNetworkingPing_Failed = - 1;
|
||||
internal static readonly int k_nSteamNetworkingPing_Unknown = - 2;
|
||||
internal static readonly SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ( ( uint ) 'd' << 16 ) | ( ( uint ) 'e' << 8 ) | ( uint ) 'v';
|
||||
internal static readonly uint k_unServerFlagNone = 0x00;
|
||||
internal static readonly uint k_unServerFlagActive = 0x01;
|
||||
internal static readonly uint k_unServerFlagSecure = 0x02;
|
||||
internal static readonly uint k_unServerFlagDedicated = 0x04;
|
||||
internal static readonly uint k_unServerFlagLinux = 0x08;
|
||||
internal static readonly uint k_unServerFlagPassworded = 0x10;
|
||||
internal static readonly uint k_unServerFlagPrivate = 0x20;
|
||||
internal static readonly uint k_cbSteamDatagramMaxSerializedTicket = 512;
|
||||
internal static readonly uint k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData = 2048;
|
||||
internal static readonly uint k_cbMaxSteamDatagramGameCoordinatorServerLoginSerialized = 4096;
|
||||
}
|
||||
}
|
||||
2107
Facepunch.Steamworks/Generated/SteamEnums.cs
Normal file
2107
Facepunch.Steamworks/Generated/SteamEnums.cs
Normal file
File diff suppressed because it is too large
Load Diff
208
Facepunch.Steamworks/Generated/SteamStructFunctions.cs
Normal file
208
Facepunch.Steamworks/Generated/SteamStructFunctions.cs
Normal file
@@ -0,0 +1,208 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
internal partial struct gameserveritem_t
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_gameserveritem_t_Construct", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalConstruct( ref gameserveritem_t self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_gameserveritem_t_GetName", CallingConvention = Platform.CC)]
|
||||
internal static extern Utf8StringPointer InternalGetName( ref gameserveritem_t self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_gameserveritem_t_SetName", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetName( ref gameserveritem_t self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pName );
|
||||
|
||||
}
|
||||
|
||||
internal partial struct MatchMakingKeyValuePair
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_MatchMakingKeyValuePair_t_Construct", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalConstruct( ref MatchMakingKeyValuePair self );
|
||||
|
||||
}
|
||||
|
||||
internal partial struct servernetadr_t
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_Construct", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalConstruct( ref servernetadr_t self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_Init", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalInit( ref servernetadr_t self, uint ip, ushort usQueryPort, ushort usConnectionPort );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_GetQueryPort", CallingConvention = Platform.CC)]
|
||||
internal static extern ushort InternalGetQueryPort( ref servernetadr_t self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_SetQueryPort", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetQueryPort( ref servernetadr_t self, ushort usPort );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_GetConnectionPort", CallingConvention = Platform.CC)]
|
||||
internal static extern ushort InternalGetConnectionPort( ref servernetadr_t self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_SetConnectionPort", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetConnectionPort( ref servernetadr_t self, ushort usPort );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_GetIP", CallingConvention = Platform.CC)]
|
||||
internal static extern uint InternalGetIP( ref servernetadr_t self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_SetIP", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetIP( ref servernetadr_t self, uint unIP );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_GetConnectionAddressString", CallingConvention = Platform.CC)]
|
||||
internal static extern Utf8StringPointer InternalGetConnectionAddressString( ref servernetadr_t self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_GetQueryAddressString", CallingConvention = Platform.CC)]
|
||||
internal static extern Utf8StringPointer InternalGetQueryAddressString( ref servernetadr_t self );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_IsLessThan", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalIsLessThan( ref servernetadr_t self, ref servernetadr_t netadr );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_servernetadr_t_Assign", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalAssign( ref servernetadr_t self, ref servernetadr_t that );
|
||||
|
||||
}
|
||||
|
||||
internal partial struct SteamDatagramHostedAddress
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamDatagramHostedAddress_Clear", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalClear( ref SteamDatagramHostedAddress self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamDatagramHostedAddress_GetPopID", CallingConvention = Platform.CC)]
|
||||
internal static extern SteamNetworkingPOPID InternalGetPopID( ref SteamDatagramHostedAddress self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamDatagramHostedAddress_SetDevAddress", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetDevAddress( ref SteamDatagramHostedAddress self, uint nIP, ushort nPort, SteamNetworkingPOPID popid );
|
||||
|
||||
}
|
||||
|
||||
internal partial struct SteamIPAddress
|
||||
{
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamIPAddress_t_IsSet", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalIsSet( ref SteamIPAddress self );
|
||||
|
||||
}
|
||||
|
||||
public partial struct NetIdentity
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_Clear", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalClear( ref NetIdentity self );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_IsInvalid", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalIsInvalid( ref NetIdentity self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_SetSteamID", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetSteamID( ref NetIdentity self, SteamId steamID );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_GetSteamID", CallingConvention = Platform.CC)]
|
||||
internal static extern SteamId InternalGetSteamID( ref NetIdentity self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_SetSteamID64", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetSteamID64( ref NetIdentity self, ulong steamID );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_GetSteamID64", CallingConvention = Platform.CC)]
|
||||
internal static extern ulong InternalGetSteamID64( ref NetIdentity self );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_SetXboxPairwiseID", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalSetXboxPairwiseID( ref NetIdentity self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_GetXboxPairwiseID", CallingConvention = Platform.CC)]
|
||||
internal static extern Utf8StringPointer InternalGetXboxPairwiseID( ref NetIdentity self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_SetIPAddr", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetIPAddr( ref NetIdentity self, ref NetAddress addr );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_GetIPAddr", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr InternalGetIPAddr( ref NetIdentity self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_SetLocalHost", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetLocalHost( ref NetIdentity self );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_IsLocalHost", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalIsLocalHost( ref NetIdentity self );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_SetGenericString", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalSetGenericString( ref NetIdentity self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_GetGenericString", CallingConvention = Platform.CC)]
|
||||
internal static extern Utf8StringPointer InternalGetGenericString( ref NetIdentity self );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_SetGenericBytes", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalSetGenericBytes( ref NetIdentity self, IntPtr data, uint cbLen );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_GetGenericBytes", CallingConvention = Platform.CC)]
|
||||
internal static extern byte InternalGetGenericBytes( ref NetIdentity self, ref int cbLen );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_IsEqualTo", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalIsEqualTo( ref NetIdentity self, ref NetIdentity x );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_ToString", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalToString( ref NetIdentity self, IntPtr buf, uint cbBuf );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentity_ParseString", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalParseString( ref NetIdentity self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr );
|
||||
|
||||
}
|
||||
|
||||
public partial struct NetAddress
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_Clear", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalClear( ref NetAddress self );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_IsIPv6AllZeros", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalIsIPv6AllZeros( ref NetAddress self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_SetIPv6", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetIPv6( ref NetAddress self, ref byte ipv6, ushort nPort );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_SetIPv4", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetIPv4( ref NetAddress self, uint nIP, ushort nPort );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_IsIPv4", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalIsIPv4( ref NetAddress self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_GetIPv4", CallingConvention = Platform.CC)]
|
||||
internal static extern uint InternalGetIPv4( ref NetAddress self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_SetIPv6LocalHost", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalSetIPv6LocalHost( ref NetAddress self, ushort nPort );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_IsLocalHost", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalIsLocalHost( ref NetAddress self );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_ToString", CallingConvention = Platform.CC)]
|
||||
internal static extern void InternalToString( ref NetAddress self, IntPtr buf, uint cbBuf, [MarshalAs( UnmanagedType.U1 )] bool bWithPort );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_ParseString", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalParseString( ref NetAddress self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr );
|
||||
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_IsEqualTo", CallingConvention = Platform.CC)]
|
||||
internal static extern bool InternalIsEqualTo( ref NetAddress self, ref NetAddress x );
|
||||
|
||||
}
|
||||
|
||||
internal partial struct NetMsg
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingMessage_t_Release", CallingConvention = Platform.CC)]
|
||||
internal static unsafe extern void InternalRelease( NetMsg* self );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
226
Facepunch.Steamworks/Generated/SteamStructs.cs
Normal file
226
Facepunch.Steamworks/Generated/SteamStructs.cs
Normal file
@@ -0,0 +1,226 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
internal struct FriendGameInfo_t
|
||||
{
|
||||
internal GameId GameID; // m_gameID CGameID
|
||||
internal uint GameIP; // m_unGameIP uint32
|
||||
internal ushort GamePort; // m_usGamePort uint16
|
||||
internal ushort QueryPort; // m_usQueryPort uint16
|
||||
internal ulong SteamIDLobby; // m_steamIDLobby CSteamID
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct FriendSessionStateInfo_t
|
||||
{
|
||||
internal uint IOnlineSessionInstances; // m_uiOnlineSessionInstances uint32
|
||||
internal byte IPublishedToFriendsSessionInstance; // m_uiPublishedToFriendsSessionInstance uint8
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal partial struct servernetadr_t
|
||||
{
|
||||
internal ushort ConnectionPort; // m_usConnectionPort uint16
|
||||
internal ushort QueryPort; // m_usQueryPort uint16
|
||||
internal uint IP; // m_unIP uint32
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPackSize )]
|
||||
internal partial struct gameserveritem_t
|
||||
{
|
||||
internal servernetadr_t NetAdr; // m_NetAdr servernetadr_t
|
||||
internal int Ping; // m_nPing int
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
internal bool HadSuccessfulResponse; // m_bHadSuccessfulResponse bool
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
internal bool DoNotRefresh; // m_bDoNotRefresh bool
|
||||
internal string GameDirUTF8() => System.Text.Encoding.UTF8.GetString( GameDir, 0, System.Array.IndexOf<byte>( GameDir, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] // byte[] m_szGameDir
|
||||
internal byte[] GameDir; // m_szGameDir char [32]
|
||||
internal string MapUTF8() => System.Text.Encoding.UTF8.GetString( Map, 0, System.Array.IndexOf<byte>( Map, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] // byte[] m_szMap
|
||||
internal byte[] Map; // m_szMap char [32]
|
||||
internal string GameDescriptionUTF8() => System.Text.Encoding.UTF8.GetString( GameDescription, 0, System.Array.IndexOf<byte>( GameDescription, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] // byte[] m_szGameDescription
|
||||
internal byte[] GameDescription; // m_szGameDescription char [64]
|
||||
internal uint AppID; // m_nAppID uint32
|
||||
internal int Players; // m_nPlayers int
|
||||
internal int MaxPlayers; // m_nMaxPlayers int
|
||||
internal int BotPlayers; // m_nBotPlayers int
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
internal bool Password; // m_bPassword bool
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
internal bool Secure; // m_bSecure bool
|
||||
internal uint TimeLastPlayed; // m_ulTimeLastPlayed uint32
|
||||
internal int ServerVersion; // m_nServerVersion int
|
||||
internal string ServerNameUTF8() => System.Text.Encoding.UTF8.GetString( ServerName, 0, System.Array.IndexOf<byte>( ServerName, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] // byte[] m_szServerName
|
||||
internal byte[] ServerName; // m_szServerName char [64]
|
||||
internal string GameTagsUTF8() => System.Text.Encoding.UTF8.GetString( GameTags, 0, System.Array.IndexOf<byte>( GameTags, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_szGameTags
|
||||
internal byte[] GameTags; // m_szGameTags char [128]
|
||||
internal ulong SteamID; // m_steamID CSteamID
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct SteamPartyBeaconLocation_t
|
||||
{
|
||||
internal SteamPartyBeaconLocationType Type; // m_eType ESteamPartyBeaconLocationType
|
||||
internal ulong LocationID; // m_ulLocationID uint64
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct SteamParamStringArray_t
|
||||
{
|
||||
internal IntPtr Strings; // m_ppStrings const char **
|
||||
internal int NumStrings; // m_nNumStrings int32
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct LeaderboardEntry_t
|
||||
{
|
||||
internal ulong SteamIDUser; // m_steamIDUser CSteamID
|
||||
internal int GlobalRank; // m_nGlobalRank int32
|
||||
internal int Score; // m_nScore int32
|
||||
internal int CDetails; // m_cDetails int32
|
||||
internal ulong UGC; // m_hUGC UGCHandle_t
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct P2PSessionState_t
|
||||
{
|
||||
internal byte ConnectionActive; // m_bConnectionActive uint8
|
||||
internal byte Connecting; // m_bConnecting uint8
|
||||
internal byte P2PSessionError; // m_eP2PSessionError uint8
|
||||
internal byte UsingRelay; // m_bUsingRelay uint8
|
||||
internal int BytesQueuedForSend; // m_nBytesQueuedForSend int32
|
||||
internal int PacketsQueuedForSend; // m_nPacketsQueuedForSend int32
|
||||
internal uint RemoteIP; // m_nRemoteIP uint32
|
||||
internal ushort RemotePort; // m_nRemotePort uint16
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct SteamUGCDetails_t
|
||||
{
|
||||
internal PublishedFileId PublishedFileId; // m_nPublishedFileId PublishedFileId_t
|
||||
internal Result Result; // m_eResult EResult
|
||||
internal WorkshopFileType FileType; // m_eFileType EWorkshopFileType
|
||||
internal AppId CreatorAppID; // m_nCreatorAppID AppId_t
|
||||
internal AppId ConsumerAppID; // m_nConsumerAppID AppId_t
|
||||
internal string TitleUTF8() => System.Text.Encoding.UTF8.GetString( Title, 0, System.Array.IndexOf<byte>( Title, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 129)] // byte[] m_rgchTitle
|
||||
internal byte[] Title; // m_rgchTitle char [129]
|
||||
internal string DescriptionUTF8() => System.Text.Encoding.UTF8.GetString( Description, 0, System.Array.IndexOf<byte>( Description, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8000)] // byte[] m_rgchDescription
|
||||
internal byte[] Description; // m_rgchDescription char [8000]
|
||||
internal ulong SteamIDOwner; // m_ulSteamIDOwner uint64
|
||||
internal uint TimeCreated; // m_rtimeCreated uint32
|
||||
internal uint TimeUpdated; // m_rtimeUpdated uint32
|
||||
internal uint TimeAddedToUserList; // m_rtimeAddedToUserList uint32
|
||||
internal RemoteStoragePublishedFileVisibility Visibility; // m_eVisibility ERemoteStoragePublishedFileVisibility
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
internal bool Banned; // m_bBanned bool
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
internal bool AcceptedForUse; // m_bAcceptedForUse bool
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
internal bool TagsTruncated; // m_bTagsTruncated bool
|
||||
internal string TagsUTF8() => System.Text.Encoding.UTF8.GetString( Tags, 0, System.Array.IndexOf<byte>( Tags, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1025)] // byte[] m_rgchTags
|
||||
internal byte[] Tags; // m_rgchTags char [1025]
|
||||
internal ulong File; // m_hFile UGCHandle_t
|
||||
internal ulong PreviewFile; // m_hPreviewFile UGCHandle_t
|
||||
internal string PchFileNameUTF8() => System.Text.Encoding.UTF8.GetString( PchFileName, 0, System.Array.IndexOf<byte>( PchFileName, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 260)] // byte[] m_pchFileName
|
||||
internal byte[] PchFileName; // m_pchFileName char [260]
|
||||
internal int FileSize; // m_nFileSize int32
|
||||
internal int PreviewFileSize; // m_nPreviewFileSize int32
|
||||
internal string URLUTF8() => System.Text.Encoding.UTF8.GetString( URL, 0, System.Array.IndexOf<byte>( URL, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] // byte[] m_rgchURL
|
||||
internal byte[] URL; // m_rgchURL char [256]
|
||||
internal uint VotesUp; // m_unVotesUp uint32
|
||||
internal uint VotesDown; // m_unVotesDown uint32
|
||||
internal float Score; // m_flScore float
|
||||
internal uint NumChildren; // m_unNumChildren uint32
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct SteamItemDetails_t
|
||||
{
|
||||
internal InventoryItemId ItemId; // m_itemId SteamItemInstanceID_t
|
||||
internal InventoryDefId Definition; // m_iDefinition SteamItemDef_t
|
||||
internal ushort Quantity; // m_unQuantity uint16
|
||||
internal ushort Flags; // m_unFlags uint16
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct SteamTVRegion_t
|
||||
{
|
||||
internal uint UnMinX; // unMinX uint32
|
||||
internal uint UnMinY; // unMinY uint32
|
||||
internal uint UnMaxX; // unMaxX uint32
|
||||
internal uint UnMaxY; // unMaxY uint32
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct SteamNetworkingQuickConnectionStatus
|
||||
{
|
||||
internal ConnectionState State; // m_eState ESteamNetworkingConnectionState
|
||||
internal int Ping; // m_nPing int
|
||||
internal float ConnectionQualityLocal; // m_flConnectionQualityLocal float
|
||||
internal float ConnectionQualityRemote; // m_flConnectionQualityRemote float
|
||||
internal float OutPacketsPerSec; // m_flOutPacketsPerSec float
|
||||
internal float OutBytesPerSec; // m_flOutBytesPerSec float
|
||||
internal float InPacketsPerSec; // m_flInPacketsPerSec float
|
||||
internal float InBytesPerSec; // m_flInBytesPerSec float
|
||||
internal int SendRateBytesPerSecond; // m_nSendRateBytesPerSecond int
|
||||
internal int CbPendingUnreliable; // m_cbPendingUnreliable int
|
||||
internal int CbPendingReliable; // m_cbPendingReliable int
|
||||
internal int CbSentUnackedReliable; // m_cbSentUnackedReliable int
|
||||
internal long EcQueueTime; // m_usecQueueTime SteamNetworkingMicroseconds
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16, ArraySubType = UnmanagedType.U4)]
|
||||
internal uint[] Reserved; // reserved uint32 [16]
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal partial struct SteamDatagramHostedAddress
|
||||
{
|
||||
internal int CbSize; // m_cbSize int
|
||||
internal string DataUTF8() => System.Text.Encoding.UTF8.GetString( Data, 0, System.Array.IndexOf<byte>( Data, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] m_data
|
||||
internal byte[] Data; // m_data char [128]
|
||||
|
||||
}
|
||||
|
||||
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct SteamDatagramGameCoordinatorServerLogin
|
||||
{
|
||||
internal NetIdentity Dentity; // m_identity SteamNetworkingIdentity
|
||||
internal SteamDatagramHostedAddress Outing; // m_routing SteamDatagramHostedAddress
|
||||
internal AppId AppID; // m_nAppID AppId_t
|
||||
internal uint Time; // m_rtime RTime32
|
||||
internal int CbAppData; // m_cbAppData int
|
||||
internal string AppDataUTF8() => System.Text.Encoding.UTF8.GetString( AppData, 0, System.Array.IndexOf<byte>( AppData, 0 ) );
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2048)] // byte[] m_appData
|
||||
internal byte[] AppData; // m_appData char [2048]
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
841
Facepunch.Steamworks/Generated/SteamTypes.cs
Normal file
841
Facepunch.Steamworks/Generated/SteamTypes.cs
Normal file
@@ -0,0 +1,841 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
internal struct GID_t : IEquatable<GID_t>, IComparable<GID_t>
|
||||
{
|
||||
// Name: GID_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator GID_t( ulong value ) => new GID_t(){ Value = value };
|
||||
public static implicit operator ulong( GID_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (GID_t) p );
|
||||
public bool Equals( GID_t p ) => p.Value == Value;
|
||||
public static bool operator ==( GID_t a, GID_t b ) => a.Equals( b );
|
||||
public static bool operator !=( GID_t a, GID_t b ) => !a.Equals( b );
|
||||
public int CompareTo( GID_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct JobID_t : IEquatable<JobID_t>, IComparable<JobID_t>
|
||||
{
|
||||
// Name: JobID_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator JobID_t( ulong value ) => new JobID_t(){ Value = value };
|
||||
public static implicit operator ulong( JobID_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (JobID_t) p );
|
||||
public bool Equals( JobID_t p ) => p.Value == Value;
|
||||
public static bool operator ==( JobID_t a, JobID_t b ) => a.Equals( b );
|
||||
public static bool operator !=( JobID_t a, JobID_t b ) => !a.Equals( b );
|
||||
public int CompareTo( JobID_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct TxnID_t : IEquatable<TxnID_t>, IComparable<TxnID_t>
|
||||
{
|
||||
// Name: TxnID_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator TxnID_t( ulong value ) => new TxnID_t(){ Value = value };
|
||||
public static implicit operator ulong( TxnID_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (TxnID_t) p );
|
||||
public bool Equals( TxnID_t p ) => p.Value == Value;
|
||||
public static bool operator ==( TxnID_t a, TxnID_t b ) => a.Equals( b );
|
||||
public static bool operator !=( TxnID_t a, TxnID_t b ) => !a.Equals( b );
|
||||
public int CompareTo( TxnID_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct PackageId_t : IEquatable<PackageId_t>, IComparable<PackageId_t>
|
||||
{
|
||||
// Name: PackageId_t, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator PackageId_t( uint value ) => new PackageId_t(){ Value = value };
|
||||
public static implicit operator uint( PackageId_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (PackageId_t) p );
|
||||
public bool Equals( PackageId_t p ) => p.Value == Value;
|
||||
public static bool operator ==( PackageId_t a, PackageId_t b ) => a.Equals( b );
|
||||
public static bool operator !=( PackageId_t a, PackageId_t b ) => !a.Equals( b );
|
||||
public int CompareTo( PackageId_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct BundleId_t : IEquatable<BundleId_t>, IComparable<BundleId_t>
|
||||
{
|
||||
// Name: BundleId_t, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator BundleId_t( uint value ) => new BundleId_t(){ Value = value };
|
||||
public static implicit operator uint( BundleId_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (BundleId_t) p );
|
||||
public bool Equals( BundleId_t p ) => p.Value == Value;
|
||||
public static bool operator ==( BundleId_t a, BundleId_t b ) => a.Equals( b );
|
||||
public static bool operator !=( BundleId_t a, BundleId_t b ) => !a.Equals( b );
|
||||
public int CompareTo( BundleId_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct AssetClassId_t : IEquatable<AssetClassId_t>, IComparable<AssetClassId_t>
|
||||
{
|
||||
// Name: AssetClassId_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator AssetClassId_t( ulong value ) => new AssetClassId_t(){ Value = value };
|
||||
public static implicit operator ulong( AssetClassId_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (AssetClassId_t) p );
|
||||
public bool Equals( AssetClassId_t p ) => p.Value == Value;
|
||||
public static bool operator ==( AssetClassId_t a, AssetClassId_t b ) => a.Equals( b );
|
||||
public static bool operator !=( AssetClassId_t a, AssetClassId_t b ) => !a.Equals( b );
|
||||
public int CompareTo( AssetClassId_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct PhysicalItemId_t : IEquatable<PhysicalItemId_t>, IComparable<PhysicalItemId_t>
|
||||
{
|
||||
// Name: PhysicalItemId_t, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator PhysicalItemId_t( uint value ) => new PhysicalItemId_t(){ Value = value };
|
||||
public static implicit operator uint( PhysicalItemId_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (PhysicalItemId_t) p );
|
||||
public bool Equals( PhysicalItemId_t p ) => p.Value == Value;
|
||||
public static bool operator ==( PhysicalItemId_t a, PhysicalItemId_t b ) => a.Equals( b );
|
||||
public static bool operator !=( PhysicalItemId_t a, PhysicalItemId_t b ) => !a.Equals( b );
|
||||
public int CompareTo( PhysicalItemId_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct DepotId_t : IEquatable<DepotId_t>, IComparable<DepotId_t>
|
||||
{
|
||||
// Name: DepotId_t, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator DepotId_t( uint value ) => new DepotId_t(){ Value = value };
|
||||
public static implicit operator uint( DepotId_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (DepotId_t) p );
|
||||
public bool Equals( DepotId_t p ) => p.Value == Value;
|
||||
public static bool operator ==( DepotId_t a, DepotId_t b ) => a.Equals( b );
|
||||
public static bool operator !=( DepotId_t a, DepotId_t b ) => !a.Equals( b );
|
||||
public int CompareTo( DepotId_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct RTime32 : IEquatable<RTime32>, IComparable<RTime32>
|
||||
{
|
||||
// Name: RTime32, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator RTime32( uint value ) => new RTime32(){ Value = value };
|
||||
public static implicit operator uint( RTime32 value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (RTime32) p );
|
||||
public bool Equals( RTime32 p ) => p.Value == Value;
|
||||
public static bool operator ==( RTime32 a, RTime32 b ) => a.Equals( b );
|
||||
public static bool operator !=( RTime32 a, RTime32 b ) => !a.Equals( b );
|
||||
public int CompareTo( RTime32 other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct CellID_t : IEquatable<CellID_t>, IComparable<CellID_t>
|
||||
{
|
||||
// Name: CellID_t, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator CellID_t( uint value ) => new CellID_t(){ Value = value };
|
||||
public static implicit operator uint( CellID_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (CellID_t) p );
|
||||
public bool Equals( CellID_t p ) => p.Value == Value;
|
||||
public static bool operator ==( CellID_t a, CellID_t b ) => a.Equals( b );
|
||||
public static bool operator !=( CellID_t a, CellID_t b ) => !a.Equals( b );
|
||||
public int CompareTo( CellID_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct SteamAPICall_t : IEquatable<SteamAPICall_t>, IComparable<SteamAPICall_t>
|
||||
{
|
||||
// Name: SteamAPICall_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator SteamAPICall_t( ulong value ) => new SteamAPICall_t(){ Value = value };
|
||||
public static implicit operator ulong( SteamAPICall_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (SteamAPICall_t) p );
|
||||
public bool Equals( SteamAPICall_t p ) => p.Value == Value;
|
||||
public static bool operator ==( SteamAPICall_t a, SteamAPICall_t b ) => a.Equals( b );
|
||||
public static bool operator !=( SteamAPICall_t a, SteamAPICall_t b ) => !a.Equals( b );
|
||||
public int CompareTo( SteamAPICall_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct AccountID_t : IEquatable<AccountID_t>, IComparable<AccountID_t>
|
||||
{
|
||||
// Name: AccountID_t, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator AccountID_t( uint value ) => new AccountID_t(){ Value = value };
|
||||
public static implicit operator uint( AccountID_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (AccountID_t) p );
|
||||
public bool Equals( AccountID_t p ) => p.Value == Value;
|
||||
public static bool operator ==( AccountID_t a, AccountID_t b ) => a.Equals( b );
|
||||
public static bool operator !=( AccountID_t a, AccountID_t b ) => !a.Equals( b );
|
||||
public int CompareTo( AccountID_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct PartnerId_t : IEquatable<PartnerId_t>, IComparable<PartnerId_t>
|
||||
{
|
||||
// Name: PartnerId_t, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator PartnerId_t( uint value ) => new PartnerId_t(){ Value = value };
|
||||
public static implicit operator uint( PartnerId_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (PartnerId_t) p );
|
||||
public bool Equals( PartnerId_t p ) => p.Value == Value;
|
||||
public static bool operator ==( PartnerId_t a, PartnerId_t b ) => a.Equals( b );
|
||||
public static bool operator !=( PartnerId_t a, PartnerId_t b ) => !a.Equals( b );
|
||||
public int CompareTo( PartnerId_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct ManifestId_t : IEquatable<ManifestId_t>, IComparable<ManifestId_t>
|
||||
{
|
||||
// Name: ManifestId_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator ManifestId_t( ulong value ) => new ManifestId_t(){ Value = value };
|
||||
public static implicit operator ulong( ManifestId_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (ManifestId_t) p );
|
||||
public bool Equals( ManifestId_t p ) => p.Value == Value;
|
||||
public static bool operator ==( ManifestId_t a, ManifestId_t b ) => a.Equals( b );
|
||||
public static bool operator !=( ManifestId_t a, ManifestId_t b ) => !a.Equals( b );
|
||||
public int CompareTo( ManifestId_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct SiteId_t : IEquatable<SiteId_t>, IComparable<SiteId_t>
|
||||
{
|
||||
// Name: SiteId_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator SiteId_t( ulong value ) => new SiteId_t(){ Value = value };
|
||||
public static implicit operator ulong( SiteId_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (SiteId_t) p );
|
||||
public bool Equals( SiteId_t p ) => p.Value == Value;
|
||||
public static bool operator ==( SiteId_t a, SiteId_t b ) => a.Equals( b );
|
||||
public static bool operator !=( SiteId_t a, SiteId_t b ) => !a.Equals( b );
|
||||
public int CompareTo( SiteId_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct PartyBeaconID_t : IEquatable<PartyBeaconID_t>, IComparable<PartyBeaconID_t>
|
||||
{
|
||||
// Name: PartyBeaconID_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator PartyBeaconID_t( ulong value ) => new PartyBeaconID_t(){ Value = value };
|
||||
public static implicit operator ulong( PartyBeaconID_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (PartyBeaconID_t) p );
|
||||
public bool Equals( PartyBeaconID_t p ) => p.Value == Value;
|
||||
public static bool operator ==( PartyBeaconID_t a, PartyBeaconID_t b ) => a.Equals( b );
|
||||
public static bool operator !=( PartyBeaconID_t a, PartyBeaconID_t b ) => !a.Equals( b );
|
||||
public int CompareTo( PartyBeaconID_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct HAuthTicket : IEquatable<HAuthTicket>, IComparable<HAuthTicket>
|
||||
{
|
||||
// Name: HAuthTicket, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator HAuthTicket( uint value ) => new HAuthTicket(){ Value = value };
|
||||
public static implicit operator uint( HAuthTicket value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (HAuthTicket) p );
|
||||
public bool Equals( HAuthTicket p ) => p.Value == Value;
|
||||
public static bool operator ==( HAuthTicket a, HAuthTicket b ) => a.Equals( b );
|
||||
public static bool operator !=( HAuthTicket a, HAuthTicket b ) => !a.Equals( b );
|
||||
public int CompareTo( HAuthTicket other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct BREAKPAD_HANDLE : IEquatable<BREAKPAD_HANDLE>, IComparable<BREAKPAD_HANDLE>
|
||||
{
|
||||
// Name: BREAKPAD_HANDLE, Type: void *
|
||||
public IntPtr Value;
|
||||
|
||||
public static implicit operator BREAKPAD_HANDLE( IntPtr value ) => new BREAKPAD_HANDLE(){ Value = value };
|
||||
public static implicit operator IntPtr( BREAKPAD_HANDLE value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (BREAKPAD_HANDLE) p );
|
||||
public bool Equals( BREAKPAD_HANDLE p ) => p.Value == Value;
|
||||
public static bool operator ==( BREAKPAD_HANDLE a, BREAKPAD_HANDLE b ) => a.Equals( b );
|
||||
public static bool operator !=( BREAKPAD_HANDLE a, BREAKPAD_HANDLE b ) => !a.Equals( b );
|
||||
public int CompareTo( BREAKPAD_HANDLE other ) => Value.ToInt64().CompareTo( other.Value.ToInt64() );
|
||||
}
|
||||
|
||||
internal struct HSteamPipe : IEquatable<HSteamPipe>, IComparable<HSteamPipe>
|
||||
{
|
||||
// Name: HSteamPipe, Type: int
|
||||
public int Value;
|
||||
|
||||
public static implicit operator HSteamPipe( int value ) => new HSteamPipe(){ Value = value };
|
||||
public static implicit operator int( HSteamPipe value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (HSteamPipe) p );
|
||||
public bool Equals( HSteamPipe p ) => p.Value == Value;
|
||||
public static bool operator ==( HSteamPipe a, HSteamPipe b ) => a.Equals( b );
|
||||
public static bool operator !=( HSteamPipe a, HSteamPipe b ) => !a.Equals( b );
|
||||
public int CompareTo( HSteamPipe other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct HSteamUser : IEquatable<HSteamUser>, IComparable<HSteamUser>
|
||||
{
|
||||
// Name: HSteamUser, Type: int
|
||||
public int Value;
|
||||
|
||||
public static implicit operator HSteamUser( int value ) => new HSteamUser(){ Value = value };
|
||||
public static implicit operator int( HSteamUser value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (HSteamUser) p );
|
||||
public bool Equals( HSteamUser p ) => p.Value == Value;
|
||||
public static bool operator ==( HSteamUser a, HSteamUser b ) => a.Equals( b );
|
||||
public static bool operator !=( HSteamUser a, HSteamUser b ) => !a.Equals( b );
|
||||
public int CompareTo( HSteamUser other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct FriendsGroupID_t : IEquatable<FriendsGroupID_t>, IComparable<FriendsGroupID_t>
|
||||
{
|
||||
// Name: FriendsGroupID_t, Type: short
|
||||
public short Value;
|
||||
|
||||
public static implicit operator FriendsGroupID_t( short value ) => new FriendsGroupID_t(){ Value = value };
|
||||
public static implicit operator short( FriendsGroupID_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (FriendsGroupID_t) p );
|
||||
public bool Equals( FriendsGroupID_t p ) => p.Value == Value;
|
||||
public static bool operator ==( FriendsGroupID_t a, FriendsGroupID_t b ) => a.Equals( b );
|
||||
public static bool operator !=( FriendsGroupID_t a, FriendsGroupID_t b ) => !a.Equals( b );
|
||||
public int CompareTo( FriendsGroupID_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct HServerListRequest : IEquatable<HServerListRequest>, IComparable<HServerListRequest>
|
||||
{
|
||||
// Name: HServerListRequest, Type: void *
|
||||
public IntPtr Value;
|
||||
|
||||
public static implicit operator HServerListRequest( IntPtr value ) => new HServerListRequest(){ Value = value };
|
||||
public static implicit operator IntPtr( HServerListRequest value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (HServerListRequest) p );
|
||||
public bool Equals( HServerListRequest p ) => p.Value == Value;
|
||||
public static bool operator ==( HServerListRequest a, HServerListRequest b ) => a.Equals( b );
|
||||
public static bool operator !=( HServerListRequest a, HServerListRequest b ) => !a.Equals( b );
|
||||
public int CompareTo( HServerListRequest other ) => Value.ToInt64().CompareTo( other.Value.ToInt64() );
|
||||
}
|
||||
|
||||
internal struct HServerQuery : IEquatable<HServerQuery>, IComparable<HServerQuery>
|
||||
{
|
||||
// Name: HServerQuery, Type: int
|
||||
public int Value;
|
||||
|
||||
public static implicit operator HServerQuery( int value ) => new HServerQuery(){ Value = value };
|
||||
public static implicit operator int( HServerQuery value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (HServerQuery) p );
|
||||
public bool Equals( HServerQuery p ) => p.Value == Value;
|
||||
public static bool operator ==( HServerQuery a, HServerQuery b ) => a.Equals( b );
|
||||
public static bool operator !=( HServerQuery a, HServerQuery b ) => !a.Equals( b );
|
||||
public int CompareTo( HServerQuery other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct UGCHandle_t : IEquatable<UGCHandle_t>, IComparable<UGCHandle_t>
|
||||
{
|
||||
// Name: UGCHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator UGCHandle_t( ulong value ) => new UGCHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( UGCHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (UGCHandle_t) p );
|
||||
public bool Equals( UGCHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( UGCHandle_t a, UGCHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( UGCHandle_t a, UGCHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( UGCHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct PublishedFileUpdateHandle_t : IEquatable<PublishedFileUpdateHandle_t>, IComparable<PublishedFileUpdateHandle_t>
|
||||
{
|
||||
// Name: PublishedFileUpdateHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator PublishedFileUpdateHandle_t( ulong value ) => new PublishedFileUpdateHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( PublishedFileUpdateHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (PublishedFileUpdateHandle_t) p );
|
||||
public bool Equals( PublishedFileUpdateHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( PublishedFileUpdateHandle_t a, PublishedFileUpdateHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( PublishedFileUpdateHandle_t a, PublishedFileUpdateHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( PublishedFileUpdateHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
public struct PublishedFileId : IEquatable<PublishedFileId>, IComparable<PublishedFileId>
|
||||
{
|
||||
// Name: PublishedFileId_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator PublishedFileId( ulong value ) => new PublishedFileId(){ Value = value };
|
||||
public static implicit operator ulong( PublishedFileId value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (PublishedFileId) p );
|
||||
public bool Equals( PublishedFileId p ) => p.Value == Value;
|
||||
public static bool operator ==( PublishedFileId a, PublishedFileId b ) => a.Equals( b );
|
||||
public static bool operator !=( PublishedFileId a, PublishedFileId b ) => !a.Equals( b );
|
||||
public int CompareTo( PublishedFileId other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct UGCFileWriteStreamHandle_t : IEquatable<UGCFileWriteStreamHandle_t>, IComparable<UGCFileWriteStreamHandle_t>
|
||||
{
|
||||
// Name: UGCFileWriteStreamHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator UGCFileWriteStreamHandle_t( ulong value ) => new UGCFileWriteStreamHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( UGCFileWriteStreamHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (UGCFileWriteStreamHandle_t) p );
|
||||
public bool Equals( UGCFileWriteStreamHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( UGCFileWriteStreamHandle_t a, UGCFileWriteStreamHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( UGCFileWriteStreamHandle_t a, UGCFileWriteStreamHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( UGCFileWriteStreamHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct SteamLeaderboard_t : IEquatable<SteamLeaderboard_t>, IComparable<SteamLeaderboard_t>
|
||||
{
|
||||
// Name: SteamLeaderboard_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator SteamLeaderboard_t( ulong value ) => new SteamLeaderboard_t(){ Value = value };
|
||||
public static implicit operator ulong( SteamLeaderboard_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (SteamLeaderboard_t) p );
|
||||
public bool Equals( SteamLeaderboard_t p ) => p.Value == Value;
|
||||
public static bool operator ==( SteamLeaderboard_t a, SteamLeaderboard_t b ) => a.Equals( b );
|
||||
public static bool operator !=( SteamLeaderboard_t a, SteamLeaderboard_t b ) => !a.Equals( b );
|
||||
public int CompareTo( SteamLeaderboard_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct SteamLeaderboardEntries_t : IEquatable<SteamLeaderboardEntries_t>, IComparable<SteamLeaderboardEntries_t>
|
||||
{
|
||||
// Name: SteamLeaderboardEntries_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator SteamLeaderboardEntries_t( ulong value ) => new SteamLeaderboardEntries_t(){ Value = value };
|
||||
public static implicit operator ulong( SteamLeaderboardEntries_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (SteamLeaderboardEntries_t) p );
|
||||
public bool Equals( SteamLeaderboardEntries_t p ) => p.Value == Value;
|
||||
public static bool operator ==( SteamLeaderboardEntries_t a, SteamLeaderboardEntries_t b ) => a.Equals( b );
|
||||
public static bool operator !=( SteamLeaderboardEntries_t a, SteamLeaderboardEntries_t b ) => !a.Equals( b );
|
||||
public int CompareTo( SteamLeaderboardEntries_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct SNetSocket_t : IEquatable<SNetSocket_t>, IComparable<SNetSocket_t>
|
||||
{
|
||||
// Name: SNetSocket_t, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator SNetSocket_t( uint value ) => new SNetSocket_t(){ Value = value };
|
||||
public static implicit operator uint( SNetSocket_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (SNetSocket_t) p );
|
||||
public bool Equals( SNetSocket_t p ) => p.Value == Value;
|
||||
public static bool operator ==( SNetSocket_t a, SNetSocket_t b ) => a.Equals( b );
|
||||
public static bool operator !=( SNetSocket_t a, SNetSocket_t b ) => !a.Equals( b );
|
||||
public int CompareTo( SNetSocket_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct SNetListenSocket_t : IEquatable<SNetListenSocket_t>, IComparable<SNetListenSocket_t>
|
||||
{
|
||||
// Name: SNetListenSocket_t, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator SNetListenSocket_t( uint value ) => new SNetListenSocket_t(){ Value = value };
|
||||
public static implicit operator uint( SNetListenSocket_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (SNetListenSocket_t) p );
|
||||
public bool Equals( SNetListenSocket_t p ) => p.Value == Value;
|
||||
public static bool operator ==( SNetListenSocket_t a, SNetListenSocket_t b ) => a.Equals( b );
|
||||
public static bool operator !=( SNetListenSocket_t a, SNetListenSocket_t b ) => !a.Equals( b );
|
||||
public int CompareTo( SNetListenSocket_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct ScreenshotHandle : IEquatable<ScreenshotHandle>, IComparable<ScreenshotHandle>
|
||||
{
|
||||
// Name: ScreenshotHandle, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator ScreenshotHandle( uint value ) => new ScreenshotHandle(){ Value = value };
|
||||
public static implicit operator uint( ScreenshotHandle value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (ScreenshotHandle) p );
|
||||
public bool Equals( ScreenshotHandle p ) => p.Value == Value;
|
||||
public static bool operator ==( ScreenshotHandle a, ScreenshotHandle b ) => a.Equals( b );
|
||||
public static bool operator !=( ScreenshotHandle a, ScreenshotHandle b ) => !a.Equals( b );
|
||||
public int CompareTo( ScreenshotHandle other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct HTTPRequestHandle : IEquatable<HTTPRequestHandle>, IComparable<HTTPRequestHandle>
|
||||
{
|
||||
// Name: HTTPRequestHandle, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator HTTPRequestHandle( uint value ) => new HTTPRequestHandle(){ Value = value };
|
||||
public static implicit operator uint( HTTPRequestHandle value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (HTTPRequestHandle) p );
|
||||
public bool Equals( HTTPRequestHandle p ) => p.Value == Value;
|
||||
public static bool operator ==( HTTPRequestHandle a, HTTPRequestHandle b ) => a.Equals( b );
|
||||
public static bool operator !=( HTTPRequestHandle a, HTTPRequestHandle b ) => !a.Equals( b );
|
||||
public int CompareTo( HTTPRequestHandle other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct HTTPCookieContainerHandle : IEquatable<HTTPCookieContainerHandle>, IComparable<HTTPCookieContainerHandle>
|
||||
{
|
||||
// Name: HTTPCookieContainerHandle, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator HTTPCookieContainerHandle( uint value ) => new HTTPCookieContainerHandle(){ Value = value };
|
||||
public static implicit operator uint( HTTPCookieContainerHandle value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (HTTPCookieContainerHandle) p );
|
||||
public bool Equals( HTTPCookieContainerHandle p ) => p.Value == Value;
|
||||
public static bool operator ==( HTTPCookieContainerHandle a, HTTPCookieContainerHandle b ) => a.Equals( b );
|
||||
public static bool operator !=( HTTPCookieContainerHandle a, HTTPCookieContainerHandle b ) => !a.Equals( b );
|
||||
public int CompareTo( HTTPCookieContainerHandle other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct InputHandle_t : IEquatable<InputHandle_t>, IComparable<InputHandle_t>
|
||||
{
|
||||
// Name: InputHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator InputHandle_t( ulong value ) => new InputHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( InputHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (InputHandle_t) p );
|
||||
public bool Equals( InputHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( InputHandle_t a, InputHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( InputHandle_t a, InputHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( InputHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct InputActionSetHandle_t : IEquatable<InputActionSetHandle_t>, IComparable<InputActionSetHandle_t>
|
||||
{
|
||||
// Name: InputActionSetHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator InputActionSetHandle_t( ulong value ) => new InputActionSetHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( InputActionSetHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (InputActionSetHandle_t) p );
|
||||
public bool Equals( InputActionSetHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( InputActionSetHandle_t a, InputActionSetHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( InputActionSetHandle_t a, InputActionSetHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( InputActionSetHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct InputDigitalActionHandle_t : IEquatable<InputDigitalActionHandle_t>, IComparable<InputDigitalActionHandle_t>
|
||||
{
|
||||
// Name: InputDigitalActionHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator InputDigitalActionHandle_t( ulong value ) => new InputDigitalActionHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( InputDigitalActionHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (InputDigitalActionHandle_t) p );
|
||||
public bool Equals( InputDigitalActionHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( InputDigitalActionHandle_t a, InputDigitalActionHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( InputDigitalActionHandle_t a, InputDigitalActionHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( InputDigitalActionHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct InputAnalogActionHandle_t : IEquatable<InputAnalogActionHandle_t>, IComparable<InputAnalogActionHandle_t>
|
||||
{
|
||||
// Name: InputAnalogActionHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator InputAnalogActionHandle_t( ulong value ) => new InputAnalogActionHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( InputAnalogActionHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (InputAnalogActionHandle_t) p );
|
||||
public bool Equals( InputAnalogActionHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( InputAnalogActionHandle_t a, InputAnalogActionHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( InputAnalogActionHandle_t a, InputAnalogActionHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( InputAnalogActionHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct ControllerHandle_t : IEquatable<ControllerHandle_t>, IComparable<ControllerHandle_t>
|
||||
{
|
||||
// Name: ControllerHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator ControllerHandle_t( ulong value ) => new ControllerHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( ControllerHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (ControllerHandle_t) p );
|
||||
public bool Equals( ControllerHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( ControllerHandle_t a, ControllerHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( ControllerHandle_t a, ControllerHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( ControllerHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct ControllerActionSetHandle_t : IEquatable<ControllerActionSetHandle_t>, IComparable<ControllerActionSetHandle_t>
|
||||
{
|
||||
// Name: ControllerActionSetHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator ControllerActionSetHandle_t( ulong value ) => new ControllerActionSetHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( ControllerActionSetHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (ControllerActionSetHandle_t) p );
|
||||
public bool Equals( ControllerActionSetHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( ControllerActionSetHandle_t a, ControllerActionSetHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( ControllerActionSetHandle_t a, ControllerActionSetHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( ControllerActionSetHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct ControllerDigitalActionHandle_t : IEquatable<ControllerDigitalActionHandle_t>, IComparable<ControllerDigitalActionHandle_t>
|
||||
{
|
||||
// Name: ControllerDigitalActionHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator ControllerDigitalActionHandle_t( ulong value ) => new ControllerDigitalActionHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( ControllerDigitalActionHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (ControllerDigitalActionHandle_t) p );
|
||||
public bool Equals( ControllerDigitalActionHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( ControllerDigitalActionHandle_t a, ControllerDigitalActionHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( ControllerDigitalActionHandle_t a, ControllerDigitalActionHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( ControllerDigitalActionHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct ControllerAnalogActionHandle_t : IEquatable<ControllerAnalogActionHandle_t>, IComparable<ControllerAnalogActionHandle_t>
|
||||
{
|
||||
// Name: ControllerAnalogActionHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator ControllerAnalogActionHandle_t( ulong value ) => new ControllerAnalogActionHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( ControllerAnalogActionHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (ControllerAnalogActionHandle_t) p );
|
||||
public bool Equals( ControllerAnalogActionHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( ControllerAnalogActionHandle_t a, ControllerAnalogActionHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( ControllerAnalogActionHandle_t a, ControllerAnalogActionHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( ControllerAnalogActionHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct UGCQueryHandle_t : IEquatable<UGCQueryHandle_t>, IComparable<UGCQueryHandle_t>
|
||||
{
|
||||
// Name: UGCQueryHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator UGCQueryHandle_t( ulong value ) => new UGCQueryHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( UGCQueryHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (UGCQueryHandle_t) p );
|
||||
public bool Equals( UGCQueryHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( UGCQueryHandle_t a, UGCQueryHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( UGCQueryHandle_t a, UGCQueryHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( UGCQueryHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct UGCUpdateHandle_t : IEquatable<UGCUpdateHandle_t>, IComparable<UGCUpdateHandle_t>
|
||||
{
|
||||
// Name: UGCUpdateHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator UGCUpdateHandle_t( ulong value ) => new UGCUpdateHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( UGCUpdateHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (UGCUpdateHandle_t) p );
|
||||
public bool Equals( UGCUpdateHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( UGCUpdateHandle_t a, UGCUpdateHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( UGCUpdateHandle_t a, UGCUpdateHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( UGCUpdateHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct HHTMLBrowser : IEquatable<HHTMLBrowser>, IComparable<HHTMLBrowser>
|
||||
{
|
||||
// Name: HHTMLBrowser, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator HHTMLBrowser( uint value ) => new HHTMLBrowser(){ Value = value };
|
||||
public static implicit operator uint( HHTMLBrowser value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (HHTMLBrowser) p );
|
||||
public bool Equals( HHTMLBrowser p ) => p.Value == Value;
|
||||
public static bool operator ==( HHTMLBrowser a, HHTMLBrowser b ) => a.Equals( b );
|
||||
public static bool operator !=( HHTMLBrowser a, HHTMLBrowser b ) => !a.Equals( b );
|
||||
public int CompareTo( HHTMLBrowser other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
public struct InventoryItemId : IEquatable<InventoryItemId>, IComparable<InventoryItemId>
|
||||
{
|
||||
// Name: SteamItemInstanceID_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator InventoryItemId( ulong value ) => new InventoryItemId(){ Value = value };
|
||||
public static implicit operator ulong( InventoryItemId value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (InventoryItemId) p );
|
||||
public bool Equals( InventoryItemId p ) => p.Value == Value;
|
||||
public static bool operator ==( InventoryItemId a, InventoryItemId b ) => a.Equals( b );
|
||||
public static bool operator !=( InventoryItemId a, InventoryItemId b ) => !a.Equals( b );
|
||||
public int CompareTo( InventoryItemId other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
public struct InventoryDefId : IEquatable<InventoryDefId>, IComparable<InventoryDefId>
|
||||
{
|
||||
// Name: SteamItemDef_t, Type: int
|
||||
public int Value;
|
||||
|
||||
public static implicit operator InventoryDefId( int value ) => new InventoryDefId(){ Value = value };
|
||||
public static implicit operator int( InventoryDefId value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (InventoryDefId) p );
|
||||
public bool Equals( InventoryDefId p ) => p.Value == Value;
|
||||
public static bool operator ==( InventoryDefId a, InventoryDefId b ) => a.Equals( b );
|
||||
public static bool operator !=( InventoryDefId a, InventoryDefId b ) => !a.Equals( b );
|
||||
public int CompareTo( InventoryDefId other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct SteamInventoryResult_t : IEquatable<SteamInventoryResult_t>, IComparable<SteamInventoryResult_t>
|
||||
{
|
||||
// Name: SteamInventoryResult_t, Type: int
|
||||
public int Value;
|
||||
|
||||
public static implicit operator SteamInventoryResult_t( int value ) => new SteamInventoryResult_t(){ Value = value };
|
||||
public static implicit operator int( SteamInventoryResult_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (SteamInventoryResult_t) p );
|
||||
public bool Equals( SteamInventoryResult_t p ) => p.Value == Value;
|
||||
public static bool operator ==( SteamInventoryResult_t a, SteamInventoryResult_t b ) => a.Equals( b );
|
||||
public static bool operator !=( SteamInventoryResult_t a, SteamInventoryResult_t b ) => !a.Equals( b );
|
||||
public int CompareTo( SteamInventoryResult_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct SteamInventoryUpdateHandle_t : IEquatable<SteamInventoryUpdateHandle_t>, IComparable<SteamInventoryUpdateHandle_t>
|
||||
{
|
||||
// Name: SteamInventoryUpdateHandle_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator SteamInventoryUpdateHandle_t( ulong value ) => new SteamInventoryUpdateHandle_t(){ Value = value };
|
||||
public static implicit operator ulong( SteamInventoryUpdateHandle_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (SteamInventoryUpdateHandle_t) p );
|
||||
public bool Equals( SteamInventoryUpdateHandle_t p ) => p.Value == Value;
|
||||
public static bool operator ==( SteamInventoryUpdateHandle_t a, SteamInventoryUpdateHandle_t b ) => a.Equals( b );
|
||||
public static bool operator !=( SteamInventoryUpdateHandle_t a, SteamInventoryUpdateHandle_t b ) => !a.Equals( b );
|
||||
public int CompareTo( SteamInventoryUpdateHandle_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct RemotePlaySessionID_t : IEquatable<RemotePlaySessionID_t>, IComparable<RemotePlaySessionID_t>
|
||||
{
|
||||
// Name: RemotePlaySessionID_t, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator RemotePlaySessionID_t( uint value ) => new RemotePlaySessionID_t(){ Value = value };
|
||||
public static implicit operator uint( RemotePlaySessionID_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (RemotePlaySessionID_t) p );
|
||||
public bool Equals( RemotePlaySessionID_t p ) => p.Value == Value;
|
||||
public static bool operator ==( RemotePlaySessionID_t a, RemotePlaySessionID_t b ) => a.Equals( b );
|
||||
public static bool operator !=( RemotePlaySessionID_t a, RemotePlaySessionID_t b ) => !a.Equals( b );
|
||||
public int CompareTo( RemotePlaySessionID_t other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct HSteamNetPollGroup : IEquatable<HSteamNetPollGroup>, IComparable<HSteamNetPollGroup>
|
||||
{
|
||||
// Name: HSteamNetPollGroup, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator HSteamNetPollGroup( uint value ) => new HSteamNetPollGroup(){ Value = value };
|
||||
public static implicit operator uint( HSteamNetPollGroup value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (HSteamNetPollGroup) p );
|
||||
public bool Equals( HSteamNetPollGroup p ) => p.Value == Value;
|
||||
public static bool operator ==( HSteamNetPollGroup a, HSteamNetPollGroup b ) => a.Equals( b );
|
||||
public static bool operator !=( HSteamNetPollGroup a, HSteamNetPollGroup b ) => !a.Equals( b );
|
||||
public int CompareTo( HSteamNetPollGroup other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
internal struct SteamNetworkingPOPID : IEquatable<SteamNetworkingPOPID>, IComparable<SteamNetworkingPOPID>
|
||||
{
|
||||
// Name: SteamNetworkingPOPID, Type: unsigned int
|
||||
public uint Value;
|
||||
|
||||
public static implicit operator SteamNetworkingPOPID( uint value ) => new SteamNetworkingPOPID(){ Value = value };
|
||||
public static implicit operator uint( SteamNetworkingPOPID value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (SteamNetworkingPOPID) p );
|
||||
public bool Equals( SteamNetworkingPOPID p ) => p.Value == Value;
|
||||
public static bool operator ==( SteamNetworkingPOPID a, SteamNetworkingPOPID b ) => a.Equals( b );
|
||||
public static bool operator !=( SteamNetworkingPOPID a, SteamNetworkingPOPID b ) => !a.Equals( b );
|
||||
public int CompareTo( SteamNetworkingPOPID other ) => Value.CompareTo( other.Value );
|
||||
}
|
||||
|
||||
}
|
||||
125
Facepunch.Steamworks/Networking/Connection.cs
Normal file
125
Facepunch.Steamworks/Networking/Connection.cs
Normal file
@@ -0,0 +1,125 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Used as a base to create your client connection. This creates a socket
|
||||
/// to a single connection.
|
||||
///
|
||||
/// You can override all the virtual functions to turn it into what you
|
||||
/// want it to do.
|
||||
/// </summary>
|
||||
public struct Connection
|
||||
{
|
||||
public uint Id { get; set; }
|
||||
|
||||
public override string ToString() => Id.ToString();
|
||||
public static implicit operator Connection( uint value ) => new Connection() { Id = value };
|
||||
public static implicit operator uint( Connection value ) => value.Id;
|
||||
|
||||
/// <summary>
|
||||
/// Accept an incoming connection that has been received on a listen socket.
|
||||
/// </summary>
|
||||
public Result Accept()
|
||||
{
|
||||
return SteamNetworkingSockets.Internal.AcceptConnection( this );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Disconnects from the remote host and invalidates the connection handle. Any unread data on the connection is discarded..
|
||||
/// reasonCode is defined and used by you.
|
||||
/// </summary>
|
||||
public bool Close( bool linger = false, int reasonCode = 0, string debugString = "Closing Connection" )
|
||||
{
|
||||
return SteamNetworkingSockets.Internal.CloseConnection( this, reasonCode, debugString, linger );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get/Set connection user data
|
||||
/// </summary>
|
||||
public long UserData
|
||||
{
|
||||
get => SteamNetworkingSockets.Internal.GetConnectionUserData( this );
|
||||
set => SteamNetworkingSockets.Internal.SetConnectionUserData( this, value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A name for the connection, used mostly for debugging
|
||||
/// </summary>
|
||||
public string ConnectionName
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( !SteamNetworkingSockets.Internal.GetConnectionName( this, out var strVal ) )
|
||||
return "ERROR";
|
||||
|
||||
return strVal;
|
||||
}
|
||||
|
||||
set => SteamNetworkingSockets.Internal.SetConnectionName( this, value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is the best version to use.
|
||||
/// </summary>
|
||||
public Result SendMessage( IntPtr ptr, int size, SendType sendType = SendType.Reliable )
|
||||
{
|
||||
long messageNumber = 0;
|
||||
return SteamNetworkingSockets.Internal.SendMessageToConnection( this, ptr, (uint) size, (int)sendType, ref messageNumber );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ideally should be using an IntPtr version unless you're being really careful with the byte[] array and
|
||||
/// you're not creating a new one every frame (like using .ToArray())
|
||||
/// </summary>
|
||||
public unsafe Result SendMessage( byte[] data, SendType sendType = SendType.Reliable )
|
||||
{
|
||||
fixed ( byte* ptr = data )
|
||||
{
|
||||
return SendMessage( (IntPtr)ptr, data.Length, sendType );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ideally should be using an IntPtr version unless you're being really careful with the byte[] array and
|
||||
/// you're not creating a new one every frame (like using .ToArray())
|
||||
/// </summary>
|
||||
public unsafe Result SendMessage( byte[] data, int offset, int length, SendType sendType = SendType.Reliable )
|
||||
{
|
||||
fixed ( byte* ptr = data )
|
||||
{
|
||||
return SendMessage( (IntPtr)ptr + offset, length, sendType );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This creates a ton of garbage - so don't do anything with this beyond testing!
|
||||
/// </summary>
|
||||
public unsafe Result SendMessage( string str, SendType sendType = SendType.Reliable )
|
||||
{
|
||||
var bytes = System.Text.Encoding.UTF8.GetBytes( str );
|
||||
return SendMessage( bytes, sendType );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flush any messages waiting on the Nagle timer and send them at the next transmission
|
||||
/// opportunity (often that means right now).
|
||||
/// </summary>
|
||||
public Result Flush() => SteamNetworkingSockets.Internal.FlushMessagesOnConnection( this );
|
||||
|
||||
/// <summary>
|
||||
/// Returns detailed connection stats in text format. Useful
|
||||
/// for dumping to a log, etc.
|
||||
/// </summary>
|
||||
/// <returns>Plain text connection info</returns>
|
||||
public string DetailedStatus()
|
||||
{
|
||||
if ( SteamNetworkingSockets.Internal.GetDetailedConnectionStatus( this, out var strVal ) != 0 )
|
||||
return null;
|
||||
|
||||
return strVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Facepunch.Steamworks/Networking/ConnectionInfo.cs
Normal file
45
Facepunch.Steamworks/Networking/ConnectionInfo.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Describe the state of a connection
|
||||
/// </summary>
|
||||
[StructLayout( LayoutKind.Sequential, Size = 696 )]
|
||||
public struct ConnectionInfo
|
||||
{
|
||||
internal NetIdentity identity;
|
||||
internal long userData;
|
||||
internal Socket listenSocket;
|
||||
internal NetAddress address;
|
||||
internal ushort pad;
|
||||
internal SteamNetworkingPOPID popRemote;
|
||||
internal SteamNetworkingPOPID popRelay;
|
||||
internal ConnectionState state;
|
||||
internal int endReason;
|
||||
[MarshalAs( UnmanagedType.ByValTStr, SizeConst = 128 )]
|
||||
internal string endDebug;
|
||||
[MarshalAs( UnmanagedType.ByValTStr, SizeConst = 128 )]
|
||||
internal string connectionDescription;
|
||||
|
||||
/// <summary>
|
||||
/// High level state of the connection
|
||||
/// </summary>
|
||||
public ConnectionState State => state;
|
||||
|
||||
/// <summary>
|
||||
/// Remote address. Might be all 0's if we don't know it, or if this is N/A.
|
||||
/// </summary>
|
||||
public NetAddress Address => address;
|
||||
|
||||
/// <summary>
|
||||
/// Who is on the other end? Depending on the connection type and phase of the connection, we might not know
|
||||
/// </summary>
|
||||
public NetIdentity Identity => identity;
|
||||
|
||||
/// <summary>
|
||||
/// Basic cause of the connection termination or problem.
|
||||
/// </summary>
|
||||
public NetConnectionEnd EndReason => (NetConnectionEnd)endReason;
|
||||
}
|
||||
}
|
||||
142
Facepunch.Steamworks/Networking/ConnectionManager.cs
Normal file
142
Facepunch.Steamworks/Networking/ConnectionManager.cs
Normal file
@@ -0,0 +1,142 @@
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
public class ConnectionManager
|
||||
{
|
||||
/// <summary>
|
||||
/// An optional interface to use instead of deriving
|
||||
/// </summary>
|
||||
public IConnectionManager Interface { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The actual connection we're managing
|
||||
/// </summary>
|
||||
public Connection Connection;
|
||||
|
||||
/// <summary>
|
||||
/// The last received ConnectionInfo
|
||||
/// </summary>
|
||||
public ConnectionInfo ConnectionInfo { get; internal set; }
|
||||
|
||||
public bool Connected = false;
|
||||
public bool Connecting = true;
|
||||
|
||||
public string ConnectionName
|
||||
{
|
||||
get => Connection.ConnectionName;
|
||||
set => Connection.ConnectionName = value;
|
||||
}
|
||||
|
||||
public long UserData
|
||||
{
|
||||
get => Connection.UserData;
|
||||
set => Connection.UserData = value;
|
||||
}
|
||||
|
||||
public void Close() => Connection.Close();
|
||||
|
||||
public override string ToString() => Connection.ToString();
|
||||
|
||||
public virtual void OnConnectionChanged( ConnectionInfo info )
|
||||
{
|
||||
ConnectionInfo = info;
|
||||
|
||||
switch ( info.State )
|
||||
{
|
||||
case ConnectionState.Connecting:
|
||||
OnConnecting( info );
|
||||
break;
|
||||
case ConnectionState.Connected:
|
||||
OnConnected( info );
|
||||
break;
|
||||
case ConnectionState.ClosedByPeer:
|
||||
case ConnectionState.ProblemDetectedLocally:
|
||||
case ConnectionState.None:
|
||||
OnDisconnected( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We're trying to connect!
|
||||
/// </summary>
|
||||
public virtual void OnConnecting( ConnectionInfo info )
|
||||
{
|
||||
Interface?.OnConnecting( info );
|
||||
|
||||
Connecting = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Client is connected. They move from connecting to Connections
|
||||
/// </summary>
|
||||
public virtual void OnConnected( ConnectionInfo info )
|
||||
{
|
||||
Interface?.OnConnected( info );
|
||||
|
||||
Connected = true;
|
||||
Connecting = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The connection has been closed remotely or disconnected locally. Check data.State for details.
|
||||
/// </summary>
|
||||
public virtual void OnDisconnected( ConnectionInfo info )
|
||||
{
|
||||
Interface?.OnDisconnected( info );
|
||||
|
||||
Connected = false;
|
||||
Connecting = false;
|
||||
}
|
||||
|
||||
public void Receive( int bufferSize = 32 )
|
||||
{
|
||||
int processed = 0;
|
||||
IntPtr messageBuffer = Marshal.AllocHGlobal( IntPtr.Size * bufferSize );
|
||||
|
||||
try
|
||||
{
|
||||
processed = SteamNetworkingSockets.Internal.ReceiveMessagesOnConnection( Connection, messageBuffer, bufferSize );
|
||||
|
||||
for ( int i = 0; i < processed; i++ )
|
||||
{
|
||||
ReceiveMessage( Marshal.ReadIntPtr( messageBuffer, i * IntPtr.Size ) );
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Marshal.FreeHGlobal( messageBuffer );
|
||||
}
|
||||
|
||||
//
|
||||
// Overwhelmed our buffer, keep going
|
||||
//
|
||||
if ( processed == bufferSize )
|
||||
Receive( bufferSize );
|
||||
}
|
||||
|
||||
internal unsafe void ReceiveMessage( IntPtr msgPtr )
|
||||
{
|
||||
var msg = Marshal.PtrToStructure<NetMsg>( msgPtr );
|
||||
try
|
||||
{
|
||||
OnMessage( msg.DataPtr, msg.DataSize, msg.RecvTime, msg.MessageNumber, msg.Channel );
|
||||
}
|
||||
finally
|
||||
{
|
||||
//
|
||||
// Releases the message
|
||||
//
|
||||
NetMsg.InternalRelease( (NetMsg*) msgPtr );
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnMessage( IntPtr data, int size, long messageNum, long recvTime, int channel )
|
||||
{
|
||||
Interface?.OnMessage( data, size, messageNum, recvTime, channel );
|
||||
}
|
||||
}
|
||||
}
|
||||
28
Facepunch.Steamworks/Networking/IConnectionManager.cs
Normal file
28
Facepunch.Steamworks/Networking/IConnectionManager.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
public interface IConnectionManager
|
||||
{
|
||||
/// <summary>
|
||||
/// We started connecting to this guy
|
||||
/// </summary>
|
||||
void OnConnecting( ConnectionInfo info );
|
||||
|
||||
/// <summary>
|
||||
/// Called when the connection is fully connected and can start being communicated with
|
||||
/// </summary>
|
||||
void OnConnected( ConnectionInfo info );
|
||||
|
||||
/// <summary>
|
||||
/// We got disconnected
|
||||
/// </summary>
|
||||
void OnDisconnected( ConnectionInfo info );
|
||||
|
||||
/// <summary>
|
||||
/// Received a message
|
||||
/// </summary>
|
||||
void OnMessage( IntPtr data, int size, long messageNum, long recvTime, int channel );
|
||||
}
|
||||
}
|
||||
28
Facepunch.Steamworks/Networking/ISocketManager.cs
Normal file
28
Facepunch.Steamworks/Networking/ISocketManager.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
public interface ISocketManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Must call Accept or Close on the connection within a second or so
|
||||
/// </summary>
|
||||
void OnConnecting( Connection connection, ConnectionInfo info );
|
||||
|
||||
/// <summary>
|
||||
/// Called when the connection is fully connected and can start being communicated with
|
||||
/// </summary>
|
||||
void OnConnected( Connection connection, ConnectionInfo info );
|
||||
|
||||
/// <summary>
|
||||
/// Called when the connection leaves
|
||||
/// </summary>
|
||||
void OnDisconnected( Connection connection, ConnectionInfo info );
|
||||
|
||||
/// <summary>
|
||||
/// Received a message from a connection
|
||||
/// </summary>
|
||||
void OnMessage( Connection connection, NetIdentity identity, IntPtr data, int size, long messageNum, long recvTime, int channel );
|
||||
}
|
||||
}
|
||||
156
Facepunch.Steamworks/Networking/NetAddress.cs
Normal file
156
Facepunch.Steamworks/Networking/NetAddress.cs
Normal file
@@ -0,0 +1,156 @@
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
[StructLayout( LayoutKind.Explicit, Size = 18, Pack = 1 )]
|
||||
public partial struct NetAddress
|
||||
{
|
||||
[FieldOffset( 0 )]
|
||||
internal IPV4 ip;
|
||||
|
||||
[FieldOffset( 16 )]
|
||||
internal ushort port;
|
||||
|
||||
internal struct IPV4
|
||||
{
|
||||
internal ulong m_8zeros;
|
||||
internal ushort m_0000;
|
||||
internal ushort m_ffff;
|
||||
internal byte ip0;
|
||||
internal byte ip1;
|
||||
internal byte ip2;
|
||||
internal byte ip3;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The Port. This is redundant documentation.
|
||||
/// </summary>
|
||||
public ushort Port => port;
|
||||
|
||||
/// <summary>
|
||||
/// Any IP, specific port
|
||||
/// </summary>
|
||||
public static NetAddress AnyIp( ushort port )
|
||||
{
|
||||
var addr = Cleared;
|
||||
addr.port = port;
|
||||
return addr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Localhost IP, specific port
|
||||
/// </summary>
|
||||
public static NetAddress LocalHost( ushort port )
|
||||
{
|
||||
var local = Cleared;
|
||||
InternalSetIPv6LocalHost( ref local, port );
|
||||
return local;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specific IP, specific port
|
||||
/// </summary>
|
||||
public static NetAddress From( string addrStr, ushort port )
|
||||
{
|
||||
return From( IPAddress.Parse( addrStr ), port );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specific IP, specific port
|
||||
/// </summary>
|
||||
public static NetAddress From( IPAddress address, ushort port )
|
||||
{
|
||||
var addr = address.GetAddressBytes();
|
||||
|
||||
if ( address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork )
|
||||
{
|
||||
var local = Cleared;
|
||||
InternalSetIPv4( ref local, Utility.IpToInt32( address ), port );
|
||||
return local;
|
||||
}
|
||||
|
||||
throw new System.NotImplementedException( "Oops - no IPV6 support yet?" );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set everything to zero
|
||||
/// </summary>
|
||||
public static NetAddress Cleared
|
||||
{
|
||||
get
|
||||
{
|
||||
NetAddress self = default;
|
||||
InternalClear( ref self );
|
||||
return self;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return true if the IP is ::0. (Doesn't check port.)
|
||||
/// </summary>
|
||||
public bool IsIPv6AllZeros
|
||||
{
|
||||
get
|
||||
{
|
||||
NetAddress self = this;
|
||||
return InternalIsIPv6AllZeros( ref self );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return true if IP is mapped IPv4
|
||||
/// </summary>
|
||||
public bool IsIPv4
|
||||
{
|
||||
get
|
||||
{
|
||||
NetAddress self = this;
|
||||
return InternalIsIPv4( ref self );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return true if this identity is localhost. (Either IPv6 ::1, or IPv4 127.0.0.1)
|
||||
/// </summary>
|
||||
public bool IsLocalHost
|
||||
{
|
||||
get
|
||||
{
|
||||
NetAddress self = this;
|
||||
return InternalIsLocalHost( ref self );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the Address section
|
||||
/// </summary>
|
||||
public IPAddress Address
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( IsIPv4 )
|
||||
{
|
||||
NetAddress self = this;
|
||||
var ip = InternalGetIPv4( ref self );
|
||||
return Utility.Int32ToIp( ip );
|
||||
}
|
||||
|
||||
if ( IsIPv6AllZeros )
|
||||
{
|
||||
return IPAddress.IPv6Loopback;
|
||||
}
|
||||
|
||||
throw new System.NotImplementedException( "Oops - no IPV6 support yet?" );
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var ptr = Helpers.TakeMemory();
|
||||
var self = this;
|
||||
InternalToString( ref self, ptr, Helpers.MemoryBufferSize, true );
|
||||
return Helpers.MemoryToString( ptr );
|
||||
}
|
||||
}
|
||||
}
|
||||
9
Facepunch.Steamworks/Networking/NetDebugFunc.cs
Normal file
9
Facepunch.Steamworks/Networking/NetDebugFunc.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
[UnmanagedFunctionPointer( Platform.CC )]
|
||||
delegate void NetDebugFunc( [In] NetDebugOutput nType, [In] IntPtr pszMsg );
|
||||
}
|
||||
10
Facepunch.Steamworks/Networking/NetErrorMessage.cs
Normal file
10
Facepunch.Steamworks/Networking/NetErrorMessage.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
internal unsafe struct NetErrorMessage
|
||||
{
|
||||
public fixed char Value[1024];
|
||||
}
|
||||
}
|
||||
126
Facepunch.Steamworks/Networking/NetIdentity.cs
Normal file
126
Facepunch.Steamworks/Networking/NetIdentity.cs
Normal file
@@ -0,0 +1,126 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
[StructLayout( LayoutKind.Explicit, Size = 136, Pack = 1 )]
|
||||
public partial struct NetIdentity
|
||||
{
|
||||
[FieldOffset( 0 )]
|
||||
internal IdentityType type;
|
||||
|
||||
[FieldOffset( 4 )]
|
||||
internal int size;
|
||||
|
||||
[FieldOffset( 8 )]
|
||||
internal ulong steamid;
|
||||
|
||||
[FieldOffset( 8 )]
|
||||
internal NetAddress netaddress;
|
||||
|
||||
/// <summary>
|
||||
/// Return a NetIdentity that represents LocalHost
|
||||
/// </summary>
|
||||
public static NetIdentity LocalHost
|
||||
{
|
||||
get
|
||||
{
|
||||
NetIdentity id = default;
|
||||
InternalSetLocalHost( ref id );
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public bool IsSteamId => type == IdentityType.SteamID;
|
||||
public bool IsIpAddress => type == IdentityType.IPAddress;
|
||||
|
||||
/// <summary>
|
||||
/// Return true if this identity is localhost
|
||||
/// </summary>
|
||||
public bool IsLocalHost
|
||||
{
|
||||
get
|
||||
{
|
||||
NetIdentity id = default;
|
||||
return InternalIsLocalHost( ref id );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert to a SteamId
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
public static implicit operator NetIdentity( SteamId value )
|
||||
{
|
||||
NetIdentity id = default;
|
||||
InternalSetSteamID( ref id, value );
|
||||
return id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the specified Address
|
||||
/// </summary>
|
||||
public static implicit operator NetIdentity( NetAddress address )
|
||||
{
|
||||
NetIdentity id = default;
|
||||
InternalSetIPAddr( ref id, ref address );
|
||||
return id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Automatically convert to a SteamId
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
public static implicit operator SteamId( NetIdentity value )
|
||||
{
|
||||
return value.SteamId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns NULL if we're not a SteamId
|
||||
/// </summary>
|
||||
public SteamId SteamId
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( type != IdentityType.SteamID ) return default;
|
||||
var id = this;
|
||||
return InternalGetSteamID( ref id );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns NULL if we're not a NetAddress
|
||||
/// </summary>
|
||||
public NetAddress Address
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( type != IdentityType.IPAddress ) return default;
|
||||
var id = this;
|
||||
|
||||
var addrptr = InternalGetIPAddr( ref id );
|
||||
return addrptr.ToType<NetAddress>();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We override tostring to provide a sensible representation
|
||||
/// </summary>
|
||||
public override string ToString()
|
||||
{
|
||||
var id = this;
|
||||
SteamNetworkingUtils.Internal.SteamNetworkingIdentity_ToString( ref id, out var str );
|
||||
return str;
|
||||
}
|
||||
|
||||
internal enum IdentityType
|
||||
{
|
||||
Invalid = 0,
|
||||
IPAddress = 1,
|
||||
GenericString = 2,
|
||||
GenericBytes = 3,
|
||||
SteamID = 16
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Facepunch.Steamworks/Networking/NetKeyValue.cs
Normal file
31
Facepunch.Steamworks/Networking/NetKeyValue.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
[StructLayout( LayoutKind.Explicit, Pack = Platform.StructPlatformPackSize )]
|
||||
internal struct NetKeyValue
|
||||
{
|
||||
[FieldOffset(0)]
|
||||
internal NetConfig Value; // m_eValue ESteamNetworkingConfigValue
|
||||
|
||||
[FieldOffset( 4 )]
|
||||
internal NetConfigType DataType; // m_eDataType ESteamNetworkingConfigDataType
|
||||
|
||||
[FieldOffset( 8 )]
|
||||
internal long Int64Value; // m_int64 int64_t
|
||||
|
||||
[FieldOffset( 8 )]
|
||||
internal int Int32Value; // m_val_int32 int32_t
|
||||
|
||||
[FieldOffset( 8 )]
|
||||
internal float FloatValue; // m_val_float float
|
||||
|
||||
[FieldOffset( 8 )]
|
||||
internal IntPtr PointerValue; // m_val_functionPtr void *
|
||||
|
||||
|
||||
// TODO - support strings, maybe
|
||||
}
|
||||
}
|
||||
21
Facepunch.Steamworks/Networking/NetMsg.cs
Normal file
21
Facepunch.Steamworks/Networking/NetMsg.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
[StructLayout( LayoutKind.Sequential )]
|
||||
internal partial struct NetMsg
|
||||
{
|
||||
internal IntPtr DataPtr;
|
||||
internal int DataSize;
|
||||
internal Connection Connection;
|
||||
internal NetIdentity Identity;
|
||||
internal long ConnectionUserData;
|
||||
internal long RecvTime;
|
||||
internal long MessageNumber;
|
||||
internal IntPtr FreeDataPtr;
|
||||
internal IntPtr ReleasePtr;
|
||||
internal int Channel;
|
||||
}
|
||||
}
|
||||
67
Facepunch.Steamworks/Networking/NetPingLocation.cs
Normal file
67
Facepunch.Steamworks/Networking/NetPingLocation.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// Object that describes a "location" on the Internet with sufficient
|
||||
/// detail that we can reasonably estimate an upper bound on the ping between
|
||||
/// the two hosts, even if a direct route between the hosts is not possible,
|
||||
/// and the connection must be routed through the Steam Datagram Relay network.
|
||||
/// This does not contain any information that identifies the host. Indeed,
|
||||
/// if two hosts are in the same building or otherwise have nearly identical
|
||||
/// networking characteristics, then it's valid to use the same location
|
||||
/// object for both of them.
|
||||
///
|
||||
/// NOTE: This object should only be used in the same process! Do not serialize it,
|
||||
/// send it over the wire, or persist it in a file or database! If you need
|
||||
/// to do that, convert it to a string representation using the methods in
|
||||
/// ISteamNetworkingUtils().
|
||||
///
|
||||
/// </summary>
|
||||
[StructLayout( LayoutKind.Explicit, Size = 512 )]
|
||||
public struct NetPingLocation
|
||||
{
|
||||
public static NetPingLocation? TryParseFromString( string str )
|
||||
{
|
||||
var result = default( NetPingLocation );
|
||||
if ( !SteamNetworkingUtils.Internal.ParsePingLocationString( str, ref result ) )
|
||||
return null;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
SteamNetworkingUtils.Internal.ConvertPingLocationToString( ref this, out var strVal );
|
||||
return strVal;
|
||||
}
|
||||
|
||||
/// Estimate the round-trip latency between two arbitrary locations, in
|
||||
/// milliseconds. This is a conservative estimate, based on routing through
|
||||
/// the relay network. For most basic relayed connections, this ping time
|
||||
/// will be pretty accurate, since it will be based on the route likely to
|
||||
/// be actually used.
|
||||
///
|
||||
/// If a direct IP route is used (perhaps via NAT traversal), then the route
|
||||
/// will be different, and the ping time might be better. Or it might actually
|
||||
/// be a bit worse! Standard IP routing is frequently suboptimal!
|
||||
///
|
||||
/// But even in this case, the estimate obtained using this method is a
|
||||
/// reasonable upper bound on the ping time. (Also it has the advantage
|
||||
/// of returning immediately and not sending any packets.)
|
||||
///
|
||||
/// In a few cases we might not able to estimate the route. In this case
|
||||
/// a negative value is returned. k_nSteamNetworkingPing_Failed means
|
||||
/// the reason was because of some networking difficulty. (Failure to
|
||||
/// ping, etc) k_nSteamNetworkingPing_Unknown is returned if we cannot
|
||||
/// currently answer the question for some other reason.
|
||||
///
|
||||
/// Do you need to be able to do this from a backend/matchmaking server?
|
||||
/// You are looking for the "ticketgen" library.
|
||||
public int EstimatePingTo( NetPingLocation target )
|
||||
{
|
||||
return SteamNetworkingUtils.Internal.EstimatePingTimeBetweenTwoLocations( ref this, ref target );
|
||||
}
|
||||
}
|
||||
}
|
||||
29
Facepunch.Steamworks/Networking/Socket.cs
Normal file
29
Facepunch.Steamworks/Networking/Socket.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
[StructLayout( LayoutKind.Sequential )]
|
||||
public struct Socket
|
||||
{
|
||||
internal uint Id;
|
||||
public override string ToString() => Id.ToString();
|
||||
public static implicit operator Socket( uint value ) => new Socket() { Id = value };
|
||||
public static implicit operator uint( Socket value ) => value.Id;
|
||||
|
||||
/// <summary>
|
||||
/// Destroy a listen socket. All the connections that were accepting on the listen
|
||||
/// socket are closed ungracefully.
|
||||
/// </summary>
|
||||
public bool Close()
|
||||
{
|
||||
return SteamNetworkingSockets.Internal.CloseListenSocket( Id );
|
||||
}
|
||||
|
||||
public SocketManager Manager
|
||||
{
|
||||
get => SteamNetworkingSockets.GetSocketManager( Id );
|
||||
set => SteamNetworkingSockets.SetSocketManager( Id, value );
|
||||
}
|
||||
}
|
||||
}
|
||||
165
Facepunch.Steamworks/Networking/SocketManager.cs
Normal file
165
Facepunch.Steamworks/Networking/SocketManager.cs
Normal file
@@ -0,0 +1,165 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Used as a base to create your networking server. This creates a socket
|
||||
/// and listens/communicates with multiple queries.
|
||||
///
|
||||
/// You can override all the virtual functions to turn it into what you
|
||||
/// want it to do.
|
||||
/// </summary>
|
||||
public partial class SocketManager
|
||||
{
|
||||
public ISocketManager Interface { get; set; }
|
||||
|
||||
public List<Connection> Connecting = new List<Connection>();
|
||||
public List<Connection> Connected = new List<Connection>();
|
||||
public Socket Socket { get; internal set; }
|
||||
|
||||
public override string ToString() => Socket.ToString();
|
||||
|
||||
internal HSteamNetPollGroup pollGroup;
|
||||
|
||||
internal void Initialize()
|
||||
{
|
||||
pollGroup = SteamNetworkingSockets.Internal.CreatePollGroup();
|
||||
}
|
||||
|
||||
public bool Close()
|
||||
{
|
||||
if ( SteamNetworkingSockets.Internal.IsValid )
|
||||
{
|
||||
SteamNetworkingSockets.Internal.DestroyPollGroup( pollGroup );
|
||||
Socket.Close();
|
||||
}
|
||||
|
||||
pollGroup = 0;
|
||||
Socket = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void OnConnectionChanged( Connection connection, ConnectionInfo info )
|
||||
{
|
||||
switch ( info.State )
|
||||
{
|
||||
case ConnectionState.Connecting:
|
||||
if ( !Connecting.Contains( connection ) )
|
||||
{
|
||||
Connecting.Add( connection );
|
||||
OnConnecting( connection, info );
|
||||
}
|
||||
break;
|
||||
case ConnectionState.Connected:
|
||||
if ( !Connected.Contains( connection ) )
|
||||
{
|
||||
Connecting.Remove( connection );
|
||||
Connected.Add( connection );
|
||||
|
||||
OnConnected( connection, info );
|
||||
}
|
||||
break;
|
||||
case ConnectionState.ClosedByPeer:
|
||||
case ConnectionState.ProblemDetectedLocally:
|
||||
case ConnectionState.None:
|
||||
if ( Connecting.Contains( connection ) || Connected.Contains( connection ) )
|
||||
{
|
||||
OnDisconnected( connection, info );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Default behaviour is to accept every connection
|
||||
/// </summary>
|
||||
public virtual void OnConnecting( Connection connection, ConnectionInfo info )
|
||||
{
|
||||
if ( Interface != null )
|
||||
{
|
||||
Interface.OnConnecting( connection, info );
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
connection.Accept();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Client is connected. They move from connecting to Connections
|
||||
/// </summary>
|
||||
public virtual void OnConnected( Connection connection, ConnectionInfo info )
|
||||
{
|
||||
SteamNetworkingSockets.Internal.SetConnectionPollGroup( connection, pollGroup );
|
||||
|
||||
Interface?.OnConnected( connection, info );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The connection has been closed remotely or disconnected locally. Check data.State for details.
|
||||
/// </summary>
|
||||
public virtual void OnDisconnected( Connection connection, ConnectionInfo info )
|
||||
{
|
||||
SteamNetworkingSockets.Internal.SetConnectionPollGroup( connection, 0 );
|
||||
|
||||
connection.Close();
|
||||
|
||||
Connecting.Remove( connection );
|
||||
Connected.Remove( connection );
|
||||
|
||||
Interface?.OnDisconnected( connection, info );
|
||||
}
|
||||
|
||||
public void Receive( int bufferSize = 32 )
|
||||
{
|
||||
int processed = 0;
|
||||
IntPtr messageBuffer = Marshal.AllocHGlobal( IntPtr.Size * bufferSize );
|
||||
|
||||
try
|
||||
{
|
||||
processed = SteamNetworkingSockets.Internal.ReceiveMessagesOnPollGroup( pollGroup, messageBuffer, bufferSize );
|
||||
|
||||
for ( int i = 0; i < processed; i++ )
|
||||
{
|
||||
ReceiveMessage( Marshal.ReadIntPtr( messageBuffer, i * IntPtr.Size ) );
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
Marshal.FreeHGlobal( messageBuffer );
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Overwhelmed our buffer, keep going
|
||||
//
|
||||
if ( processed == bufferSize )
|
||||
Receive( bufferSize );
|
||||
}
|
||||
|
||||
internal unsafe void ReceiveMessage( IntPtr msgPtr )
|
||||
{
|
||||
var msg = Marshal.PtrToStructure<NetMsg>( msgPtr );
|
||||
try
|
||||
{
|
||||
OnMessage( msg.Connection, msg.Identity, msg.DataPtr, msg.DataSize, msg.RecvTime, msg.MessageNumber, msg.Channel );
|
||||
}
|
||||
finally
|
||||
{
|
||||
//
|
||||
// Releases the message
|
||||
//
|
||||
NetMsg.InternalRelease( (NetMsg*) msgPtr );
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnMessage( Connection connection, NetIdentity identity, IntPtr data, int size, long messageNum, long recvTime, int channel )
|
||||
{
|
||||
Interface?.OnMessage( connection, identity, data, size, messageNum, recvTime, channel );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace Facepunch.Steamworks.Data
|
||||
{
|
||||
struct SteamDatagramRelayAuthTicket
|
||||
{
|
||||
// Not implemented, not used
|
||||
};
|
||||
}
|
||||
197
Facepunch.Steamworks/ServerList/Base.cs
Normal file
197
Facepunch.Steamworks/ServerList/Base.cs
Normal file
@@ -0,0 +1,197 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks.ServerList
|
||||
{
|
||||
public abstract class Base : IDisposable
|
||||
{
|
||||
|
||||
#region ISteamMatchmakingServers
|
||||
internal static ISteamMatchmakingServers Internal => SteamMatchmakingServers.Internal;
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Which app we're querying. Defaults to the current app.
|
||||
/// </summary>
|
||||
public AppId AppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When a new server is added, this function will get called
|
||||
/// </summary>
|
||||
public event Action OnChanges;
|
||||
|
||||
/// <summary>
|
||||
/// Called for every responsive server
|
||||
/// </summary>
|
||||
public event Action<ServerInfo> OnResponsiveServer;
|
||||
|
||||
/// <summary>
|
||||
/// A list of servers that responded. If you're only interested in servers that responded since you
|
||||
/// last updated, then simply clear this list.
|
||||
/// </summary>
|
||||
public List<ServerInfo> Responsive = new List<ServerInfo>();
|
||||
|
||||
/// <summary>
|
||||
/// A list of servers that were in the master list but didn't respond.
|
||||
/// </summary>
|
||||
public List<ServerInfo> Unresponsive = new List<ServerInfo>();
|
||||
|
||||
|
||||
public Base()
|
||||
{
|
||||
AppId = SteamClient.AppId; // Default AppId is this
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Query the server list. Task result will be true when finished
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual async Task<bool> RunQueryAsync( float timeoutSeconds = 10 )
|
||||
{
|
||||
var stopwatch = System.Diagnostics.Stopwatch.StartNew();
|
||||
|
||||
Reset();
|
||||
LaunchQuery();
|
||||
|
||||
var thisRequest = request;
|
||||
|
||||
while ( IsRefreshing )
|
||||
{
|
||||
await Task.Delay( 33 );
|
||||
|
||||
//
|
||||
// The request has been cancelled or changed in some way
|
||||
//
|
||||
if ( request.Value == IntPtr.Zero || thisRequest.Value != request.Value )
|
||||
return false;
|
||||
|
||||
if ( !SteamClient.IsValid )
|
||||
return false;
|
||||
|
||||
var r = Responsive.Count;
|
||||
|
||||
UpdatePending();
|
||||
UpdateResponsive();
|
||||
|
||||
if ( r != Responsive.Count )
|
||||
{
|
||||
InvokeChanges();
|
||||
}
|
||||
|
||||
if ( stopwatch.Elapsed.TotalSeconds > timeoutSeconds )
|
||||
break;
|
||||
}
|
||||
|
||||
MovePendingToUnresponsive();
|
||||
InvokeChanges();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void Cancel() => Internal.CancelQuery( request );
|
||||
|
||||
// Overrides
|
||||
internal abstract void LaunchQuery();
|
||||
|
||||
internal HServerListRequest request;
|
||||
|
||||
#region Filters
|
||||
|
||||
internal List<MatchMakingKeyValuePair> filters = new List<MatchMakingKeyValuePair>();
|
||||
internal virtual MatchMakingKeyValuePair[] GetFilters() => filters.ToArray();
|
||||
|
||||
public void AddFilter( string key, string value )
|
||||
{
|
||||
filters.Add( new MatchMakingKeyValuePair { Key = key, Value = value } );
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
internal int Count => Internal.GetServerCount( request );
|
||||
internal bool IsRefreshing => request.Value != IntPtr.Zero && Internal.IsRefreshing( request );
|
||||
internal List<int> watchList = new List<int>();
|
||||
internal int LastCount = 0;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
ReleaseQuery();
|
||||
LastCount = 0;
|
||||
watchList.Clear();
|
||||
}
|
||||
|
||||
void ReleaseQuery()
|
||||
{
|
||||
if ( request.Value != IntPtr.Zero )
|
||||
{
|
||||
Cancel();
|
||||
Internal.ReleaseRequest( request );
|
||||
request = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
ReleaseQuery();
|
||||
}
|
||||
|
||||
internal void InvokeChanges()
|
||||
{
|
||||
OnChanges?.Invoke();
|
||||
}
|
||||
|
||||
void UpdatePending()
|
||||
{
|
||||
var count = Count;
|
||||
if ( count == LastCount ) return;
|
||||
|
||||
for ( int i = LastCount; i < count; i++ )
|
||||
{
|
||||
watchList.Add( i );
|
||||
}
|
||||
|
||||
LastCount = count;
|
||||
}
|
||||
|
||||
public void UpdateResponsive()
|
||||
{
|
||||
watchList.RemoveAll( x =>
|
||||
{
|
||||
var info = Internal.GetServerDetails( request, x );
|
||||
if ( info.HadSuccessfulResponse )
|
||||
{
|
||||
OnServer( ServerInfo.From( info ), info.HadSuccessfulResponse );
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
} );
|
||||
}
|
||||
|
||||
void MovePendingToUnresponsive()
|
||||
{
|
||||
watchList.RemoveAll( x =>
|
||||
{
|
||||
var info = Internal.GetServerDetails( request, x );
|
||||
OnServer( ServerInfo.From( info ), info.HadSuccessfulResponse );
|
||||
return true;
|
||||
} );
|
||||
}
|
||||
|
||||
private void OnServer( ServerInfo serverInfo, bool responded )
|
||||
{
|
||||
if ( responded )
|
||||
{
|
||||
Responsive.Add( serverInfo );
|
||||
OnResponsiveServer?.Invoke( serverInfo );
|
||||
return;
|
||||
}
|
||||
|
||||
Unresponsive.Add( serverInfo );
|
||||
}
|
||||
}
|
||||
}
|
||||
17
Facepunch.Steamworks/ServerList/Favourites.cs
Normal file
17
Facepunch.Steamworks/ServerList/Favourites.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks.ServerList
|
||||
{
|
||||
public class Favourites : Base
|
||||
{
|
||||
internal override void LaunchQuery()
|
||||
{
|
||||
var filters = GetFilters();
|
||||
request = Internal.RequestFavoritesServerList( AppId.Value, ref filters, (uint)filters.Length, IntPtr.Zero );
|
||||
}
|
||||
}
|
||||
}
|
||||
17
Facepunch.Steamworks/ServerList/Friends.cs
Normal file
17
Facepunch.Steamworks/ServerList/Friends.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks.ServerList
|
||||
{
|
||||
public class Friends : Base
|
||||
{
|
||||
internal override void LaunchQuery()
|
||||
{
|
||||
var filters = GetFilters();
|
||||
request = Internal.RequestFriendsServerList( AppId.Value, ref filters, (uint)filters.Length, IntPtr.Zero );
|
||||
}
|
||||
}
|
||||
}
|
||||
17
Facepunch.Steamworks/ServerList/History.cs
Normal file
17
Facepunch.Steamworks/ServerList/History.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks.ServerList
|
||||
{
|
||||
public class History : Base
|
||||
{
|
||||
internal override void LaunchQuery()
|
||||
{
|
||||
var filters = GetFilters();
|
||||
request = Internal.RequestHistoryServerList( AppId.Value, ref filters, (uint)filters.Length, IntPtr.Zero );
|
||||
}
|
||||
}
|
||||
}
|
||||
18
Facepunch.Steamworks/ServerList/Internet.cs
Normal file
18
Facepunch.Steamworks/ServerList/Internet.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks.ServerList
|
||||
{
|
||||
public class Internet : Base
|
||||
{
|
||||
internal override void LaunchQuery()
|
||||
{
|
||||
var filters = GetFilters();
|
||||
|
||||
request = Internal.RequestInternetServerList( AppId.Value, ref filters, (uint)filters.Length, IntPtr.Zero );
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Facepunch.Steamworks/ServerList/IpList.cs
Normal file
72
Facepunch.Steamworks/ServerList/IpList.cs
Normal file
@@ -0,0 +1,72 @@
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks.ServerList
|
||||
{
|
||||
public class IpList : Internet
|
||||
{
|
||||
public List<string> Ips = new List<string>();
|
||||
bool wantsCancel;
|
||||
|
||||
public IpList( IEnumerable<string> list )
|
||||
{
|
||||
Ips.AddRange( list );
|
||||
}
|
||||
|
||||
public IpList( params string[] list )
|
||||
{
|
||||
Ips.AddRange( list );
|
||||
}
|
||||
|
||||
public override async Task<bool> RunQueryAsync( float timeoutSeconds = 10 )
|
||||
{
|
||||
int blockSize = 16;
|
||||
int pointer = 0;
|
||||
|
||||
var ips = Ips.ToArray();
|
||||
|
||||
while ( true )
|
||||
{
|
||||
var sublist = ips.Skip( pointer ).Take( blockSize );
|
||||
if ( sublist.Count() == 0 )
|
||||
break;
|
||||
|
||||
using ( var list = new ServerList.Internet() )
|
||||
{
|
||||
list.AddFilter( "or", sublist.Count().ToString() );
|
||||
|
||||
foreach ( var server in sublist )
|
||||
{
|
||||
list.AddFilter( "gameaddr", server );
|
||||
}
|
||||
|
||||
await list.RunQueryAsync( timeoutSeconds );
|
||||
|
||||
if ( wantsCancel )
|
||||
return false;
|
||||
|
||||
Responsive.AddRange( list.Responsive );
|
||||
Responsive = Responsive.Distinct().ToList();
|
||||
Unresponsive.AddRange( list.Unresponsive );
|
||||
Unresponsive = Unresponsive.Distinct().ToList();
|
||||
}
|
||||
|
||||
pointer += sublist.Count();
|
||||
|
||||
InvokeChanges();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Cancel()
|
||||
{
|
||||
wantsCancel = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
16
Facepunch.Steamworks/ServerList/LocalNetwork.cs
Normal file
16
Facepunch.Steamworks/ServerList/LocalNetwork.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Facepunch.Steamworks.ServerList
|
||||
{
|
||||
public class LocalNetwork : Base
|
||||
{
|
||||
internal override void LaunchQuery()
|
||||
{
|
||||
request = Internal.RequestLANServerList( AppId.Value, IntPtr.Zero );
|
||||
}
|
||||
}
|
||||
}
|
||||
270
Facepunch.Steamworks/SteamApps.cs
Normal file
270
Facepunch.Steamworks/SteamApps.cs
Normal file
@@ -0,0 +1,270 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Exposes a wide range of information and actions for applications and Downloadable Content (DLC).
|
||||
/// </summary>
|
||||
public class SteamApps : SteamSharedClass<SteamApps>
|
||||
{
|
||||
internal static ISteamApps Internal => Interface as ISteamApps;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamApps( server ) );
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
Dispatch.Install<DlcInstalled_t>( x => OnDlcInstalled?.Invoke( x.AppID ) );
|
||||
Dispatch.Install<NewUrlLaunchParameters_t>( x => OnNewLaunchParameters?.Invoke() );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// posted after the user gains ownership of DLC and that DLC is installed
|
||||
/// </summary>
|
||||
public static event Action<AppId> OnDlcInstalled;
|
||||
|
||||
/// <summary>
|
||||
/// posted after the user gains executes a Steam URL with command line or query parameters
|
||||
/// such as steam://run/appid//-commandline/?param1=value1(and)param2=value2(and)param3=value3 etc
|
||||
/// while the game is already running. The new params can be queried
|
||||
/// with GetLaunchQueryParam and GetLaunchCommandLine
|
||||
/// </summary>
|
||||
public static event Action OnNewLaunchParameters;
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the active user is subscribed to the current App ID
|
||||
/// </summary>
|
||||
public static bool IsSubscribed => Internal.BIsSubscribed();
|
||||
|
||||
/// <summary>
|
||||
/// Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID
|
||||
/// </summary>
|
||||
public static bool IsSubscribedFromFamilySharing => Internal.BIsSubscribedFromFamilySharing();
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the license owned by the user provides low violence depots.
|
||||
/// Low violence depots are useful for copies sold in countries that have content restrictions
|
||||
/// </summary>
|
||||
public static bool IsLowVoilence => Internal.BIsLowViolence();
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the current App ID license is for Cyber Cafes.
|
||||
/// </summary>
|
||||
public static bool IsCybercafe => Internal.BIsCybercafe();
|
||||
|
||||
/// <summary>
|
||||
/// CChecks if the user has a VAC ban on their account
|
||||
/// </summary>
|
||||
public static bool IsVACBanned => Internal.BIsVACBanned();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current language that the user has set.
|
||||
/// This falls back to the Steam UI language if the user hasn't explicitly picked a language for the title.
|
||||
/// </summary>
|
||||
public static string GameLanguage => Internal.GetCurrentGameLanguage();
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of the languages the current app supports.
|
||||
/// </summary>
|
||||
public static string[] AvailableLanguages => Internal.GetAvailableGameLanguages().Split( new[] { ',' }, StringSplitOptions.RemoveEmptyEntries );
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the active user is subscribed to a specified AppId.
|
||||
/// Only use this if you need to check ownership of another game related to yours, a demo for example.
|
||||
/// </summary>
|
||||
public static bool IsSubscribedToApp( AppId appid ) => Internal.BIsSubscribedApp( appid.Value );
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the user owns a specific DLC and if the DLC is installed
|
||||
/// </summary>
|
||||
public static bool IsDlcInstalled( AppId appid ) => Internal.BIsDlcInstalled( appid.Value );
|
||||
|
||||
/// <summary>
|
||||
/// Returns the time of the purchase of the app
|
||||
/// </summary>
|
||||
public static DateTime PurchaseTime( AppId appid = default )
|
||||
{
|
||||
if ( appid == 0 )
|
||||
appid = SteamClient.AppId;
|
||||
|
||||
return Epoch.ToDateTime(Internal.GetEarliestPurchaseUnixTime(appid.Value ) );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the user is subscribed to the current app through a free weekend
|
||||
/// This function will return false for users who have a retail or other type of license
|
||||
/// Before using, please ask your Valve technical contact how to package and secure your free weekened
|
||||
/// </summary>
|
||||
public static bool IsSubscribedFromFreeWeekend => Internal.BIsSubscribedFromFreeWeekend();
|
||||
|
||||
/// <summary>
|
||||
/// Returns metadata for all available DLC
|
||||
/// </summary>
|
||||
public static IEnumerable<DlcInformation> DlcInformation()
|
||||
{
|
||||
var appid = default( AppId );
|
||||
var available = false;
|
||||
|
||||
for ( int i = 0; i < Internal.GetDLCCount(); i++ )
|
||||
{
|
||||
if ( !Internal.BGetDLCDataByIndex( i, ref appid, ref available, out var strVal ) )
|
||||
continue;
|
||||
|
||||
yield return new DlcInformation
|
||||
{
|
||||
AppId = appid.Value,
|
||||
Name = strVal,
|
||||
Available = available
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Install/Uninstall control for optional DLC
|
||||
/// </summary>
|
||||
public static void InstallDlc( AppId appid ) => Internal.InstallDLC( appid.Value );
|
||||
|
||||
/// <summary>
|
||||
/// Install/Uninstall control for optional DLC
|
||||
/// </summary>
|
||||
public static void UninstallDlc( AppId appid ) => Internal.UninstallDLC( appid.Value );
|
||||
|
||||
/// <summary>
|
||||
/// Returns null if we're not on a beta branch, else the name of the branch
|
||||
/// </summary>
|
||||
public static string CurrentBetaName
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( !Internal.GetCurrentBetaName( out var strVal ) )
|
||||
return null;
|
||||
|
||||
return strVal;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows you to force verify game content on next launch.
|
||||
///
|
||||
/// If you detect the game is out-of-date(for example, by having the client detect a version mismatch with a server),
|
||||
/// you can call use MarkContentCorrupt to force a verify, show a message to the user, and then quit.
|
||||
/// </summary>
|
||||
public static void MarkContentCorrupt( bool missingFilesOnly ) => Internal.MarkContentCorrupt( missingFilesOnly );
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of all installed depots for a given App ID in mount order
|
||||
/// </summary>
|
||||
public static IEnumerable<DepotId> InstalledDepots( AppId appid = default )
|
||||
{
|
||||
if ( appid == 0 )
|
||||
appid = SteamClient.AppId;
|
||||
|
||||
var depots = new DepotId_t[32];
|
||||
uint count = Internal.GetInstalledDepots( appid.Value, depots, (uint) depots.Length );
|
||||
|
||||
for ( int i = 0; i < count; i++ )
|
||||
{
|
||||
yield return new DepotId { Value = depots[i].Value };
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the install folder for a specific AppID.
|
||||
/// This works even if the application is not installed, based on where the game would be installed with the default Steam library location.
|
||||
/// </summary>
|
||||
public static string AppInstallDir( AppId appid = default )
|
||||
{
|
||||
if ( appid == 0 )
|
||||
appid = SteamClient.AppId;
|
||||
|
||||
if ( Internal.GetAppInstallDir( appid.Value, out var strVal ) == 0 )
|
||||
return null;
|
||||
|
||||
return strVal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The app may not actually be owned by the current user, they may have it left over from a free weekend, etc.
|
||||
/// </summary>
|
||||
public static bool IsAppInstalled( AppId appid ) => Internal.BIsAppInstalled( appid.Value );
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Steam ID of the original owner of the current app. If it's different from the current user then it is borrowed..
|
||||
/// </summary>
|
||||
public static SteamId AppOwner => Internal.GetAppOwner().Value;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the associated launch parameter if the game is run via steam://run/appid/?param1=value1;param2=value2;param3=value3 etc.
|
||||
/// Parameter names starting with the character '@' are reserved for internal use and will always return an empty string.
|
||||
/// Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game,
|
||||
/// but it is advised that you not param names beginning with an underscore for your own features.
|
||||
/// </summary>
|
||||
public static string GetLaunchParam( string param ) => Internal.GetLaunchQueryParam( param );
|
||||
|
||||
/// <summary>
|
||||
/// Gets the download progress for optional DLC.
|
||||
/// </summary>
|
||||
public static DownloadProgress DlcDownloadProgress( AppId appid )
|
||||
{
|
||||
ulong punBytesDownloaded = 0;
|
||||
ulong punBytesTotal = 0;
|
||||
|
||||
if ( !Internal.GetDlcDownloadProgress( appid.Value, ref punBytesDownloaded, ref punBytesTotal ) )
|
||||
return default;
|
||||
|
||||
return new DownloadProgress { BytesDownloaded = punBytesDownloaded, BytesTotal = punBytesTotal, Active = true };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the buildid of this app, may change at any time based on backend updates to the game.
|
||||
/// Defaults to 0 if you're not running a build downloaded from steam.
|
||||
/// </summary>
|
||||
public static int BuildId => Internal.GetAppBuildId();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Asynchronously retrieves metadata details about a specific file in the depot manifest.
|
||||
/// Currently provides:
|
||||
/// </summary>
|
||||
public static async Task<FileDetails?> GetFileDetailsAsync( string filename )
|
||||
{
|
||||
var r = await Internal.GetFileDetails( filename );
|
||||
|
||||
if ( !r.HasValue || r.Value.Result != Result.OK )
|
||||
return null;
|
||||
|
||||
return new FileDetails
|
||||
{
|
||||
SizeInBytes = r.Value.FileSize,
|
||||
Flags = r.Value.Flags,
|
||||
Sha1 = string.Join( "", r.Value.FileSHA.Select( x => x.ToString( "x" ) ) )
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get command line if game was launched via Steam URL, e.g. steam://run/appid//command line/.
|
||||
/// This method of passing a connect string (used when joining via rich presence, accepting an
|
||||
/// invite, etc) is preferable to passing the connect string on the operating system command
|
||||
/// line, which is a security risk. In order for rich presence joins to go through this
|
||||
/// path and not be placed on the OS command line, you must set a value in your app's
|
||||
/// configuration on Steam. Ask Valve for help with this.
|
||||
/// </summary>
|
||||
public static string CommandLine
|
||||
{
|
||||
get
|
||||
{
|
||||
Internal.GetLaunchCommandLine( out var strVal );
|
||||
return strVal;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
181
Facepunch.Steamworks/SteamClient.cs
Normal file
181
Facepunch.Steamworks/SteamClient.cs
Normal file
@@ -0,0 +1,181 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
public static class SteamClient
|
||||
{
|
||||
static bool initialized;
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the steam client.
|
||||
/// If asyncCallbacks is false you need to call RunCallbacks manually every frame.
|
||||
/// </summary>
|
||||
public static void Init( uint appid, bool asyncCallbacks = true )
|
||||
{
|
||||
if ( initialized )
|
||||
throw new System.Exception( "Calling SteamClient.Init but is already initialized" );
|
||||
|
||||
System.Environment.SetEnvironmentVariable( "SteamAppId", appid.ToString() );
|
||||
System.Environment.SetEnvironmentVariable( "SteamGameId", appid.ToString() );
|
||||
|
||||
if ( !SteamAPI.Init() )
|
||||
{
|
||||
throw new System.Exception( "SteamApi_Init returned false. Steam isn't running, couldn't find Steam, AppId is ureleased, Don't own AppId." );
|
||||
}
|
||||
|
||||
AppId = appid;
|
||||
|
||||
initialized = true;
|
||||
|
||||
//
|
||||
// Dispatch is responsible for pumping the
|
||||
// event loop.
|
||||
//
|
||||
Dispatch.Init();
|
||||
Dispatch.ClientPipe = SteamAPI.GetHSteamPipe();
|
||||
|
||||
AddInterface<SteamApps>();
|
||||
AddInterface<SteamFriends>();
|
||||
AddInterface<SteamInput>();
|
||||
AddInterface<SteamInventory>();
|
||||
AddInterface<SteamMatchmaking>();
|
||||
AddInterface<SteamMatchmakingServers>();
|
||||
AddInterface<SteamMusic>();
|
||||
AddInterface<SteamNetworking>();
|
||||
AddInterface<SteamNetworkingSockets>();
|
||||
AddInterface<SteamNetworkingUtils>();
|
||||
AddInterface<SteamParental>();
|
||||
AddInterface<SteamParties>();
|
||||
AddInterface<SteamRemoteStorage>();
|
||||
AddInterface<SteamScreenshots>();
|
||||
AddInterface<SteamUGC>();
|
||||
AddInterface<SteamUser>();
|
||||
AddInterface<SteamUserStats>();
|
||||
AddInterface<SteamUtils>();
|
||||
AddInterface<SteamVideo>();
|
||||
AddInterface<SteamRemotePlay>();
|
||||
|
||||
if ( asyncCallbacks )
|
||||
{
|
||||
//
|
||||
// This will keep looping in the background every 16 ms
|
||||
// until we shut down.
|
||||
//
|
||||
Dispatch.LoopClientAsync();
|
||||
}
|
||||
}
|
||||
|
||||
internal static void AddInterface<T>() where T : SteamClass, new()
|
||||
{
|
||||
var t = new T();
|
||||
t.InitializeInterface( false );
|
||||
openInterfaces.Add( t );
|
||||
}
|
||||
|
||||
static readonly List<SteamClass> openInterfaces = new List<SteamClass>();
|
||||
|
||||
internal static void ShutdownInterfaces()
|
||||
{
|
||||
foreach ( var e in openInterfaces )
|
||||
{
|
||||
e.DestroyInterface( false );
|
||||
}
|
||||
|
||||
openInterfaces.Clear();
|
||||
}
|
||||
|
||||
public static bool IsValid => initialized;
|
||||
|
||||
public static void Shutdown()
|
||||
{
|
||||
if ( !IsValid ) return;
|
||||
|
||||
Cleanup();
|
||||
|
||||
SteamAPI.Shutdown();
|
||||
}
|
||||
|
||||
internal static void Cleanup()
|
||||
{
|
||||
Dispatch.ShutdownClient();
|
||||
|
||||
initialized = false;
|
||||
ShutdownInterfaces();
|
||||
}
|
||||
|
||||
public static void RunCallbacks()
|
||||
{
|
||||
if ( Dispatch.ClientPipe != 0 )
|
||||
Dispatch.Frame( Dispatch.ClientPipe );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the current user's Steam client is connected to the Steam servers.
|
||||
/// If it's not then no real-time services provided by the Steamworks API will be enabled. The Steam
|
||||
/// client will automatically be trying to recreate the connection as often as possible. When the
|
||||
/// connection is restored a SteamServersConnected_t callback will be posted.
|
||||
/// You usually don't need to check for this yourself. All of the API calls that rely on this will
|
||||
/// check internally. Forcefully disabling stuff when the player loses access is usually not a
|
||||
/// very good experience for the player and you could be preventing them from accessing APIs that do not
|
||||
/// need a live connection to Steam.
|
||||
/// </summary>
|
||||
public static bool IsLoggedOn => SteamUser.Internal.BLoggedOn();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Steam ID of the account currently logged into the Steam client. This is
|
||||
/// commonly called the 'current user', or 'local user'.
|
||||
/// A Steam ID is a unique identifier for a Steam accounts, Steam groups, Lobbies and Chat
|
||||
/// rooms, and used to differentiate users in all parts of the Steamworks API.
|
||||
/// </summary>
|
||||
public static SteamId SteamId => SteamUser.Internal.GetSteamID();
|
||||
|
||||
/// <summary>
|
||||
/// returns the local players name - guaranteed to not be NULL.
|
||||
/// this is the same name as on the users community profile page
|
||||
/// </summary>
|
||||
public static string Name => SteamFriends.Internal.GetPersonaName();
|
||||
|
||||
/// <summary>
|
||||
/// gets the status of the current user
|
||||
/// </summary>
|
||||
public static FriendState State => SteamFriends.Internal.GetPersonaState();
|
||||
|
||||
/// <summary>
|
||||
/// returns the appID of the current process
|
||||
/// </summary>
|
||||
public static AppId AppId { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks if your executable was launched through Steam and relaunches it through Steam if it wasn't
|
||||
/// this returns true then it starts the Steam client if required and launches your game again through it,
|
||||
/// and you should quit your process as soon as possible. This effectively runs steam://run/AppId so it
|
||||
/// may not relaunch the exact executable that called it, as it will always relaunch from the version
|
||||
/// installed in your Steam library folder/
|
||||
/// Note that during development, when not launching via Steam, this might always return true.
|
||||
/// </summary>
|
||||
public static bool RestartAppIfNecessary( uint appid )
|
||||
{
|
||||
// Having these here would probably mean it always returns false?
|
||||
|
||||
//System.Environment.SetEnvironmentVariable( "SteamAppId", appid.ToString() );
|
||||
//System.Environment.SetEnvironmentVariable( "SteamGameId", appid.ToString() );
|
||||
|
||||
return SteamAPI.RestartAppIfNecessary( appid );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called in interfaces that rely on this being initialized
|
||||
/// </summary>
|
||||
internal static void ValidCheck()
|
||||
{
|
||||
if ( !IsValid )
|
||||
throw new System.Exception( "SteamClient isn't initialized" );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
338
Facepunch.Steamworks/SteamFriends.cs
Normal file
338
Facepunch.Steamworks/SteamFriends.cs
Normal file
@@ -0,0 +1,338 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public class SteamFriends : SteamClientClass<SteamFriends>
|
||||
{
|
||||
internal static ISteamFriends Internal => Interface as ISteamFriends;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamFriends( server ) );
|
||||
|
||||
richPresence = new Dictionary<string, string>();
|
||||
|
||||
InstallEvents();
|
||||
}
|
||||
|
||||
static Dictionary<string, string> richPresence;
|
||||
|
||||
internal void InstallEvents()
|
||||
{
|
||||
Dispatch.Install<PersonaStateChange_t>( x => OnPersonaStateChange?.Invoke( new Friend( x.SteamID ) ) );
|
||||
Dispatch.Install<GameRichPresenceJoinRequested_t>( x => OnGameRichPresenceJoinRequested?.Invoke( new Friend( x.SteamIDFriend), x.ConnectUTF8() ) );
|
||||
Dispatch.Install<GameConnectedFriendChatMsg_t>( OnFriendChatMessage );
|
||||
Dispatch.Install<GameOverlayActivated_t>( x => OnGameOverlayActivated?.Invoke( x.Active != 0 ) );
|
||||
Dispatch.Install<GameServerChangeRequested_t>( x => OnGameServerChangeRequested?.Invoke( x.ServerUTF8(), x.PasswordUTF8() ) );
|
||||
Dispatch.Install<GameLobbyJoinRequested_t>( x => OnGameLobbyJoinRequested?.Invoke( new Lobby( x.SteamIDLobby ), x.SteamIDFriend ) );
|
||||
Dispatch.Install<FriendRichPresenceUpdate_t>( x => OnFriendRichPresenceUpdate?.Invoke( new Friend( x.SteamIDFriend ) ) );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when chat message has been received from a friend. You'll need to turn on
|
||||
/// ListenForFriendsMessages to recieve this. (friend, msgtype, message)
|
||||
/// </summary>
|
||||
public static event Action<Friend, string, string> OnChatMessage;
|
||||
|
||||
/// <summary>
|
||||
/// called when a friends' status changes
|
||||
/// </summary>
|
||||
public static event Action<Friend> OnPersonaStateChange;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Called when the user tries to join a game from their friends list
|
||||
/// rich presence will have been set with the "connect" key which is set here
|
||||
/// </summary>
|
||||
public static event Action<Friend, string> OnGameRichPresenceJoinRequested;
|
||||
|
||||
/// <summary>
|
||||
/// Posted when game overlay activates or deactivates
|
||||
/// the game can use this to be pause or resume single player games
|
||||
/// </summary>
|
||||
public static event Action<bool> OnGameOverlayActivated;
|
||||
|
||||
/// <summary>
|
||||
/// Called when the user tries to join a different game server from their friends list
|
||||
/// game client should attempt to connect to specified server when this is received
|
||||
/// </summary>
|
||||
public static event Action<string, string> OnGameServerChangeRequested;
|
||||
|
||||
/// <summary>
|
||||
/// Called when the user tries to join a lobby from their friends list
|
||||
/// game client should attempt to connect to specified lobby when this is received
|
||||
/// </summary>
|
||||
public static event Action<Lobby, SteamId> OnGameLobbyJoinRequested;
|
||||
|
||||
/// <summary>
|
||||
/// Callback indicating updated data about friends rich presence information
|
||||
/// </summary>
|
||||
public static event Action<Friend> OnFriendRichPresenceUpdate;
|
||||
|
||||
static unsafe void OnFriendChatMessage( GameConnectedFriendChatMsg_t data )
|
||||
{
|
||||
if ( OnChatMessage == null ) return;
|
||||
|
||||
var friend = new Friend( data.SteamIDUser );
|
||||
|
||||
var buffer = Helpers.TakeMemory();
|
||||
var type = ChatEntryType.ChatMsg;
|
||||
|
||||
var len = Internal.GetFriendMessage( data.SteamIDUser, data.MessageID, buffer, Helpers.MemoryBufferSize, ref type );
|
||||
|
||||
if ( len == 0 && type == ChatEntryType.Invalid )
|
||||
return;
|
||||
|
||||
var typeName = type.ToString();
|
||||
var message = Helpers.MemoryToString( buffer );
|
||||
|
||||
OnChatMessage( friend, typeName, message );
|
||||
}
|
||||
|
||||
private static IEnumerable<Friend> GetFriendsWithFlag(FriendFlags flag)
|
||||
{
|
||||
for ( int i=0; i<Internal.GetFriendCount( (int)flag); i++ )
|
||||
{
|
||||
yield return new Friend( Internal.GetFriendByIndex( i, (int)flag ) );
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<Friend> GetFriends()
|
||||
{
|
||||
return GetFriendsWithFlag(FriendFlags.Immediate);
|
||||
}
|
||||
|
||||
public static IEnumerable<Friend> GetBlocked()
|
||||
{
|
||||
return GetFriendsWithFlag(FriendFlags.Blocked);
|
||||
}
|
||||
|
||||
public static IEnumerable<Friend> GetFriendsRequested()
|
||||
{
|
||||
return GetFriendsWithFlag( FriendFlags.FriendshipRequested );
|
||||
}
|
||||
|
||||
public static IEnumerable<Friend> GetFriendsClanMembers()
|
||||
{
|
||||
return GetFriendsWithFlag( FriendFlags.ClanMember );
|
||||
}
|
||||
|
||||
public static IEnumerable<Friend> GetFriendsOnGameServer()
|
||||
{
|
||||
return GetFriendsWithFlag( FriendFlags.OnGameServer );
|
||||
}
|
||||
|
||||
public static IEnumerable<Friend> GetFriendsRequestingFriendship()
|
||||
{
|
||||
return GetFriendsWithFlag( FriendFlags.RequestingFriendship );
|
||||
}
|
||||
|
||||
public static IEnumerable<Friend> GetPlayedWith()
|
||||
{
|
||||
for ( int i = 0; i < Internal.GetCoplayFriendCount(); i++ )
|
||||
{
|
||||
yield return new Friend( Internal.GetCoplayFriend( i ) );
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<Friend> GetFromSource( SteamId steamid )
|
||||
{
|
||||
for ( int i = 0; i < Internal.GetFriendCountFromSource( steamid ); i++ )
|
||||
{
|
||||
yield return new Friend( Internal.GetFriendFromSourceByIndex( steamid, i ) );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The dialog to open. Valid options are:
|
||||
/// "friends",
|
||||
/// "community",
|
||||
/// "players",
|
||||
/// "settings",
|
||||
/// "officialgamegroup",
|
||||
/// "stats",
|
||||
/// "achievements".
|
||||
/// </summary>
|
||||
public static void OpenOverlay( string type ) => Internal.ActivateGameOverlay( type );
|
||||
|
||||
/// <summary>
|
||||
/// "steamid" - Opens the overlay web browser to the specified user or groups profile.
|
||||
/// "chat" - Opens a chat window to the specified user, or joins the group chat.
|
||||
/// "jointrade" - Opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API.
|
||||
/// "stats" - Opens the overlay web browser to the specified user's stats.
|
||||
/// "achievements" - Opens the overlay web browser to the specified user's achievements.
|
||||
/// "friendadd" - Opens the overlay in minimal mode prompting the user to add the target user as a friend.
|
||||
/// "friendremove" - Opens the overlay in minimal mode prompting the user to remove the target friend.
|
||||
/// "friendrequestaccept" - Opens the overlay in minimal mode prompting the user to accept an incoming friend invite.
|
||||
/// "friendrequestignore" - Opens the overlay in minimal mode prompting the user to ignore an incoming friend invite.
|
||||
/// </summary>
|
||||
public static void OpenUserOverlay( SteamId id, string type ) => Internal.ActivateGameOverlayToUser( type, id );
|
||||
|
||||
/// <summary>
|
||||
/// Activates the Steam Overlay to the Steam store page for the provided app.
|
||||
/// </summary>
|
||||
public static void OpenStoreOverlay( AppId id ) => Internal.ActivateGameOverlayToStore( id.Value, OverlayToStoreFlag.None );
|
||||
|
||||
/// <summary>
|
||||
/// Activates Steam Overlay web browser directly to the specified URL.
|
||||
/// </summary>
|
||||
public static void OpenWebOverlay( string url, bool modal = false ) => Internal.ActivateGameOverlayToWebPage( url, modal ? ActivateGameOverlayToWebPageMode.Modal : ActivateGameOverlayToWebPageMode.Default );
|
||||
|
||||
/// <summary>
|
||||
/// Activates the Steam Overlay to open the invite dialog. Invitations sent from this dialog will be for the provided lobby.
|
||||
/// </summary>
|
||||
public static void OpenGameInviteOverlay( SteamId lobby ) => Internal.ActivateGameOverlayInviteDialog( lobby );
|
||||
|
||||
/// <summary>
|
||||
/// Mark a target user as 'played with'.
|
||||
/// NOTE: The current user must be in game with the other player for the association to work.
|
||||
/// </summary>
|
||||
public static void SetPlayedWith( SteamId steamid ) => Internal.SetPlayedWith( steamid );
|
||||
|
||||
/// <summary>
|
||||
/// Requests the persona name and optionally the avatar of a specified user.
|
||||
/// NOTE: It's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them.
|
||||
/// returns true if we're fetching the data, false if we already have it
|
||||
/// </summary>
|
||||
public static bool RequestUserInformation( SteamId steamid, bool nameonly = true ) => Internal.RequestUserInformation( steamid, nameonly );
|
||||
|
||||
|
||||
internal static async Task CacheUserInformationAsync( SteamId steamid, bool nameonly )
|
||||
{
|
||||
// Got it straight away, skip any waiting.
|
||||
if ( !RequestUserInformation( steamid, nameonly ) )
|
||||
return;
|
||||
|
||||
await Task.Delay( 100 );
|
||||
|
||||
while ( RequestUserInformation( steamid, nameonly ) )
|
||||
{
|
||||
await Task.Delay( 50 );
|
||||
}
|
||||
|
||||
//
|
||||
// And extra wait here seems to solve avatars loading as [?]
|
||||
//
|
||||
await Task.Delay( 500 );
|
||||
}
|
||||
|
||||
public static async Task<Data.Image?> GetSmallAvatarAsync( SteamId steamid )
|
||||
{
|
||||
await CacheUserInformationAsync( steamid, false );
|
||||
return SteamUtils.GetImage( Internal.GetSmallFriendAvatar( steamid ) );
|
||||
}
|
||||
|
||||
public static async Task<Data.Image?> GetMediumAvatarAsync( SteamId steamid )
|
||||
{
|
||||
await CacheUserInformationAsync( steamid, false );
|
||||
return SteamUtils.GetImage( Internal.GetMediumFriendAvatar( steamid ) );
|
||||
}
|
||||
|
||||
public static async Task<Data.Image?> GetLargeAvatarAsync( SteamId steamid )
|
||||
{
|
||||
await CacheUserInformationAsync( steamid, false );
|
||||
|
||||
var imageid = Internal.GetLargeFriendAvatar( steamid );
|
||||
|
||||
// Wait for the image to download
|
||||
while ( imageid == -1 )
|
||||
{
|
||||
await Task.Delay( 50 );
|
||||
imageid = Internal.GetLargeFriendAvatar( steamid );
|
||||
}
|
||||
|
||||
return SteamUtils.GetImage( imageid );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Find a rich presence value by key for current user. Will be null if not found.
|
||||
/// </summary>
|
||||
public static string GetRichPresence( string key )
|
||||
{
|
||||
if ( richPresence.TryGetValue( key, out var val ) )
|
||||
return val;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a rich presence value by key for current user.
|
||||
/// </summary>
|
||||
public static bool SetRichPresence( string key, string value )
|
||||
{
|
||||
bool success = Internal.SetRichPresence( key, value );
|
||||
|
||||
if ( success )
|
||||
richPresence[key] = value;
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears all of the current user's rich presence data.
|
||||
/// </summary>
|
||||
public static void ClearRichPresence()
|
||||
{
|
||||
richPresence.Clear();
|
||||
Internal.ClearRichPresence();
|
||||
}
|
||||
|
||||
static bool _listenForFriendsMessages;
|
||||
|
||||
/// <summary>
|
||||
/// Listens for Steam friends chat messages.
|
||||
/// You can then show these chats inline in the game. For example with a Blizzard style chat message system or the chat system in Dota 2.
|
||||
/// After enabling this you will receive callbacks when ever the user receives a chat message.
|
||||
/// </summary>
|
||||
public static bool ListenForFriendsMessages
|
||||
{
|
||||
get => _listenForFriendsMessages;
|
||||
|
||||
set
|
||||
{
|
||||
_listenForFriendsMessages = value;
|
||||
Internal.SetListenForFriendsMessages( value );
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<bool> IsFollowing(SteamId steamID)
|
||||
{
|
||||
var r = await Internal.IsFollowing(steamID);
|
||||
return r.Value.IsFollowing;
|
||||
}
|
||||
|
||||
public static async Task<int> GetFollowerCount(SteamId steamID)
|
||||
{
|
||||
var r = await Internal.GetFollowerCount(steamID);
|
||||
return r.Value.Count;
|
||||
}
|
||||
|
||||
public static async Task<SteamId[]> GetFollowingList()
|
||||
{
|
||||
int resultCount = 0;
|
||||
var steamIds = new List<SteamId>();
|
||||
|
||||
FriendsEnumerateFollowingList_t? result;
|
||||
|
||||
do
|
||||
{
|
||||
if ( (result = await Internal.EnumerateFollowingList((uint)resultCount)) != null)
|
||||
{
|
||||
resultCount += result.Value.ResultsReturned;
|
||||
|
||||
Array.ForEach(result.Value.GSteamID, id => { if (id > 0) steamIds.Add(id); });
|
||||
}
|
||||
} while (result != null && resultCount < result.Value.TotalResultCount);
|
||||
|
||||
return steamIds.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
102
Facepunch.Steamworks/SteamInput.cs
Normal file
102
Facepunch.Steamworks/SteamInput.cs
Normal file
@@ -0,0 +1,102 @@
|
||||
using Facepunch.Steamworks.Data;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
public class SteamInput : SteamClientClass<SteamInput>
|
||||
{
|
||||
internal static ISteamInput Internal => Interface as ISteamInput;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamInput( server ) );
|
||||
}
|
||||
|
||||
internal const int STEAM_CONTROLLER_MAX_COUNT = 16;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// You shouldn't really need to call this because it get called by RunCallbacks on SteamClient
|
||||
/// but Valve think it might be a nice idea if you call it right before you get input info -
|
||||
/// just to make sure the info you're getting is 100% up to date.
|
||||
/// </summary>
|
||||
public static void RunFrame()
|
||||
{
|
||||
Internal.RunFrame();
|
||||
}
|
||||
|
||||
static readonly InputHandle_t[] queryArray = new InputHandle_t[STEAM_CONTROLLER_MAX_COUNT];
|
||||
|
||||
/// <summary>
|
||||
/// Return a list of connected controllers.
|
||||
/// </summary>
|
||||
public static IEnumerable<Controller> Controllers
|
||||
{
|
||||
get
|
||||
{
|
||||
var num = Internal.GetConnectedControllers( queryArray );
|
||||
|
||||
for ( int i = 0; i < num; i++ )
|
||||
{
|
||||
yield return new Controller( queryArray[i] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Return an absolute path to the PNG image glyph for the provided digital action name. The current
|
||||
/// action set in use for the controller will be used for the lookup. You should cache the result and
|
||||
/// maintain your own list of loaded PNG assets.
|
||||
/// </summary>
|
||||
/// <param name="controller"></param>
|
||||
/// <param name="action"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetDigitalActionGlyph( Controller controller, string action )
|
||||
{
|
||||
InputActionOrigin origin = InputActionOrigin.None;
|
||||
|
||||
Internal.GetDigitalActionOrigins(
|
||||
controller.Handle,
|
||||
Internal.GetCurrentActionSet(controller.Handle),
|
||||
GetDigitalActionHandle(action),
|
||||
ref origin
|
||||
);
|
||||
|
||||
return Internal.GetGlyphForActionOrigin(origin);
|
||||
}
|
||||
|
||||
internal static Dictionary<string, InputDigitalActionHandle_t> DigitalHandles = new Dictionary<string, InputDigitalActionHandle_t>();
|
||||
internal static InputDigitalActionHandle_t GetDigitalActionHandle( string name )
|
||||
{
|
||||
if ( DigitalHandles.TryGetValue( name, out var val ) )
|
||||
return val;
|
||||
|
||||
val = Internal.GetDigitalActionHandle( name );
|
||||
DigitalHandles.Add( name, val );
|
||||
return val;
|
||||
}
|
||||
|
||||
internal static Dictionary<string, InputAnalogActionHandle_t> AnalogHandles = new Dictionary<string, InputAnalogActionHandle_t>();
|
||||
internal static InputAnalogActionHandle_t GetAnalogActionHandle( string name )
|
||||
{
|
||||
if ( AnalogHandles.TryGetValue( name, out var val ) )
|
||||
return val;
|
||||
|
||||
val = Internal.GetAnalogActionHandle( name );
|
||||
AnalogHandles.Add( name, val );
|
||||
return val;
|
||||
}
|
||||
|
||||
internal static Dictionary<string, InputActionSetHandle_t> ActionSets = new Dictionary<string, InputActionSetHandle_t>();
|
||||
internal static InputActionSetHandle_t GetActionSetHandle( string name )
|
||||
{
|
||||
if ( ActionSets.TryGetValue( name, out var val ) )
|
||||
return val;
|
||||
|
||||
val = Internal.GetActionSetHandle( name );
|
||||
ActionSets.Add( name, val );
|
||||
return val;
|
||||
}
|
||||
}
|
||||
}
|
||||
365
Facepunch.Steamworks/SteamInventory.cs
Normal file
365
Facepunch.Steamworks/SteamInventory.cs
Normal file
@@ -0,0 +1,365 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public class SteamInventory : SteamSharedClass<SteamInventory>
|
||||
{
|
||||
internal static ISteamInventory Internal => Interface as ISteamInventory;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamInventory( server ) );
|
||||
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
internal static void InstallEvents( bool server )
|
||||
{
|
||||
if ( !server )
|
||||
{
|
||||
Dispatch.Install<SteamInventoryFullUpdate_t>( x => InventoryUpdated( x ) );
|
||||
}
|
||||
|
||||
Dispatch.Install<SteamInventoryDefinitionUpdate_t>( x => LoadDefinitions(), server );
|
||||
}
|
||||
|
||||
private static void InventoryUpdated( SteamInventoryFullUpdate_t x )
|
||||
{
|
||||
var r = new InventoryResult( x.Handle, false );
|
||||
Items = r.GetItems( false );
|
||||
|
||||
OnInventoryUpdated?.Invoke( r );
|
||||
}
|
||||
|
||||
public static event Action<InventoryResult> OnInventoryUpdated;
|
||||
public static event Action OnDefinitionsUpdated;
|
||||
|
||||
static void LoadDefinitions()
|
||||
{
|
||||
Definitions = GetDefinitions();
|
||||
|
||||
if ( Definitions == null )
|
||||
return;
|
||||
|
||||
_defMap = new Dictionary<int, InventoryDef>();
|
||||
|
||||
foreach ( var d in Definitions )
|
||||
{
|
||||
_defMap[d.Id] = d;
|
||||
}
|
||||
|
||||
OnDefinitionsUpdated?.Invoke();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Call this if you're going to want to access definition information. You should be able to get
|
||||
/// away with calling this once at the start if your game, assuming your items don't change all the time.
|
||||
/// This will trigger OnDefinitionsUpdated at which point Definitions should be set.
|
||||
/// </summary>
|
||||
public static void LoadItemDefinitions()
|
||||
{
|
||||
// If they're null, try to load them immediately
|
||||
// my hunch is that this loads a disk cached version
|
||||
// but waiting for LoadItemDefinitions downloads a new copy
|
||||
// from Steam's servers. So this will give us immediate data
|
||||
// where as Steam's inventory servers could be slow/down
|
||||
if ( Definitions == null )
|
||||
{
|
||||
LoadDefinitions();
|
||||
}
|
||||
|
||||
Internal.LoadItemDefinitions();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Will call LoadItemDefinitions and wait until Definitions is not null
|
||||
/// </summary>
|
||||
public static async Task<bool> WaitForDefinitions( float timeoutSeconds = 30 )
|
||||
{
|
||||
if ( Definitions != null )
|
||||
return true;
|
||||
|
||||
LoadDefinitions();
|
||||
LoadItemDefinitions();
|
||||
|
||||
if ( Definitions != null )
|
||||
return true;
|
||||
|
||||
var sw = Stopwatch.StartNew();
|
||||
|
||||
while ( Definitions == null )
|
||||
{
|
||||
if ( sw.Elapsed.TotalSeconds > timeoutSeconds )
|
||||
return false;
|
||||
|
||||
await Task.Delay( 10 );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to find the definition that matches this definition ID.
|
||||
/// Uses a dictionary so should be about as fast as possible.
|
||||
/// </summary>
|
||||
public static InventoryDef FindDefinition( InventoryDefId defId )
|
||||
{
|
||||
if ( _defMap == null )
|
||||
return null;
|
||||
|
||||
if ( _defMap.TryGetValue( defId, out var val ) )
|
||||
return val;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static string Currency { get; internal set; }
|
||||
|
||||
public static async Task<InventoryDef[]> GetDefinitionsWithPricesAsync()
|
||||
{
|
||||
var priceRequest = await Internal.RequestPrices();
|
||||
if ( !priceRequest.HasValue || priceRequest.Value.Result != Result.OK )
|
||||
return null;
|
||||
|
||||
Currency = priceRequest?.CurrencyUTF8();
|
||||
|
||||
var num = Internal.GetNumItemsWithPrices();
|
||||
|
||||
if ( num <= 0 )
|
||||
return null;
|
||||
|
||||
var defs = new InventoryDefId[num];
|
||||
var currentPrices = new ulong[num];
|
||||
var baseprices = new ulong[num];
|
||||
|
||||
var gotPrices = Internal.GetItemsWithPrices( defs, currentPrices, baseprices, num );
|
||||
if ( !gotPrices )
|
||||
return null;
|
||||
|
||||
return defs.Select( x => new InventoryDef( x ) ).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We will try to keep this list of your items automatically up to date.
|
||||
/// </summary>
|
||||
public static InventoryItem[] Items { get; internal set; }
|
||||
|
||||
public static InventoryDef[] Definitions { get; internal set; }
|
||||
static Dictionary<int, InventoryDef> _defMap;
|
||||
|
||||
internal static InventoryDef[] GetDefinitions()
|
||||
{
|
||||
uint num = 0;
|
||||
if ( !Internal.GetItemDefinitionIDs( null, ref num ) )
|
||||
return null;
|
||||
|
||||
var defs = new InventoryDefId[num];
|
||||
|
||||
if ( !Internal.GetItemDefinitionIDs( defs, ref num ) )
|
||||
return null;
|
||||
|
||||
return defs.Select( x => new InventoryDef( x ) ).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update the list of Items[]
|
||||
/// </summary>
|
||||
public static bool GetAllItems()
|
||||
{
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
return Internal.GetAllItems( ref sresult );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get all items and return the InventoryResult
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> GetAllItemsAsync()
|
||||
{
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
if ( !Internal.GetAllItems( ref sresult ) )
|
||||
return null;
|
||||
|
||||
return await InventoryResult.GetAsync( sresult );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is used to grant a specific item to the user. This should
|
||||
/// only be used for development prototyping, from a trusted server,
|
||||
/// or if you don't care about hacked clients granting arbitrary items.
|
||||
/// This call can be disabled by a setting on Steamworks.
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> GenerateItemAsync( InventoryDef target, int amount )
|
||||
{
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
var defs = new InventoryDefId[] { target.Id };
|
||||
var cnts = new uint[] { (uint)amount };
|
||||
|
||||
if ( !Internal.GenerateItems( ref sresult, defs, cnts, 1 ) )
|
||||
return null;
|
||||
|
||||
return await InventoryResult.GetAsync( sresult );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Crafting! Uses the passed items to buy the target item.
|
||||
/// You need to have set up the appropriate exchange rules in your item
|
||||
/// definitions. This assumes all the items passed in aren't stacked.
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> CraftItemAsync( InventoryItem[] list, InventoryDef target )
|
||||
{
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
var give = new InventoryDefId[] { target.Id };
|
||||
var givec = new uint[] { 1 };
|
||||
|
||||
var sell = list.Select( x => x.Id ).ToArray();
|
||||
var sellc = list.Select( x => (uint)1 ).ToArray();
|
||||
|
||||
if ( !Internal.ExchangeItems( ref sresult, give, givec, 1, sell, sellc, (uint)sell.Length ) )
|
||||
return null;
|
||||
|
||||
return await InventoryResult.GetAsync( sresult );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Crafting! Uses the passed items to buy the target item.
|
||||
/// You need to have set up the appropriate exchange rules in your item
|
||||
/// definitions. This assumes all the items passed in aren't stacked.
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> CraftItemAsync( InventoryItem.Amount[] list, InventoryDef target )
|
||||
{
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
var give = new InventoryDefId[] { target.Id };
|
||||
var givec = new uint[] { 1 };
|
||||
|
||||
var sell = list.Select( x => x.Item.Id ).ToArray();
|
||||
var sellc = list.Select( x => (uint) x.Quantity ).ToArray();
|
||||
|
||||
if ( !Internal.ExchangeItems( ref sresult, give, givec, 1, sell, sellc, (uint)sell.Length ) )
|
||||
return null;
|
||||
|
||||
return await InventoryResult.GetAsync( sresult );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Deserializes a result set and verifies the signature bytes.
|
||||
/// This call has a potential soft-failure mode where the Result is expired, it will
|
||||
/// still succeed in this mode.The "expired"
|
||||
/// result could indicate that the data may be out of date - not just due to timed
|
||||
/// expiration( one hour ), but also because one of the items in the result set may
|
||||
/// have been traded or consumed since the result set was generated.You could compare
|
||||
/// the timestamp from GetResultTimestamp to ISteamUtils::GetServerRealTime to determine
|
||||
/// how old the data is. You could simply ignore the "expired" result code and
|
||||
/// continue as normal, or you could request the player with expired data to send
|
||||
/// an updated result set.
|
||||
/// You should call CheckResultSteamID on the result handle when it completes to verify
|
||||
/// that a remote player is not pretending to have a different user's inventory.
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> DeserializeAsync( byte[] data, int dataLength = -1 )
|
||||
{
|
||||
if ( data == null )
|
||||
throw new ArgumentException( "data should not be null" );
|
||||
|
||||
if ( dataLength == -1 )
|
||||
dataLength = data.Length;
|
||||
|
||||
var ptr = Marshal.AllocHGlobal( dataLength );
|
||||
|
||||
try
|
||||
{
|
||||
Marshal.Copy( data, 0, ptr, dataLength );
|
||||
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
if ( !Internal.DeserializeResult( ref sresult, (IntPtr)ptr, (uint)dataLength, false ) )
|
||||
return null;
|
||||
|
||||
|
||||
|
||||
return await InventoryResult.GetAsync( sresult.Value );
|
||||
}
|
||||
finally
|
||||
{
|
||||
Marshal.FreeHGlobal( ptr );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Grant all promotional items the user is eligible for
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> GrantPromoItemsAsync()
|
||||
{
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
if ( !Internal.GrantPromoItems( ref sresult ) )
|
||||
return null;
|
||||
|
||||
return await InventoryResult.GetAsync( sresult );
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Trigger an item drop for this user. This is for timed drops.
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> TriggerItemDropAsync( InventoryDefId id )
|
||||
{
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
if ( !Internal.TriggerItemDrop( ref sresult, id ) )
|
||||
return null;
|
||||
|
||||
return await InventoryResult.GetAsync( sresult );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Trigger a promo item drop. You can call this at startup, it won't
|
||||
/// give users multiple promo drops.
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> AddPromoItemAsync( InventoryDefId id )
|
||||
{
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
if ( !Internal.AddPromoItem( ref sresult, id ) )
|
||||
return null;
|
||||
|
||||
return await InventoryResult.GetAsync( sresult );
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Start buying a cart load of items. This will return a positive result is the purchase has
|
||||
/// begun. You should listen out for SteamUser.OnMicroTxnAuthorizationResponse for a success.
|
||||
/// </summary>
|
||||
public static async Task<InventoryPurchaseResult?> StartPurchaseAsync( InventoryDef[] items )
|
||||
{
|
||||
var item_i = items.Select( x => x._id ).ToArray();
|
||||
var item_q = items.Select( x => (uint)1 ).ToArray();
|
||||
|
||||
var r = await Internal.StartPurchase( item_i, item_q, (uint)item_i.Length );
|
||||
if ( !r.HasValue ) return null;
|
||||
|
||||
return new InventoryPurchaseResult
|
||||
{
|
||||
Result = r.Value.Result,
|
||||
OrderID = r.Value.OrderID,
|
||||
TransID = r.Value.TransID
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
218
Facepunch.Steamworks/SteamMatchmaking.cs
Normal file
218
Facepunch.Steamworks/SteamMatchmaking.cs
Normal file
@@ -0,0 +1,218 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Functions for clients to access matchmaking services, favorites, and to operate on game lobbies
|
||||
/// </summary>
|
||||
public class SteamMatchmaking : SteamClientClass<SteamMatchmaking>
|
||||
{
|
||||
internal static ISteamMatchmaking Internal => Interface as ISteamMatchmaking;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamMatchmaking( server ) );
|
||||
|
||||
InstallEvents();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Maximum number of characters a lobby metadata key can be
|
||||
/// </summary>
|
||||
internal static int MaxLobbyKeyLength => 255;
|
||||
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
Dispatch.Install<LobbyInvite_t>( x => OnLobbyInvite?.Invoke( new Friend( x.SteamIDUser ), new Lobby( x.SteamIDLobby ) ) );
|
||||
|
||||
Dispatch.Install<LobbyEnter_t>( x => OnLobbyEntered?.Invoke( new Lobby( x.SteamIDLobby ) ) );
|
||||
|
||||
Dispatch.Install<LobbyCreated_t>( x => OnLobbyCreated?.Invoke( x.Result, new Lobby( x.SteamIDLobby ) ) );
|
||||
|
||||
Dispatch.Install<LobbyGameCreated_t>( x => OnLobbyGameCreated?.Invoke( new Lobby( x.SteamIDLobby ), x.IP, x.Port, x.SteamIDGameServer ) );
|
||||
|
||||
Dispatch.Install<LobbyDataUpdate_t>( x =>
|
||||
{
|
||||
if ( x.Success == 0 ) return;
|
||||
|
||||
if ( x.SteamIDLobby == x.SteamIDMember )
|
||||
OnLobbyDataChanged?.Invoke( new Lobby( x.SteamIDLobby ) );
|
||||
else
|
||||
OnLobbyMemberDataChanged?.Invoke( new Lobby( x.SteamIDLobby ), new Friend( x.SteamIDMember ) );
|
||||
} );
|
||||
|
||||
Dispatch.Install<LobbyChatUpdate_t>( x =>
|
||||
{
|
||||
if ( (x.GfChatMemberStateChange & (int)ChatMemberStateChange.Entered) != 0 )
|
||||
OnLobbyMemberJoined?.Invoke( new Lobby( x.SteamIDLobby ), new Friend( x.SteamIDUserChanged ) );
|
||||
|
||||
if ( (x.GfChatMemberStateChange & (int)ChatMemberStateChange.Left) != 0 )
|
||||
OnLobbyMemberLeave?.Invoke( new Lobby( x.SteamIDLobby ), new Friend( x.SteamIDUserChanged ) );
|
||||
|
||||
if ( (x.GfChatMemberStateChange & (int)ChatMemberStateChange.Disconnected) != 0 )
|
||||
OnLobbyMemberDisconnected?.Invoke( new Lobby( x.SteamIDLobby ), new Friend( x.SteamIDUserChanged ) );
|
||||
|
||||
if ( (x.GfChatMemberStateChange & (int)ChatMemberStateChange.Kicked) != 0 )
|
||||
OnLobbyMemberKicked?.Invoke( new Lobby( x.SteamIDLobby ), new Friend( x.SteamIDUserChanged ), new Friend( x.SteamIDMakingChange ) );
|
||||
|
||||
if ( (x.GfChatMemberStateChange & (int)ChatMemberStateChange.Banned) != 0 )
|
||||
OnLobbyMemberBanned?.Invoke( new Lobby( x.SteamIDLobby ), new Friend( x.SteamIDUserChanged ), new Friend( x.SteamIDMakingChange ) );
|
||||
} );
|
||||
|
||||
Dispatch.Install<LobbyChatMsg_t>( OnLobbyChatMessageRecievedAPI );
|
||||
}
|
||||
|
||||
static private unsafe void OnLobbyChatMessageRecievedAPI( LobbyChatMsg_t callback )
|
||||
{
|
||||
SteamId steamid = default;
|
||||
ChatEntryType chatEntryType = default;
|
||||
var buffer = Helpers.TakeMemory();
|
||||
|
||||
var readData = Internal.GetLobbyChatEntry( callback.SteamIDLobby, (int)callback.ChatID, ref steamid, buffer, Helpers.MemoryBufferSize, ref chatEntryType );
|
||||
|
||||
if ( readData > 0 )
|
||||
{
|
||||
OnChatMessage?.Invoke( new Lobby( callback.SteamIDLobby ), new Friend( steamid ), Helpers.MemoryToString( buffer ) );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Someone invited you to a lobby
|
||||
/// </summary>
|
||||
public static event Action<Friend, Lobby> OnLobbyInvite;
|
||||
|
||||
/// <summary>
|
||||
/// You joined a lobby
|
||||
/// </summary>
|
||||
public static event Action<Lobby> OnLobbyEntered;
|
||||
|
||||
/// <summary>
|
||||
/// You created a lobby
|
||||
/// </summary>
|
||||
public static event Action<Result, Lobby> OnLobbyCreated;
|
||||
|
||||
/// <summary>
|
||||
/// A game server has been associated with the lobby
|
||||
/// </summary>
|
||||
public static event Action<Lobby, uint, ushort, SteamId> OnLobbyGameCreated;
|
||||
|
||||
/// <summary>
|
||||
/// The lobby metadata has changed
|
||||
/// </summary>
|
||||
public static event Action<Lobby> OnLobbyDataChanged;
|
||||
|
||||
/// <summary>
|
||||
/// The lobby member metadata has changed
|
||||
/// </summary>
|
||||
public static event Action<Lobby, Friend> OnLobbyMemberDataChanged;
|
||||
|
||||
/// <summary>
|
||||
/// The lobby member joined
|
||||
/// </summary>
|
||||
public static event Action<Lobby, Friend> OnLobbyMemberJoined;
|
||||
|
||||
/// <summary>
|
||||
/// The lobby member left the room
|
||||
/// </summary>
|
||||
public static event Action<Lobby, Friend> OnLobbyMemberLeave;
|
||||
|
||||
/// <summary>
|
||||
/// The lobby member left the room
|
||||
/// </summary>
|
||||
public static event Action<Lobby, Friend> OnLobbyMemberDisconnected;
|
||||
|
||||
/// <summary>
|
||||
/// The lobby member was kicked. The 3rd param is the user that kicked them.
|
||||
/// </summary>
|
||||
public static event Action<Lobby, Friend, Friend> OnLobbyMemberKicked;
|
||||
|
||||
/// <summary>
|
||||
/// The lobby member was banned. The 3rd param is the user that banned them.
|
||||
/// </summary>
|
||||
public static event Action<Lobby, Friend, Friend> OnLobbyMemberBanned;
|
||||
|
||||
/// <summary>
|
||||
/// A chat message was recieved from a member of a lobby
|
||||
/// </summary>
|
||||
public static event Action<Lobby, Friend, string> OnChatMessage;
|
||||
|
||||
public static LobbyQuery LobbyList => new LobbyQuery();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new invisible lobby. Call lobby.SetPublic to take it online.
|
||||
/// </summary>
|
||||
public static async Task<Lobby?> CreateLobbyAsync( int maxMembers = 100 )
|
||||
{
|
||||
var lobby = await Internal.CreateLobby( LobbyType.Invisible, maxMembers );
|
||||
if ( !lobby.HasValue || lobby.Value.Result != Result.OK ) return null;
|
||||
|
||||
return new Lobby { Id = lobby.Value.SteamIDLobby };
|
||||
}
|
||||
|
||||
/// <summmary>
|
||||
/// Attempts to directly join the specified lobby
|
||||
/// </summmary>
|
||||
public static async Task<Lobby?> JoinLobbyAsync( SteamId lobbyId )
|
||||
{
|
||||
var lobby = await Internal.JoinLobby( lobbyId );
|
||||
if ( !lobby.HasValue ) return null;
|
||||
|
||||
return new Lobby { Id = lobby.Value.SteamIDLobby };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of servers that are on your favorites list
|
||||
/// </summary>
|
||||
public static IEnumerable<ServerInfo> GetFavoriteServers()
|
||||
{
|
||||
var count = Internal.GetFavoriteGameCount();
|
||||
|
||||
for( int i=0; i<count; i++ )
|
||||
{
|
||||
uint timeplayed = 0;
|
||||
uint flags = 0;
|
||||
ushort qport = 0;
|
||||
ushort cport = 0;
|
||||
uint ip = 0;
|
||||
AppId appid = default;
|
||||
|
||||
if ( Internal.GetFavoriteGame( i, ref appid, ref ip, ref cport, ref qport, ref flags, ref timeplayed ) )
|
||||
{
|
||||
if ( (flags & ServerInfo.k_unFavoriteFlagFavorite) == 0 ) continue;
|
||||
yield return new ServerInfo( ip, cport, qport, timeplayed );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of servers that you have added to your play history
|
||||
/// </summary>
|
||||
public static IEnumerable<ServerInfo> GetHistoryServers()
|
||||
{
|
||||
var count = Internal.GetFavoriteGameCount();
|
||||
|
||||
for ( int i = 0; i < count; i++ )
|
||||
{
|
||||
uint timeplayed = 0;
|
||||
uint flags = 0;
|
||||
ushort qport = 0;
|
||||
ushort cport = 0;
|
||||
uint ip = 0;
|
||||
AppId appid = default;
|
||||
|
||||
if ( Internal.GetFavoriteGame( i, ref appid, ref ip, ref cport, ref qport, ref flags, ref timeplayed ) )
|
||||
{
|
||||
if ( (flags & ServerInfo.k_unFavoriteFlagHistory) == 0 ) continue;
|
||||
yield return new ServerInfo( ip, cport, qport, timeplayed );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
22
Facepunch.Steamworks/SteamMatchmakingServers.cs
Normal file
22
Facepunch.Steamworks/SteamMatchmakingServers.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Functions for clients to access matchmaking services, favorites, and to operate on game lobbies
|
||||
/// </summary>
|
||||
internal class SteamMatchmakingServers : SteamClientClass<SteamMatchmakingServers>
|
||||
{
|
||||
internal static ISteamMatchmakingServers Internal => Interface as ISteamMatchmakingServers;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamMatchmakingServers( server ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
82
Facepunch.Steamworks/SteamMusic.cs
Normal file
82
Facepunch.Steamworks/SteamMusic.cs
Normal file
@@ -0,0 +1,82 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Functions to control music playback in the steam client.
|
||||
/// This gives games the opportunity to do things like pause the music or lower the volume,
|
||||
/// when an important cut scene is shown, and start playing afterwards.
|
||||
/// Nothing uses Steam Music though so this can probably get fucked
|
||||
/// </summary>
|
||||
public class SteamMusic : SteamClientClass<SteamMusic>
|
||||
{
|
||||
internal static ISteamMusic Internal => Interface as ISteamMusic;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamMusic( server ) );
|
||||
|
||||
InstallEvents();
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
Dispatch.Install<PlaybackStatusHasChanged_t>( x => OnPlaybackChanged?.Invoke() );
|
||||
Dispatch.Install<VolumeHasChanged_t>( x => OnVolumeChanged?.Invoke( x.NewVolume ) );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Playback status changed
|
||||
/// </summary>
|
||||
public static event Action OnPlaybackChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Volume changed, parameter is new volume
|
||||
/// </summary>
|
||||
public static event Action<float> OnVolumeChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Checks if Steam Music is enabled
|
||||
/// </summary>
|
||||
public static bool IsEnabled => Internal.BIsEnabled();
|
||||
|
||||
/// <summary>
|
||||
/// true if a song is currently playing, paused, or queued up to play; otherwise false.
|
||||
/// </summary>
|
||||
public static bool IsPlaying => Internal.BIsPlaying();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current status of the Steam Music player
|
||||
/// </summary>
|
||||
public static MusicStatus Status => Internal.GetPlaybackStatus();
|
||||
|
||||
|
||||
public static void Play() => Internal.Play();
|
||||
|
||||
public static void Pause() => Internal.Pause();
|
||||
|
||||
/// <summary>
|
||||
/// Have the Steam Music player play the previous song.
|
||||
/// </summary>
|
||||
public static void PlayPrevious() => Internal.PlayPrevious();
|
||||
|
||||
/// <summary>
|
||||
/// Have the Steam Music player skip to the next song
|
||||
/// </summary>
|
||||
public static void PlayNext() => Internal.PlayNext();
|
||||
|
||||
/// <summary>
|
||||
/// Gets/Sets the current volume of the Steam Music player
|
||||
/// </summary>
|
||||
public static float Volume
|
||||
{
|
||||
get => Internal.GetVolume();
|
||||
set => Internal.SetVolume( value );
|
||||
}
|
||||
}
|
||||
}
|
||||
144
Facepunch.Steamworks/SteamNetworking.cs
Normal file
144
Facepunch.Steamworks/SteamNetworking.cs
Normal file
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
public class SteamNetworking : SteamSharedClass<SteamNetworking>
|
||||
{
|
||||
internal static ISteamNetworking Internal => Interface as ISteamNetworking;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamNetworking( server ) );
|
||||
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
internal static void InstallEvents( bool server )
|
||||
{
|
||||
Dispatch.Install<P2PSessionRequest_t>( x => OnP2PSessionRequest?.Invoke( x.SteamIDRemote ), server );
|
||||
Dispatch.Install<P2PSessionConnectFail_t>( x => OnP2PConnectionFailed?.Invoke( x.SteamIDRemote, (P2PSessionError) x.P2PSessionError ), server );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This SteamId wants to send you a message. You should respond by calling AcceptP2PSessionWithUser
|
||||
/// if you want to recieve their messages
|
||||
/// </summary>
|
||||
public static Action<SteamId> OnP2PSessionRequest;
|
||||
|
||||
/// <summary>
|
||||
/// Called when packets can't get through to the specified user.
|
||||
/// All queued packets unsent at this point will be dropped, further attempts
|
||||
/// to send will retry making the connection (but will be dropped if we fail again).
|
||||
/// </summary>
|
||||
public static Action<SteamId, P2PSessionError> OnP2PConnectionFailed;
|
||||
|
||||
/// <summary>
|
||||
/// This should be called in response to a OnP2PSessionRequest
|
||||
/// </summary>
|
||||
public static bool AcceptP2PSessionWithUser( SteamId user ) => Internal.AcceptP2PSessionWithUser( user );
|
||||
|
||||
/// <summary>
|
||||
/// Allow or disallow P2P connects to fall back on Steam server relay if direct
|
||||
/// connection or NAT traversal can't be established. Applies to connections
|
||||
/// created after setting or old connections that need to reconnect.
|
||||
/// </summary>
|
||||
public static bool AllowP2PPacketRelay( bool allow ) => Internal.AllowP2PPacketRelay( allow );
|
||||
|
||||
/// <summary>
|
||||
/// This should be called when you're done communicating with a user, as this will
|
||||
/// free up all of the resources allocated for the connection under-the-hood.
|
||||
/// If the remote user tries to send data to you again, a new OnP2PSessionRequest
|
||||
/// callback will be posted
|
||||
/// </summary>
|
||||
public static bool CloseP2PSessionWithUser( SteamId user ) => Internal.CloseP2PSessionWithUser( user );
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a P2P packet is available to read, and gets the size of the message if there is one.
|
||||
/// </summary>
|
||||
public static bool IsP2PPacketAvailable( int channel = 0 )
|
||||
{
|
||||
uint _ = 0;
|
||||
return Internal.IsP2PPacketAvailable( ref _, channel );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads in a packet that has been sent from another user via SendP2PPacket..
|
||||
/// </summary>
|
||||
public unsafe static P2Packet? ReadP2PPacket( int channel = 0 )
|
||||
{
|
||||
uint size = 0;
|
||||
|
||||
if ( !Internal.IsP2PPacketAvailable( ref size, channel ) )
|
||||
return null;
|
||||
|
||||
var buffer = Helpers.TakeBuffer( (int) size );
|
||||
|
||||
fixed ( byte* p = buffer )
|
||||
{
|
||||
SteamId steamid = 1;
|
||||
if ( !Internal.ReadP2PPacket( (IntPtr)p, (uint) buffer.Length, ref size, ref steamid, channel ) || size == 0 )
|
||||
return null;
|
||||
|
||||
var data = new byte[size];
|
||||
Array.Copy( buffer, 0, data, 0, size );
|
||||
|
||||
return new P2Packet
|
||||
{
|
||||
SteamId = steamid,
|
||||
Data = data
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads in a packet that has been sent from another user via SendP2PPacket..
|
||||
/// </summary>
|
||||
public unsafe static bool ReadP2PPacket( byte[] buffer, ref uint size, ref SteamId steamid, int channel = 0 )
|
||||
{
|
||||
fixed (byte* p = buffer) {
|
||||
return Internal.ReadP2PPacket( (IntPtr)p, (uint)buffer.Length, ref size, ref steamid, channel );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads in a packet that has been sent from another user via SendP2PPacket..
|
||||
/// </summary>
|
||||
public unsafe static bool ReadP2PPacket( byte* buffer, uint cbuf, ref uint size, ref SteamId steamid, int channel = 0 )
|
||||
{
|
||||
return Internal.ReadP2PPacket( (IntPtr)buffer, cbuf, ref size, ref steamid, channel );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a P2P packet to the specified user.
|
||||
/// This is a session-less API which automatically establishes NAT-traversing or Steam relay server connections.
|
||||
/// NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
||||
/// </summary>
|
||||
public static unsafe bool SendP2PPacket( SteamId steamid, byte[] data, int length = -1, int nChannel = 0, P2PSend sendType = P2PSend.Reliable )
|
||||
{
|
||||
if ( length <= 0 )
|
||||
length = data.Length;
|
||||
|
||||
fixed ( byte* p = data )
|
||||
{
|
||||
return Internal.SendP2PPacket( steamid, (IntPtr)p, (uint)length, (P2PSend)sendType, nChannel );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a P2P packet to the specified user.
|
||||
/// This is a session-less API which automatically establishes NAT-traversing or Steam relay server connections.
|
||||
/// NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
||||
/// </summary>
|
||||
public static unsafe bool SendP2PPacket( SteamId steamid, byte* data, uint length, int nChannel = 1, P2PSend sendType = P2PSend.Reliable )
|
||||
{
|
||||
return Internal.SendP2PPacket( steamid, (IntPtr)data, (uint)length, (P2PSend)sendType, nChannel );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
194
Facepunch.Steamworks/SteamNetworkingSockets.cs
Normal file
194
Facepunch.Steamworks/SteamNetworkingSockets.cs
Normal file
@@ -0,0 +1,194 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
public class SteamNetworkingSockets : SteamSharedClass<SteamNetworkingSockets>
|
||||
{
|
||||
internal static ISteamNetworkingSockets Internal => Interface as ISteamNetworkingSockets;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamNetworkingSockets( server ) );
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
#region SocketInterface
|
||||
|
||||
static readonly Dictionary<uint, SocketManager> SocketInterfaces = new Dictionary<uint, SocketManager>();
|
||||
|
||||
internal static SocketManager GetSocketManager( uint id )
|
||||
{
|
||||
if ( SocketInterfaces == null ) return null;
|
||||
if ( id == 0 ) throw new System.ArgumentException( "Invalid Socket" );
|
||||
|
||||
if ( SocketInterfaces.TryGetValue( id, out var isocket ) )
|
||||
return isocket;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
internal static void SetSocketManager( uint id, SocketManager manager )
|
||||
{
|
||||
if ( id == 0 ) throw new System.ArgumentException( "Invalid Socket" );
|
||||
SocketInterfaces[id] = manager;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ConnectionInterface
|
||||
static readonly Dictionary<uint, ConnectionManager> ConnectionInterfaces = new Dictionary<uint, ConnectionManager>();
|
||||
|
||||
internal static ConnectionManager GetConnectionManager( uint id )
|
||||
{
|
||||
if ( ConnectionInterfaces == null ) return null;
|
||||
if ( id == 0 ) return null;
|
||||
|
||||
if ( ConnectionInterfaces.TryGetValue( id, out var iconnection ) )
|
||||
return iconnection;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
internal static void SetConnectionManager( uint id, ConnectionManager manager )
|
||||
{
|
||||
if ( id == 0 ) throw new System.ArgumentException( "Invalid Connection" );
|
||||
ConnectionInterfaces[id] = manager;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
internal void InstallEvents( bool server )
|
||||
{
|
||||
Dispatch.Install<SteamNetConnectionStatusChangedCallback_t>( ConnectionStatusChanged, server );
|
||||
}
|
||||
|
||||
|
||||
private static void ConnectionStatusChanged( SteamNetConnectionStatusChangedCallback_t data )
|
||||
{
|
||||
//
|
||||
// This is a message from/to a listen socket
|
||||
//
|
||||
if ( data.Nfo.listenSocket.Id > 0 )
|
||||
{
|
||||
var iface = GetSocketManager( data.Nfo.listenSocket.Id );
|
||||
iface?.OnConnectionChanged( data.Conn, data.Nfo );
|
||||
}
|
||||
else
|
||||
{
|
||||
var iface = GetConnectionManager( data.Conn.Id );
|
||||
iface?.OnConnectionChanged( data.Nfo );
|
||||
}
|
||||
|
||||
OnConnectionStatusChanged?.Invoke( data.Conn, data.Nfo );
|
||||
}
|
||||
|
||||
public static event Action<Connection, ConnectionInfo> OnConnectionStatusChanged;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a "server" socket that listens for clients to connect to by calling
|
||||
/// Connect, over ordinary UDP (IPv4 or IPv6)
|
||||
///
|
||||
/// To use this derive a class from SocketManager and override as much as you want.
|
||||
///
|
||||
/// </summary>
|
||||
public static T CreateNormalSocket<T>( NetAddress address ) where T : SocketManager, new()
|
||||
{
|
||||
var t = new T();
|
||||
var options = Array.Empty<NetKeyValue>();
|
||||
t.Socket = Internal.CreateListenSocketIP( ref address, options.Length, options );
|
||||
t.Initialize();
|
||||
|
||||
SetSocketManager( t.Socket.Id, t );
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a "server" socket that listens for clients to connect to by calling
|
||||
/// Connect, over ordinary UDP (IPv4 or IPv6).
|
||||
///
|
||||
/// To use this you should pass a class that inherits ISocketManager. You can use
|
||||
/// SocketManager to get connections and send messages, but the ISocketManager class
|
||||
/// will received all the appropriate callbacks.
|
||||
///
|
||||
/// </summary>
|
||||
public static SocketManager CreateNormalSocket( NetAddress address, ISocketManager intrface )
|
||||
{
|
||||
var options = Array.Empty<NetKeyValue>();
|
||||
var socket = Internal.CreateListenSocketIP( ref address, options.Length, options );
|
||||
|
||||
var t = new SocketManager
|
||||
{
|
||||
Socket = socket,
|
||||
Interface = intrface
|
||||
};
|
||||
|
||||
t.Initialize();
|
||||
|
||||
SetSocketManager( t.Socket.Id, t );
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connect to a socket created via <method>CreateListenSocketIP</method>
|
||||
/// </summary>
|
||||
public static T ConnectNormal<T>( NetAddress address ) where T : ConnectionManager, new()
|
||||
{
|
||||
var t = new T();
|
||||
var options = Array.Empty<NetKeyValue>();
|
||||
t.Connection = Internal.ConnectByIPAddress( ref address, options.Length, options );
|
||||
SetConnectionManager( t.Connection.Id, t );
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connect to a socket created via <method>CreateListenSocketIP</method>
|
||||
/// </summary>
|
||||
public static ConnectionManager ConnectNormal( NetAddress address, IConnectionManager iface )
|
||||
{
|
||||
var options = Array.Empty<NetKeyValue>();
|
||||
var connection = Internal.ConnectByIPAddress( ref address, options.Length, options );
|
||||
|
||||
var t = new ConnectionManager
|
||||
{
|
||||
Connection = connection,
|
||||
Interface = iface
|
||||
};
|
||||
|
||||
SetConnectionManager( t.Connection.Id, t );
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a server that will be relayed via Valve's network (hiding the IP and improving ping)
|
||||
/// </summary>
|
||||
public static T CreateRelaySocket<T>( int virtualport = 0 ) where T : SocketManager, new()
|
||||
{
|
||||
var t = new T();
|
||||
var options = Array.Empty<NetKeyValue>();
|
||||
t.Socket = Internal.CreateListenSocketP2P( virtualport, options.Length, options );
|
||||
t.Initialize();
|
||||
SetSocketManager( t.Socket.Id, t );
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Connect to a relay server
|
||||
/// </summary>
|
||||
public static T ConnectRelay<T>( SteamId serverId, int virtualport = 0 ) where T : ConnectionManager, new()
|
||||
{
|
||||
var t = new T();
|
||||
NetIdentity identity = serverId;
|
||||
var options = Array.Empty<NetKeyValue>();
|
||||
t.Connection = Internal.ConnectP2P( ref identity, virtualport, options.Length, options );
|
||||
SetConnectionManager( t.Connection.Id, t );
|
||||
return t;
|
||||
}
|
||||
}
|
||||
}
|
||||
352
Facepunch.Steamworks/SteamNetworkingUtils.cs
Normal file
352
Facepunch.Steamworks/SteamNetworkingUtils.cs
Normal file
@@ -0,0 +1,352 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public class SteamNetworkingUtils : SteamSharedClass<SteamNetworkingUtils>
|
||||
{
|
||||
internal static ISteamNetworkingUtils Internal => Interface as ISteamNetworkingUtils;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamNetworkingUtils( server ) );
|
||||
InstallCallbacks( server );
|
||||
}
|
||||
|
||||
static void InstallCallbacks( bool server )
|
||||
{
|
||||
Dispatch.Install<SteamRelayNetworkStatus_t>( x =>
|
||||
{
|
||||
Status = x.Avail;
|
||||
}, server );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A function to receive debug network information on. This will do nothing
|
||||
/// unless you set DebugLevel to something other than None.
|
||||
///
|
||||
/// You should set this to an appropriate level instead of setting it to the highest
|
||||
/// and then filtering it by hand because a lot of energy is used by creating the strings
|
||||
/// and your frame rate will tank and you won't know why.
|
||||
/// </summary>
|
||||
|
||||
public static event Action<NetDebugOutput, string> OnDebugOutput;
|
||||
|
||||
/// <summary>
|
||||
/// The latest available status gathered from the SteamRelayNetworkStatus callback
|
||||
/// </summary>
|
||||
public static SteamNetworkingAvailability Status { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// If you know that you are going to be using the relay network (for example,
|
||||
/// because you anticipate making P2P connections), call this to initialize the
|
||||
/// relay network. If you do not call this, the initialization will
|
||||
/// be delayed until the first time you use a feature that requires access
|
||||
/// to the relay network, which will delay that first access.
|
||||
///
|
||||
/// You can also call this to force a retry if the previous attempt has failed.
|
||||
/// Performing any action that requires access to the relay network will also
|
||||
/// trigger a retry, and so calling this function is never strictly necessary,
|
||||
/// but it can be useful to call it a program launch time, if access to the
|
||||
/// relay network is anticipated.
|
||||
///
|
||||
/// Use GetRelayNetworkStatus or listen for SteamRelayNetworkStatus_t
|
||||
/// callbacks to know when initialization has completed.
|
||||
/// Typically initialization completes in a few seconds.
|
||||
///
|
||||
/// Note: dedicated servers hosted in known data centers do *not* need
|
||||
/// to call this, since they do not make routing decisions. However, if
|
||||
/// the dedicated server will be using P2P functionality, it will act as
|
||||
/// a "client" and this should be called.
|
||||
/// </summary>
|
||||
public static void InitRelayNetworkAccess()
|
||||
{
|
||||
Internal.InitRelayNetworkAccess();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return location info for the current host.
|
||||
///
|
||||
/// It takes a few seconds to initialize access to the relay network. If
|
||||
/// you call this very soon after startup the data may not be available yet.
|
||||
///
|
||||
/// This always return the most up-to-date information we have available
|
||||
/// right now, even if we are in the middle of re-calculating ping times.
|
||||
/// </summary>
|
||||
public static NetPingLocation? LocalPingLocation
|
||||
{
|
||||
get
|
||||
{
|
||||
NetPingLocation location = default;
|
||||
var age = Internal.GetLocalPingLocation( ref location );
|
||||
if ( age < 0 )
|
||||
return null;
|
||||
|
||||
return location;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Same as PingLocation.EstimatePingTo, but assumes that one location is the local host.
|
||||
/// This is a bit faster, especially if you need to calculate a bunch of
|
||||
/// these in a loop to find the fastest one.
|
||||
/// </summary>
|
||||
public static int EstimatePingTo( NetPingLocation target )
|
||||
{
|
||||
return Internal.EstimatePingTimeFromLocalHost( ref target );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If you need ping information straight away, wait on this. It will return
|
||||
/// immediately if you already have up to date ping data
|
||||
/// </summary>
|
||||
public static async Task WaitForPingDataAsync( float maxAgeInSeconds = 60 * 5 )
|
||||
{
|
||||
if ( Internal.CheckPingDataUpToDate( maxAgeInSeconds ) )
|
||||
return;
|
||||
|
||||
SteamRelayNetworkStatus_t status = default;
|
||||
|
||||
while ( Internal.GetRelayNetworkStatus( ref status ) != SteamNetworkingAvailability.Current )
|
||||
{
|
||||
await Task.Delay( 10 );
|
||||
}
|
||||
}
|
||||
|
||||
public static long LocalTimestamp => Internal.GetLocalTimestamp();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// [0 - 100] - Randomly discard N pct of packets
|
||||
/// </summary>
|
||||
public static float FakeSendPacketLoss
|
||||
{
|
||||
get => GetConfigFloat( NetConfig.FakePacketLoss_Send );
|
||||
set => SetConfigFloat( NetConfig.FakePacketLoss_Send, value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [0 - 100] - Randomly discard N pct of packets
|
||||
/// </summary>
|
||||
public static float FakeRecvPacketLoss
|
||||
{
|
||||
get => GetConfigFloat( NetConfig.FakePacketLoss_Recv );
|
||||
set => SetConfigFloat( NetConfig.FakePacketLoss_Recv, value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delay all packets by N ms
|
||||
/// </summary>
|
||||
public static float FakeSendPacketLag
|
||||
{
|
||||
get => GetConfigFloat( NetConfig.FakePacketLag_Send );
|
||||
set => SetConfigFloat( NetConfig.FakePacketLag_Send, value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delay all packets by N ms
|
||||
/// </summary>
|
||||
public static float FakeRecvPacketLag
|
||||
{
|
||||
get => GetConfigFloat( NetConfig.FakePacketLag_Recv );
|
||||
set => SetConfigFloat( NetConfig.FakePacketLag_Recv, value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Timeout value (in ms) to use when first connecting
|
||||
/// </summary>
|
||||
public static int ConnectionTimeout
|
||||
{
|
||||
get => GetConfigInt( NetConfig.TimeoutInitial );
|
||||
set => SetConfigInt( NetConfig.TimeoutInitial, value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Timeout value (in ms) to use after connection is established
|
||||
/// </summary>
|
||||
public static int Timeout
|
||||
{
|
||||
get => GetConfigInt( NetConfig.TimeoutConnected );
|
||||
set => SetConfigInt( NetConfig.TimeoutConnected, value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Upper limit of buffered pending bytes to be sent.
|
||||
/// If this is reached SendMessage will return LimitExceeded.
|
||||
/// Default is 524288 bytes (512k)
|
||||
/// </summary>
|
||||
public static int SendBufferSize
|
||||
{
|
||||
get => GetConfigInt( NetConfig.SendBufferSize );
|
||||
set => SetConfigInt( NetConfig.SendBufferSize, value );
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get Debug Information via OnDebugOutput event
|
||||
///
|
||||
/// Except when debugging, you should only use NetDebugOutput.Msg
|
||||
/// or NetDebugOutput.Warning. For best performance, do NOT
|
||||
/// request a high detail level and then filter out messages in the callback.
|
||||
///
|
||||
/// This incurs all of the expense of formatting the messages, which are then discarded.
|
||||
/// Setting a high priority value (low numeric value) here allows the library to avoid
|
||||
/// doing this work.
|
||||
/// </summary>
|
||||
public static NetDebugOutput DebugLevel
|
||||
{
|
||||
get => _debugLevel;
|
||||
set
|
||||
{
|
||||
_debugLevel = value;
|
||||
_debugFunc = new NetDebugFunc( OnDebugMessage );
|
||||
|
||||
Internal.SetDebugOutputFunction( value, _debugFunc );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// So we can remember and provide a Get for DebugLEvel
|
||||
/// </summary>
|
||||
private static NetDebugOutput _debugLevel;
|
||||
|
||||
/// <summary>
|
||||
/// We need to keep the delegate around until it's not used anymore
|
||||
/// </summary>
|
||||
static NetDebugFunc _debugFunc;
|
||||
|
||||
struct DebugMessage
|
||||
{
|
||||
public NetDebugOutput Type;
|
||||
public string Msg;
|
||||
}
|
||||
|
||||
private static System.Collections.Concurrent.ConcurrentQueue<DebugMessage> debugMessages = new System.Collections.Concurrent.ConcurrentQueue<DebugMessage>();
|
||||
|
||||
/// <summary>
|
||||
/// This can be called from other threads - so we're going to queue these up and process them in a safe place.
|
||||
/// </summary>
|
||||
[MonoPInvokeCallback]
|
||||
private static void OnDebugMessage( NetDebugOutput nType, IntPtr str )
|
||||
{
|
||||
debugMessages.Enqueue( new DebugMessage { Type = nType, Msg = Helpers.MemoryToString( str ) } );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called regularly from the Dispatch loop so we can provide a timely
|
||||
/// stream of messages.
|
||||
/// </summary>
|
||||
internal static void OutputDebugMessages()
|
||||
{
|
||||
if ( debugMessages.IsEmpty )
|
||||
return;
|
||||
|
||||
while ( debugMessages.TryDequeue( out var result ) )
|
||||
{
|
||||
OnDebugOutput?.Invoke( result.Type, result.Msg );
|
||||
}
|
||||
}
|
||||
|
||||
#region Config Internals
|
||||
|
||||
internal unsafe static bool SetConfigInt( NetConfig type, int value )
|
||||
{
|
||||
int* ptr = &value;
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, NetConfigType.Int32, (IntPtr)ptr );
|
||||
}
|
||||
|
||||
internal unsafe static int GetConfigInt( NetConfig type )
|
||||
{
|
||||
int value = 0;
|
||||
NetConfigType dtype = NetConfigType.Int32;
|
||||
int* ptr = &value;
|
||||
UIntPtr size = new UIntPtr( sizeof( int ) );
|
||||
var result = Internal.GetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, ref dtype, (IntPtr) ptr, ref size );
|
||||
if ( result != NetConfigResult.OK )
|
||||
return 0;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
internal unsafe static bool SetConfigFloat( NetConfig type, float value )
|
||||
{
|
||||
float* ptr = &value;
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, NetConfigType.Float, (IntPtr)ptr );
|
||||
}
|
||||
|
||||
internal unsafe static float GetConfigFloat( NetConfig type )
|
||||
{
|
||||
float value = 0;
|
||||
NetConfigType dtype = NetConfigType.Float;
|
||||
float* ptr = &value;
|
||||
UIntPtr size = new UIntPtr( sizeof( float ) );
|
||||
var result = Internal.GetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, ref dtype, (IntPtr)ptr, ref size );
|
||||
if ( result != NetConfigResult.OK )
|
||||
return 0;
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
internal unsafe static bool SetConfigString( NetConfig type, string value )
|
||||
{
|
||||
var bytes = Encoding.UTF8.GetBytes( value );
|
||||
|
||||
fixed ( byte* ptr = bytes )
|
||||
{
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, NetConfigType.String, (IntPtr)ptr );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
internal unsafe static float GetConfigString( NetConfig type )
|
||||
{
|
||||
|
||||
float value = 0;
|
||||
NetConfigType dtype = NetConfigType.Float;
|
||||
float* ptr = &value;
|
||||
ulong size = sizeof( float );
|
||||
var result = Internal.GetConfigValue( type, NetScope.Global, 0, ref dtype, (IntPtr)ptr, ref size );
|
||||
if ( result != SteamNetworkingGetConfigValueResult.OK )
|
||||
return 0;
|
||||
|
||||
return value;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
|
||||
TODO - Connection object
|
||||
|
||||
internal unsafe static bool SetConnectionConfig( uint con, NetConfig type, int value )
|
||||
{
|
||||
int* ptr = &value;
|
||||
return Internal.SetConfigValue( type, NetScope.Connection, con, NetConfigType.Int32, (IntPtr)ptr );
|
||||
}
|
||||
|
||||
internal unsafe static bool SetConnectionConfig( uint con, NetConfig type, float value )
|
||||
{
|
||||
float* ptr = &value;
|
||||
return Internal.SetConfigValue( type, NetScope.Connection, con, NetConfigType.Float, (IntPtr)ptr );
|
||||
}
|
||||
|
||||
internal unsafe static bool SetConnectionConfig( uint con, NetConfig type, string value )
|
||||
{
|
||||
var bytes = Encoding.UTF8.GetBytes( value );
|
||||
|
||||
fixed ( byte* ptr = bytes )
|
||||
{
|
||||
return Internal.SetConfigValue( type, NetScope.Connection, con, NetConfigType.String, (IntPtr)ptr );
|
||||
}
|
||||
}*/
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
64
Facepunch.Steamworks/SteamParental.cs
Normal file
64
Facepunch.Steamworks/SteamParental.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public class SteamParental : SteamSharedClass<SteamParental>
|
||||
{
|
||||
internal static ISteamParentalSettings Internal => Interface as ISteamParentalSettings;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamParentalSettings( server ) );
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
internal static void InstallEvents( bool server )
|
||||
{
|
||||
Dispatch.Install<SteamParentalSettingsChanged_t>( x => OnSettingsChanged?.Invoke(), server );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parental Settings Changed
|
||||
/// </summary>
|
||||
public static event Action OnSettingsChanged;
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static bool IsParentalLockEnabled => Internal.BIsParentalLockEnabled();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static bool IsParentalLockLocked => Internal.BIsParentalLockLocked();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static bool IsAppBlocked( AppId app ) => Internal.BIsAppBlocked( app.Value );
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static bool BIsAppInBlockList( AppId app ) => Internal.BIsAppInBlockList( app.Value );
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static bool IsFeatureBlocked( ParentalFeature feature ) => Internal.BIsFeatureBlocked( feature );
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static bool BIsFeatureInBlockList( ParentalFeature feature ) => Internal.BIsFeatureInBlockList( feature );
|
||||
}
|
||||
}
|
||||
59
Facepunch.Steamworks/SteamParties.cs
Normal file
59
Facepunch.Steamworks/SteamParties.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// This API can be used to selectively advertise your multiplayer game session in a Steam chat room group.
|
||||
/// Tell Steam the number of player spots that are available for your party, and a join-game string, and it
|
||||
/// will show a beacon in the selected group and allow that many users to “follow” the beacon to your party.
|
||||
/// Adjust the number of open slots if other players join through alternate matchmaking methods.
|
||||
/// </summary>
|
||||
public class SteamParties : SteamClientClass<SteamParties>
|
||||
{
|
||||
internal static ISteamParties Internal => Interface as ISteamParties;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamParties( server ) );
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
internal void InstallEvents( bool server )
|
||||
{
|
||||
Dispatch.Install<AvailableBeaconLocationsUpdated_t>( x => OnBeaconLocationsUpdated?.Invoke(), server );
|
||||
Dispatch.Install<ActiveBeaconsUpdated_t>( x => OnActiveBeaconsUpdated?.Invoke(), server );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The list of possible Party beacon locations has changed
|
||||
/// </summary>
|
||||
public static event Action OnBeaconLocationsUpdated;
|
||||
|
||||
/// <summary>
|
||||
/// The list of active beacons may have changed
|
||||
/// </summary>
|
||||
public static event Action OnActiveBeaconsUpdated;
|
||||
|
||||
|
||||
public static int ActiveBeaconCount => (int) Internal.GetNumActiveBeacons();
|
||||
|
||||
public static IEnumerable<PartyBeacon> ActiveBeacons
|
||||
{
|
||||
get
|
||||
{
|
||||
for ( uint i = 0; i < ActiveBeaconCount; i++ )
|
||||
{
|
||||
yield return new PartyBeacon
|
||||
{
|
||||
Id = Internal.GetBeaconByIndex( i )
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
58
Facepunch.Steamworks/SteamRemotePlay.cs
Normal file
58
Facepunch.Steamworks/SteamRemotePlay.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Functions that provide information about Steam Remote Play sessions, streaming your game content to another computer or to a Steam Link app or hardware.
|
||||
/// </summary>
|
||||
public class SteamRemotePlay : SteamClientClass<SteamRemotePlay>
|
||||
{
|
||||
internal static ISteamRemotePlay Internal => Interface as ISteamRemotePlay;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamRemotePlay( server ) );
|
||||
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
internal void InstallEvents( bool server )
|
||||
{
|
||||
Dispatch.Install<SteamRemotePlaySessionConnected_t>( x => OnSessionConnected?.Invoke( x.SessionID ), server );
|
||||
Dispatch.Install<SteamRemotePlaySessionDisconnected_t>( x => OnSessionDisconnected?.Invoke( x.SessionID ), server );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when a session is connected
|
||||
/// </summary>
|
||||
public static event Action<RemotePlaySession> OnSessionConnected;
|
||||
|
||||
/// <summary>
|
||||
/// Called when a session becomes disconnected
|
||||
/// </summary>
|
||||
public static event Action<RemotePlaySession> OnSessionDisconnected;
|
||||
|
||||
/// <summary>
|
||||
/// Get the number of currently connected Steam Remote Play sessions
|
||||
/// </summary>
|
||||
public static int SessionCount => (int) Internal.GetSessionCount();
|
||||
|
||||
/// <summary>
|
||||
/// Get the currently connected Steam Remote Play session ID at the specified index.
|
||||
/// IsValid will return false if it's out of bounds
|
||||
/// </summary>
|
||||
public static RemotePlaySession GetSession( int index ) => (RemotePlaySession) Internal.GetSessionID( index ).Value;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Invite a friend to Remote Play Together
|
||||
/// This returns false if the invite can't be sent
|
||||
/// </summary>
|
||||
public static bool SendInvite( SteamId steamid ) => Internal.BSendRemotePlayTogetherInvite( steamid );
|
||||
}
|
||||
}
|
||||
168
Facepunch.Steamworks/SteamRemoteStorage.cs
Normal file
168
Facepunch.Steamworks/SteamRemoteStorage.cs
Normal file
@@ -0,0 +1,168 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public class SteamRemoteStorage : SteamClientClass<SteamRemoteStorage>
|
||||
{
|
||||
internal static ISteamRemoteStorage Internal => Interface as ISteamRemoteStorage;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamRemoteStorage( server ) );
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new file, writes the bytes to the file, and then closes the file.
|
||||
/// If the target file already exists, it is overwritten
|
||||
/// </summary>
|
||||
public unsafe static bool FileWrite( string filename, byte[] data )
|
||||
{
|
||||
fixed ( byte* ptr = data )
|
||||
{
|
||||
return Internal.FileWrite( filename, (IntPtr) ptr, data.Length );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Opens a binary file, reads the contents of the file into a byte array, and then closes the file.
|
||||
/// </summary>
|
||||
public unsafe static byte[] FileRead( string filename )
|
||||
{
|
||||
var size = FileSize( filename );
|
||||
if ( size <= 0 ) return null;
|
||||
var buffer = new byte[size];
|
||||
|
||||
fixed ( byte* ptr = buffer )
|
||||
{
|
||||
var readsize = Internal.FileRead( filename, (IntPtr)ptr, size );
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the specified file exists.
|
||||
/// </summary>
|
||||
public static bool FileExists( string filename ) => Internal.FileExists( filename );
|
||||
|
||||
/// <summary>
|
||||
/// Checks if a specific file is persisted in the steam cloud.
|
||||
/// </summary>
|
||||
public static bool FilePersisted( string filename ) => Internal.FilePersisted( filename );
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified file's last modified date/time.
|
||||
/// </summary>
|
||||
public static DateTime FileTime( string filename ) => Epoch.ToDateTime( Internal.GetFileTimestamp( filename ) );
|
||||
|
||||
/// <summary>
|
||||
/// Gets the specified files size in bytes. 0 if not exists.
|
||||
/// </summary>
|
||||
public static int FileSize( string filename ) => Internal.GetFileSize( filename );
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the API.
|
||||
/// </summary>
|
||||
public static bool FileForget( string filename ) => Internal.FileForget( filename );
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a file from the local disk, and propagates that delete to the cloud.
|
||||
/// </summary>
|
||||
public static bool FileDelete( string filename ) => Internal.FileDelete( filename );
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Number of bytes total
|
||||
/// </summary>
|
||||
public static ulong QuotaBytes
|
||||
{
|
||||
get
|
||||
{
|
||||
ulong t = 0, a = 0;
|
||||
Internal.GetQuota( ref t, ref a );
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Number of bytes used
|
||||
/// </summary>
|
||||
public static ulong QuotaUsedBytes
|
||||
{
|
||||
get
|
||||
{
|
||||
ulong t = 0, a = 0;
|
||||
Internal.GetQuota( ref t, ref a );
|
||||
return t - a;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Number of bytes remaining until your quota is used
|
||||
/// </summary>
|
||||
public static ulong QuotaRemainingBytes
|
||||
{
|
||||
get
|
||||
{
|
||||
ulong t = 0, a = 0;
|
||||
Internal.GetQuota( ref t, ref a );
|
||||
return a;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// returns true if IsCloudEnabledForAccount AND IsCloudEnabledForApp
|
||||
/// </summary>
|
||||
public static bool IsCloudEnabled => IsCloudEnabledForAccount && IsCloudEnabledForApp;
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the account wide Steam Cloud setting is enabled for this user
|
||||
/// or if they disabled it in the Settings->Cloud dialog.
|
||||
/// </summary>
|
||||
public static bool IsCloudEnabledForAccount => Internal.IsCloudEnabledForAccount();
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the per game Steam Cloud setting is enabled for this user
|
||||
/// or if they disabled it in the Game Properties->Update dialog.
|
||||
///
|
||||
/// This must only ever be set as the direct result of the user explicitly
|
||||
/// requesting that it's enabled or not. This is typically accomplished with
|
||||
/// a checkbox within your in-game options
|
||||
/// </summary>
|
||||
public static bool IsCloudEnabledForApp
|
||||
{
|
||||
get => Internal.IsCloudEnabledForApp();
|
||||
set => Internal.SetCloudEnabledForApp( value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the total number of local files synchronized by Steam Cloud.
|
||||
/// </summary>
|
||||
public static int FileCount => Internal.GetFileCount();
|
||||
|
||||
/// <summary>
|
||||
/// Get a list of filenames synchronized by Steam Cloud
|
||||
/// </summary>
|
||||
public static IEnumerable<string> Files
|
||||
{
|
||||
get
|
||||
{
|
||||
int _ = 0;
|
||||
for( int i=0; i<FileCount; i++ )
|
||||
{
|
||||
var filename = Internal.GetFileNameAndSize( i, ref _ );
|
||||
yield return filename;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
100
Facepunch.Steamworks/SteamScreenshots.cs
Normal file
100
Facepunch.Steamworks/SteamScreenshots.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public class SteamScreenshots : SteamClientClass<SteamScreenshots>
|
||||
{
|
||||
internal static ISteamScreenshots Internal => Interface as ISteamScreenshots;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamScreenshots( server ) );
|
||||
InstallEvents();
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
Dispatch.Install<ScreenshotRequested_t>( x => OnScreenshotRequested?.Invoke() );
|
||||
Dispatch.Install<ScreenshotReady_t>( x =>
|
||||
{
|
||||
if ( x.Result != Result.OK )
|
||||
OnScreenshotFailed?.Invoke( x.Result );
|
||||
else
|
||||
OnScreenshotReady?.Invoke( new Screenshot { Value = x.Local } );
|
||||
} );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A screenshot has been requested by the user from the Steam screenshot hotkey.
|
||||
/// This will only be called if Hooked is true, in which case Steam
|
||||
/// will not take the screenshot itself.
|
||||
/// </summary>
|
||||
public static event Action OnScreenshotRequested;
|
||||
|
||||
/// <summary>
|
||||
/// A screenshot successfully written or otherwise added to the library and can now be tagged.
|
||||
/// </summary>
|
||||
public static event Action<Screenshot> OnScreenshotReady;
|
||||
|
||||
/// <summary>
|
||||
/// A screenshot attempt failed
|
||||
/// </summary>
|
||||
public static event Action<Result> OnScreenshotFailed;
|
||||
|
||||
/// <summary>
|
||||
/// Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format.
|
||||
/// The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
||||
/// </summary>
|
||||
public unsafe static Screenshot? WriteScreenshot( byte[] data, int width, int height )
|
||||
{
|
||||
fixed ( byte* ptr = data )
|
||||
{
|
||||
var handle = Internal.WriteScreenshot( (IntPtr)ptr, (uint)data.Length, width, height );
|
||||
if ( handle.Value == 0 ) return null;
|
||||
|
||||
return new Screenshot { Value = handle };
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio
|
||||
/// as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format.
|
||||
/// The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
||||
/// JPEG, TGA, and PNG formats are supported.
|
||||
/// </summary>
|
||||
public unsafe static Screenshot? AddScreenshot( string filename, string thumbnail, int width, int height )
|
||||
{
|
||||
var handle = Internal.AddScreenshotToLibrary( filename, thumbnail, width, height );
|
||||
if ( handle.Value == 0 ) return null;
|
||||
|
||||
return new Screenshot { Value = handle };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Causes the Steam overlay to take a screenshot.
|
||||
/// If screenshots are being hooked by the game then a
|
||||
/// ScreenshotRequested callback is sent back to the game instead.
|
||||
/// </summary>
|
||||
public static void TriggerScreenshot() => Internal.TriggerScreenshot();
|
||||
|
||||
/// <summary>
|
||||
/// Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the game handles them.
|
||||
/// Hooking is disabled by default, and only ever enabled if you do so with this function.
|
||||
/// If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the hotkey or
|
||||
/// when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or AddScreenshotToLibrary in response.
|
||||
/// </summary>
|
||||
public static bool Hooked
|
||||
{
|
||||
get => Internal.IsScreenshotsHooked();
|
||||
set => Internal.HookScreenshots( value );
|
||||
}
|
||||
}
|
||||
}
|
||||
460
Facepunch.Steamworks/SteamServer.cs
Normal file
460
Facepunch.Steamworks/SteamServer.cs
Normal file
@@ -0,0 +1,460 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides the core of the Steam Game Servers API
|
||||
/// </summary>
|
||||
public partial class SteamServer : SteamServerClass<SteamServer>
|
||||
{
|
||||
internal static ISteamGameServer Internal => Interface as ISteamGameServer;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamGameServer( server ) );
|
||||
InstallEvents();
|
||||
}
|
||||
|
||||
public static bool IsValid => Internal != null && Internal.IsValid;
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
Dispatch.Install<ValidateAuthTicketResponse_t>( x => OnValidateAuthTicketResponse?.Invoke( x.SteamID, x.OwnerSteamID, x.AuthSessionResponse ), true );
|
||||
Dispatch.Install<SteamServersConnected_t>( x => OnSteamServersConnected?.Invoke(), true );
|
||||
Dispatch.Install<SteamServerConnectFailure_t>( x => OnSteamServerConnectFailure?.Invoke( x.Result, x.StillRetrying ), true );
|
||||
Dispatch.Install<SteamServersDisconnected_t>( x => OnSteamServersDisconnected?.Invoke( x.Result ), true );
|
||||
Dispatch.Install<SteamNetAuthenticationStatus_t>(x => OnSteamNetAuthenticationStatus?.Invoke(x.Avail), true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User has been authed or rejected
|
||||
/// </summary>
|
||||
public static event Action<SteamId, SteamId, AuthResponse> OnValidateAuthTicketResponse;
|
||||
|
||||
/// <summary>
|
||||
/// Called when a connections to the Steam back-end has been established.
|
||||
/// This means the server now is logged on and has a working connection to the Steam master server.
|
||||
/// </summary>
|
||||
public static event Action OnSteamServersConnected;
|
||||
|
||||
/// <summary>
|
||||
/// This will occur periodically if the Steam client is not connected, and has failed when retrying to establish a connection (result, stilltrying)
|
||||
/// </summary>
|
||||
public static event Action<Result, bool> OnSteamServerConnectFailure;
|
||||
|
||||
/// <summary>
|
||||
/// Disconnected from Steam
|
||||
/// </summary>
|
||||
public static event Action<Result> OnSteamServersDisconnected;
|
||||
|
||||
/// <summary>
|
||||
/// Called when authentication status changes, useful for grabbing SteamId once aavailability is current
|
||||
/// </summary>
|
||||
public static event Action<SteamNetworkingAvailability> OnSteamNetAuthenticationStatus;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Initialize the steam server.
|
||||
/// If asyncCallbacks is false you need to call RunCallbacks manually every frame.
|
||||
/// </summary>
|
||||
public static void Init( AppId appid, SteamServerInit init, bool asyncCallbacks = true )
|
||||
{
|
||||
if ( IsValid )
|
||||
throw new System.Exception( "Calling SteamServer.Init but is already initialized" );
|
||||
|
||||
uint ipaddress = 0; // Any Port
|
||||
|
||||
if ( init.SteamPort == 0 )
|
||||
init = init.WithRandomSteamPort();
|
||||
|
||||
if ( init.IpAddress != null )
|
||||
ipaddress = Utility.IpToInt32( init.IpAddress );
|
||||
|
||||
System.Environment.SetEnvironmentVariable( "SteamAppId", appid.ToString() );
|
||||
System.Environment.SetEnvironmentVariable( "SteamGameId", appid.ToString() );
|
||||
var secure = (int)(init.Secure ? 3 : 2);
|
||||
|
||||
//
|
||||
// Get other interfaces
|
||||
//
|
||||
if ( !SteamInternal.GameServer_Init( ipaddress, init.SteamPort, init.GamePort, init.QueryPort, secure, init.VersionString ) )
|
||||
{
|
||||
throw new System.Exception( $"InitGameServer returned false ({ipaddress},{init.SteamPort},{init.GamePort},{init.QueryPort},{secure},\"{init.VersionString}\")" );
|
||||
}
|
||||
|
||||
//
|
||||
// Dispatch is responsible for pumping the
|
||||
// event loop.
|
||||
//
|
||||
Dispatch.Init();
|
||||
Dispatch.ServerPipe = SteamGameServer.GetHSteamPipe();
|
||||
|
||||
AddInterface<SteamServer>();
|
||||
AddInterface<SteamUtils>();
|
||||
AddInterface<SteamNetworking>();
|
||||
AddInterface<SteamServerStats>();
|
||||
//AddInterface<ISteamHTTP>();
|
||||
AddInterface<SteamInventory>();
|
||||
AddInterface<SteamUGC>();
|
||||
AddInterface<SteamApps>();
|
||||
|
||||
AddInterface<SteamNetworkingUtils>();
|
||||
AddInterface<SteamNetworkingSockets>();
|
||||
|
||||
//
|
||||
// Initial settings
|
||||
//
|
||||
AutomaticHeartbeats = true;
|
||||
MaxPlayers = 32;
|
||||
BotCount = 0;
|
||||
Product = $"{appid.Value}";
|
||||
ModDir = init.ModDir;
|
||||
GameDescription = init.GameDescription;
|
||||
Passworded = false;
|
||||
DedicatedServer = init.DedicatedServer;
|
||||
|
||||
if ( asyncCallbacks )
|
||||
{
|
||||
//
|
||||
// This will keep looping in the background every 16 ms
|
||||
// until we shut down.
|
||||
//
|
||||
Dispatch.LoopServerAsync();
|
||||
}
|
||||
}
|
||||
|
||||
internal static void AddInterface<T>() where T : SteamClass, new()
|
||||
{
|
||||
var t = new T();
|
||||
t.InitializeInterface( true );
|
||||
openInterfaces.Add( t );
|
||||
}
|
||||
|
||||
static readonly List<SteamClass> openInterfaces = new List<SteamClass>();
|
||||
|
||||
internal static void ShutdownInterfaces()
|
||||
{
|
||||
foreach ( var e in openInterfaces )
|
||||
{
|
||||
e.DestroyInterface( true );
|
||||
}
|
||||
|
||||
openInterfaces.Clear();
|
||||
}
|
||||
|
||||
public static void Shutdown()
|
||||
{
|
||||
Dispatch.ShutdownServer();
|
||||
|
||||
ShutdownInterfaces();
|
||||
SteamGameServer.Shutdown();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Run the callbacks. This is also called in Async callbacks.
|
||||
/// </summary>
|
||||
public static void RunCallbacks()
|
||||
{
|
||||
if ( Dispatch.ServerPipe != 0 )
|
||||
{
|
||||
Dispatch.Frame( Dispatch.ServerPipe );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets whether this should be marked as a dedicated server.
|
||||
/// If not, it is assumed to be a listen server.
|
||||
/// </summary>
|
||||
public static bool DedicatedServer
|
||||
{
|
||||
get => _dedicatedServer;
|
||||
set { if ( _dedicatedServer == value ) return; Internal.SetDedicatedServer( value ); _dedicatedServer = value; }
|
||||
}
|
||||
private static bool _dedicatedServer;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current MaxPlayers.
|
||||
/// This doesn't enforce any kind of limit, it just updates the master server.
|
||||
/// </summary>
|
||||
public static int MaxPlayers
|
||||
{
|
||||
get => _maxplayers;
|
||||
set { if ( _maxplayers == value ) return; Internal.SetMaxPlayerCount( value ); _maxplayers = value; }
|
||||
}
|
||||
private static int _maxplayers = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current BotCount.
|
||||
/// This doesn't enforce any kind of limit, it just updates the master server.
|
||||
/// </summary>
|
||||
public static int BotCount
|
||||
{
|
||||
get => _botcount;
|
||||
set { if ( _botcount == value ) return; Internal.SetBotPlayerCount( value ); _botcount = value; }
|
||||
}
|
||||
private static int _botcount = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current Map Name.
|
||||
/// </summary>
|
||||
public static string MapName
|
||||
{
|
||||
get => _mapname;
|
||||
set { if ( _mapname == value ) return; Internal.SetMapName( value ); _mapname = value; }
|
||||
}
|
||||
private static string _mapname;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current ModDir
|
||||
/// </summary>
|
||||
public static string ModDir
|
||||
{
|
||||
get => _modDir;
|
||||
internal set { if ( _modDir == value ) return; Internal.SetModDir( value ); _modDir = value; }
|
||||
}
|
||||
private static string _modDir = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current product
|
||||
/// </summary>
|
||||
public static string Product
|
||||
{
|
||||
get => _product;
|
||||
internal set { if ( _product == value ) return; Internal.SetProduct( value ); _product = value; }
|
||||
}
|
||||
private static string _product = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current Product
|
||||
/// </summary>
|
||||
public static string GameDescription
|
||||
{
|
||||
get => _gameDescription;
|
||||
internal set { if ( _gameDescription == value ) return; Internal.SetGameDescription( value ); _gameDescription = value; }
|
||||
}
|
||||
private static string _gameDescription = "";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current ServerName
|
||||
/// </summary>
|
||||
public static string ServerName
|
||||
{
|
||||
get => _serverName;
|
||||
set { if ( _serverName == value ) return; Internal.SetServerName( value ); _serverName = value; }
|
||||
}
|
||||
private static string _serverName = "";
|
||||
|
||||
/// <summary>
|
||||
/// Set whether the server should report itself as passworded
|
||||
/// </summary>
|
||||
public static bool Passworded
|
||||
{
|
||||
get => _passworded;
|
||||
set { if ( _passworded == value ) return; Internal.SetPasswordProtected( value ); _passworded = value; }
|
||||
}
|
||||
private static bool _passworded;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current GameTags. This is a comma seperated list of tags for this server.
|
||||
/// When querying the server list you can filter by these tags.
|
||||
/// </summary>
|
||||
public static string GameTags
|
||||
{
|
||||
get => _gametags;
|
||||
set
|
||||
{
|
||||
if ( _gametags == value ) return;
|
||||
Internal.SetGameTags( value );
|
||||
_gametags = value;
|
||||
}
|
||||
}
|
||||
private static string _gametags = "";
|
||||
|
||||
public static SteamId SteamId => Internal.GetSteamID();
|
||||
|
||||
/// <summary>
|
||||
/// Log onto Steam anonymously.
|
||||
/// </summary>
|
||||
public static void LogOnAnonymous()
|
||||
{
|
||||
Internal.LogOnAnonymous();
|
||||
ForceHeartbeat();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Log onto Steam anonymously.
|
||||
/// </summary>
|
||||
public static void LogOff()
|
||||
{
|
||||
Internal.LogOff();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the server is connected and registered with the Steam master server
|
||||
/// You should have called LogOnAnonymous etc on startup.
|
||||
/// </summary>
|
||||
public static bool LoggedOn => Internal.BLoggedOn();
|
||||
|
||||
/// <summary>
|
||||
/// To the best of its ability this tries to get the server's
|
||||
/// current public ip address. Be aware that this is likely to return
|
||||
/// null for the first few seconds after initialization.
|
||||
/// </summary>
|
||||
public static System.Net.IPAddress PublicIp => Internal.GetPublicIP();
|
||||
|
||||
/// <summary>
|
||||
/// Enable or disable heartbeats, which are sent regularly to the master server.
|
||||
/// Enabled by default.
|
||||
/// </summary>
|
||||
public static bool AutomaticHeartbeats
|
||||
{
|
||||
set { Internal.EnableHeartbeats( value ); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set heartbeat interval, if automatic heartbeats are enabled.
|
||||
/// You can leave this at the default.
|
||||
/// </summary>
|
||||
public static int AutomaticHeartbeatRate
|
||||
{
|
||||
set { Internal.SetHeartbeatInterval( value ); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Force send a heartbeat to the master server instead of waiting
|
||||
/// for the next automatic update (if you've left them enabled)
|
||||
/// </summary>
|
||||
public static void ForceHeartbeat()
|
||||
{
|
||||
Internal.ForceHeartbeat();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update this connected player's information. You should really call this
|
||||
/// any time a player's name or score changes. This keeps the information shown
|
||||
/// to server queries up to date.
|
||||
/// </summary>
|
||||
public static void UpdatePlayer( SteamId steamid, string name, int score )
|
||||
{
|
||||
Internal.BUpdateUserData( steamid, name, (uint)score );
|
||||
}
|
||||
|
||||
static Dictionary<string, string> KeyValue = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Sets a Key Value. These can be anything you like, and are accessible
|
||||
/// when querying servers from the server list.
|
||||
///
|
||||
/// Information describing gamemodes are common here.
|
||||
/// </summary>
|
||||
public static void SetKey( string Key, string Value )
|
||||
{
|
||||
if ( KeyValue.ContainsKey( Key ) )
|
||||
{
|
||||
if ( KeyValue[Key] == Value )
|
||||
return;
|
||||
|
||||
KeyValue[Key] = Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
KeyValue.Add( Key, Value );
|
||||
}
|
||||
|
||||
Internal.SetKeyValue( Key, Value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove all key values
|
||||
/// </summary>
|
||||
public static void ClearKeys()
|
||||
{
|
||||
KeyValue.Clear();
|
||||
Internal.ClearAllKeyValues();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start authorizing a ticket. This user isn't authorized yet. Wait for a call to OnAuthChange.
|
||||
/// </summary>
|
||||
public static unsafe bool BeginAuthSession( byte[] data, SteamId steamid )
|
||||
{
|
||||
fixed ( byte* p = data )
|
||||
{
|
||||
var result = Internal.BeginAuthSession( (IntPtr)p, data.Length, steamid );
|
||||
|
||||
if ( result == BeginAuthResult.OK )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Forget this guy. They're no longer in the game.
|
||||
/// </summary>
|
||||
public static void EndSession( SteamId steamid )
|
||||
{
|
||||
Internal.EndAuthSession( steamid );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// If true, Steam wants to send a packet. You should respond by sending
|
||||
/// this packet in an unconnected way to the returned Address and Port.
|
||||
/// </summary>
|
||||
/// <param name="packet">Packet to send. The Data passed is pooled - so use it immediately.</param>
|
||||
/// <returns>True if we want to send a packet</returns>
|
||||
public static unsafe bool GetOutgoingPacket( out OutgoingPacket packet )
|
||||
{
|
||||
var buffer = Helpers.TakeBuffer( 1024 * 32 );
|
||||
packet = new OutgoingPacket();
|
||||
|
||||
fixed ( byte* ptr = buffer )
|
||||
{
|
||||
uint addr = 0;
|
||||
ushort port = 0;
|
||||
|
||||
var size = Internal.GetNextOutgoingPacket( (IntPtr)ptr, buffer.Length, ref addr, ref port );
|
||||
if ( size == 0 )
|
||||
return false;
|
||||
|
||||
packet.Size = size;
|
||||
packet.Data = buffer;
|
||||
packet.Address = addr;
|
||||
packet.Port = port;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We have received a server query on our game port. Pass it to Steam to handle.
|
||||
/// </summary>
|
||||
public static unsafe void HandleIncomingPacket( byte[] data, int size, uint address, ushort port )
|
||||
{
|
||||
fixed ( byte* ptr = data )
|
||||
{
|
||||
HandleIncomingPacket( (IntPtr)ptr, size, address, port );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// We have received a server query on our game port. Pass it to Steam to handle.
|
||||
/// </summary>
|
||||
public static unsafe void HandleIncomingPacket( IntPtr ptr, int size, uint address, ushort port )
|
||||
{
|
||||
Internal.HandleIncomingPacket( ptr, size, address, port );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Does the user own this app (which could be DLC)
|
||||
/// </summary>
|
||||
public static UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamid, AppId appid )
|
||||
{
|
||||
return Internal.UserHasLicenseForApp( steamid, appid );
|
||||
}
|
||||
}
|
||||
}
|
||||
123
Facepunch.Steamworks/SteamServerStats.cs
Normal file
123
Facepunch.Steamworks/SteamServerStats.cs
Normal file
@@ -0,0 +1,123 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
public class SteamServerStats : SteamServerClass<SteamServerStats>
|
||||
{
|
||||
internal static ISteamGameServerStats Internal => Interface as ISteamGameServerStats;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamGameServerStats( server ) );
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Downloads stats for the user
|
||||
/// If the user has no stats will return fail
|
||||
/// these stats will only be auto-updated for clients playing on the server
|
||||
/// </summary>
|
||||
public static async Task<Result> RequestUserStatsAsync( SteamId steamid )
|
||||
{
|
||||
var r = await Internal.RequestUserStats( steamid );
|
||||
if ( !r.HasValue ) return Result.Fail;
|
||||
return r.Value.Result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the named stat for this user. Setting stats should follow the rules
|
||||
/// you defined in Steamworks.
|
||||
/// </summary>
|
||||
public static bool SetInt( SteamId steamid, string name, int stat )
|
||||
{
|
||||
return Internal.SetUserStat( steamid, name, stat );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the named stat for this user. Setting stats should follow the rules
|
||||
/// you defined in Steamworks.
|
||||
/// </summary>
|
||||
public static bool SetFloat( SteamId steamid, string name, float stat )
|
||||
{
|
||||
return Internal.SetUserStat( steamid, name, stat );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the named stat for this user. If getting the stat failed, will return
|
||||
/// defaultValue. You should have called Refresh for this userid - which downloads
|
||||
/// the stats from the backend. If you didn't call it this will always return defaultValue.
|
||||
/// </summary>
|
||||
public static int GetInt( SteamId steamid, string name, int defaultValue = 0 )
|
||||
{
|
||||
int data = defaultValue;
|
||||
|
||||
if ( !Internal.GetUserStat( steamid, name, ref data ) )
|
||||
return defaultValue;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the named stat for this user. If getting the stat failed, will return
|
||||
/// defaultValue. You should have called Refresh for this userid - which downloads
|
||||
/// the stats from the backend. If you didn't call it this will always return defaultValue.
|
||||
/// </summary>
|
||||
public static float GetFloat( SteamId steamid, string name, float defaultValue = 0 )
|
||||
{
|
||||
float data = defaultValue;
|
||||
|
||||
if ( !Internal.GetUserStat( steamid, name, ref data ) )
|
||||
return defaultValue;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unlocks the specified achievement for the specified user. Must have called Refresh on a steamid first.
|
||||
/// Remember to use Commit after use.
|
||||
/// </summary>
|
||||
public static bool SetAchievement( SteamId steamid, string name )
|
||||
{
|
||||
return Internal.SetUserAchievement( steamid, name );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid first.
|
||||
/// Remember to use Commit after use.
|
||||
/// </summary>
|
||||
public static bool ClearAchievement( SteamId steamid, string name )
|
||||
{
|
||||
return Internal.ClearUserAchievement( steamid, name );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return true if available, exists and unlocked
|
||||
/// </summary>
|
||||
public static bool GetAchievement( SteamId steamid, string name )
|
||||
{
|
||||
bool achieved = false;
|
||||
|
||||
if ( !Internal.GetUserAchievement( steamid, name, ref achieved ) )
|
||||
return false;
|
||||
|
||||
return achieved;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Once you've set a stat change on a user you need to commit your changes.
|
||||
/// You can do that using this function. The callback will let you know if
|
||||
/// your action succeeded, but most of the time you can fire and forget.
|
||||
/// </summary>
|
||||
public static async Task<Result> StoreUserStats( SteamId steamid )
|
||||
{
|
||||
var r = await Internal.StoreUserStats( steamid );
|
||||
if ( !r.HasValue ) return Result.Fail;
|
||||
return r.Value.Result;
|
||||
}
|
||||
}
|
||||
}
|
||||
165
Facepunch.Steamworks/SteamUgc.cs
Normal file
165
Facepunch.Steamworks/SteamUgc.cs
Normal file
@@ -0,0 +1,165 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Functions for accessing and manipulating Steam user information.
|
||||
/// This is also where the APIs for Steam Voice are exposed.
|
||||
/// </summary>
|
||||
public class SteamUGC : SteamSharedClass<SteamUGC>
|
||||
{
|
||||
internal static ISteamUGC Internal => Interface as ISteamUGC;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamUGC( server ) );
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
internal static void InstallEvents( bool server )
|
||||
{
|
||||
Dispatch.Install<DownloadItemResult_t>( x => OnDownloadItemResult?.Invoke( x.Result ), server );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Posted after Download call
|
||||
/// </summary>
|
||||
public static event Action<Result> OnDownloadItemResult;
|
||||
|
||||
public static async Task<bool> DeleteFileAsync( PublishedFileId fileId )
|
||||
{
|
||||
var r = await Internal.DeleteItem( fileId );
|
||||
return r?.Result == Result.OK;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Start downloading this item. You'll get notified of completion via OnDownloadItemResult.
|
||||
/// </summary>
|
||||
/// <param name="fileId">The ID of the file you want to download</param>
|
||||
/// <param name="highPriority">If true this should go straight to the top of the download list</param>
|
||||
/// <returns>true if nothing went wrong and the download is started</returns>
|
||||
public static bool Download( PublishedFileId fileId, bool highPriority = false )
|
||||
{
|
||||
return Internal.DownloadItem( fileId, highPriority );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Will attempt to download this item asyncronously - allowing you to instantly react to its installation
|
||||
/// </summary>
|
||||
/// <param name="fileId">The ID of the file you want to download</param>
|
||||
/// <param name="progress">An optional callback</param>
|
||||
/// <param name="ct">Allows you to send a message to cancel the download anywhere during the process</param>
|
||||
/// <param name="milisecondsUpdateDelay">How often to call the progress function</param>
|
||||
/// <returns>true if downloaded and installed correctly</returns>
|
||||
public static async Task<bool> DownloadAsync( PublishedFileId fileId, Action<float> progress = null, int milisecondsUpdateDelay = 60, CancellationToken ct = default )
|
||||
{
|
||||
var item = new Steamworks.Ugc.Item( fileId );
|
||||
|
||||
if ( ct == default )
|
||||
ct = new CancellationTokenSource( TimeSpan.FromSeconds( 60 ) ).Token;
|
||||
|
||||
progress?.Invoke( 0.0f );
|
||||
|
||||
if ( Download( fileId, true ) == false )
|
||||
return item.IsInstalled;
|
||||
|
||||
// Steam docs about Download:
|
||||
// If the return value is true then register and wait
|
||||
// for the Callback DownloadItemResult_t before calling
|
||||
// GetItemInstallInfo or accessing the workshop item on disk.
|
||||
|
||||
// Wait for DownloadItemResult_t
|
||||
{
|
||||
Action<Result> onDownloadStarted = null;
|
||||
|
||||
try
|
||||
{
|
||||
var downloadStarted = false;
|
||||
|
||||
onDownloadStarted = r => downloadStarted = true;
|
||||
OnDownloadItemResult += onDownloadStarted;
|
||||
|
||||
while ( downloadStarted == false )
|
||||
{
|
||||
if ( ct.IsCancellationRequested )
|
||||
break;
|
||||
|
||||
await Task.Delay( milisecondsUpdateDelay );
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
OnDownloadItemResult -= onDownloadStarted;
|
||||
}
|
||||
}
|
||||
|
||||
progress?.Invoke( 0.2f );
|
||||
await Task.Delay( milisecondsUpdateDelay );
|
||||
|
||||
//Wait for downloading completion
|
||||
{
|
||||
while ( true )
|
||||
{
|
||||
if ( ct.IsCancellationRequested )
|
||||
break;
|
||||
|
||||
progress?.Invoke( 0.2f + item.DownloadAmount * 0.8f );
|
||||
|
||||
if ( !item.IsDownloading && item.IsInstalled )
|
||||
break;
|
||||
|
||||
await Task.Delay( milisecondsUpdateDelay );
|
||||
}
|
||||
}
|
||||
|
||||
progress?.Invoke( 1.0f );
|
||||
|
||||
return item.IsInstalled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Utility function to fetch a single item. Internally this uses Ugc.FileQuery -
|
||||
/// which you can use to query multiple items if you need to.
|
||||
/// </summary>
|
||||
public static async Task<Ugc.Item?> QueryFileAsync( PublishedFileId fileId )
|
||||
{
|
||||
var result = await Ugc.Query.All
|
||||
.WithFileId( fileId )
|
||||
.GetPageAsync( 1 );
|
||||
|
||||
if ( !result.HasValue || result.Value.ResultCount != 1 )
|
||||
return null;
|
||||
|
||||
var item = result.Value.Entries.First();
|
||||
|
||||
result.Value.Dispose();
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public static async Task<bool> StartPlaytimeTracking(PublishedFileId fileId)
|
||||
{
|
||||
var result = await Internal.StartPlaytimeTracking(new[] {fileId}, 1);
|
||||
return result.Value.Result == Result.OK;
|
||||
}
|
||||
|
||||
public static async Task<bool> StopPlaytimeTracking(PublishedFileId fileId)
|
||||
{
|
||||
var result = await Internal.StopPlaytimeTracking(new[] {fileId}, 1);
|
||||
return result.Value.Result == Result.OK;
|
||||
}
|
||||
|
||||
public static async Task<bool> StopPlaytimeTrackingForAllItems()
|
||||
{
|
||||
var result = await Internal.StopPlaytimeTrackingForAllItems();
|
||||
return result.Value.Result == Result.OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
493
Facepunch.Steamworks/SteamUser.cs
Normal file
493
Facepunch.Steamworks/SteamUser.cs
Normal file
@@ -0,0 +1,493 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Facepunch.Steamworks.Data;
|
||||
|
||||
namespace Facepunch.Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Functions for accessing and manipulating Steam user information.
|
||||
/// This is also where the APIs for Steam Voice are exposed.
|
||||
/// </summary>
|
||||
public class SteamUser : SteamClientClass<SteamUser>
|
||||
{
|
||||
internal static ISteamUser Internal => Interface as ISteamUser;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamUser( server ) );
|
||||
InstallEvents();
|
||||
|
||||
richPresence = new Dictionary<string, string>();
|
||||
SampleRate = OptimalSampleRate;
|
||||
}
|
||||
|
||||
static Dictionary<string, string> richPresence;
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
Dispatch.Install<SteamServersConnected_t>( x => OnSteamServersConnected?.Invoke() );
|
||||
Dispatch.Install<SteamServerConnectFailure_t>( x => OnSteamServerConnectFailure?.Invoke() );
|
||||
Dispatch.Install<SteamServersDisconnected_t>( x => OnSteamServersDisconnected?.Invoke() );
|
||||
Dispatch.Install<ClientGameServerDeny_t>( x => OnClientGameServerDeny?.Invoke() );
|
||||
Dispatch.Install<LicensesUpdated_t>( x => OnLicensesUpdated?.Invoke() );
|
||||
Dispatch.Install<ValidateAuthTicketResponse_t>( x => OnValidateAuthTicketResponse?.Invoke( x.SteamID, x.OwnerSteamID, x.AuthSessionResponse ) );
|
||||
Dispatch.Install<MicroTxnAuthorizationResponse_t>( x => OnMicroTxnAuthorizationResponse?.Invoke( x.AppID, x.OrderID, x.Authorized != 0 ) );
|
||||
Dispatch.Install<GameWebCallback_t>( x => OnGameWebCallback?.Invoke( x.URLUTF8() ) );
|
||||
Dispatch.Install<GetAuthSessionTicketResponse_t>( x => OnGetAuthSessionTicketResponse?.Invoke( x ) );
|
||||
Dispatch.Install<DurationControl_t>( x => OnDurationControl?.Invoke( new DurationControl { _inner = x } ) );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when a connections to the Steam back-end has been established.
|
||||
/// This means the Steam client now has a working connection to the Steam servers.
|
||||
/// Usually this will have occurred before the game has launched, and should only be seen if the
|
||||
/// user has dropped connection due to a networking issue or a Steam server update.
|
||||
/// </summary>
|
||||
public static event Action OnSteamServersConnected;
|
||||
|
||||
/// <summary>
|
||||
/// Called when a connection attempt has failed.
|
||||
/// This will occur periodically if the Steam client is not connected,
|
||||
/// and has failed when retrying to establish a connection.
|
||||
/// </summary>
|
||||
public static event Action OnSteamServerConnectFailure;
|
||||
|
||||
/// <summary>
|
||||
/// Called if the client has lost connection to the Steam servers.
|
||||
/// Real-time services will be disabled until a matching OnSteamServersConnected has been posted.
|
||||
/// </summary>
|
||||
public static event Action OnSteamServersDisconnected;
|
||||
|
||||
/// <summary>
|
||||
/// Sent by the Steam server to the client telling it to disconnect from the specified game server,
|
||||
/// which it may be in the process of or already connected to.
|
||||
/// The game client should immediately disconnect upon receiving this message.
|
||||
/// This can usually occur if the user doesn't have rights to play on the game server.
|
||||
/// </summary>
|
||||
public static event Action OnClientGameServerDeny;
|
||||
|
||||
/// <summary>
|
||||
/// Called whenever the users licenses (owned packages) changes.
|
||||
/// </summary>
|
||||
public static event Action OnLicensesUpdated;
|
||||
|
||||
/// <summary>
|
||||
/// Called when an auth ticket has been validated.
|
||||
/// The first parameter is the steamid of this user
|
||||
/// The second is the Steam ID that owns the game, this will be different from the first
|
||||
/// if the game is being borrowed via Steam Family Sharing
|
||||
/// </summary>
|
||||
public static event Action<SteamId, SteamId, AuthResponse> OnValidateAuthTicketResponse;
|
||||
|
||||
/// <summary>
|
||||
/// Used internally for GetAuthSessionTicketAsync
|
||||
/// </summary>
|
||||
internal static event Action<GetAuthSessionTicketResponse_t> OnGetAuthSessionTicketResponse;
|
||||
|
||||
/// <summary>
|
||||
/// Called when a user has responded to a microtransaction authorization request.
|
||||
/// ( appid, orderid, user authorized )
|
||||
/// </summary>
|
||||
public static event Action<AppId, ulong, bool> OnMicroTxnAuthorizationResponse;
|
||||
|
||||
/// <summary>
|
||||
/// Sent to your game in response to a steam://gamewebcallback/ command from a user clicking a link in the Steam overlay browser.
|
||||
/// You can use this to add support for external site signups where you want to pop back into the browser after some web page
|
||||
/// signup sequence, and optionally get back some detail about that.
|
||||
/// </summary>
|
||||
public static event Action<string> OnGameWebCallback;
|
||||
|
||||
/// <summary>
|
||||
/// Sent for games with enabled anti indulgence / duration control, for enabled users.
|
||||
/// Lets the game know whether persistent rewards or XP should be granted at normal rate,
|
||||
/// half rate, or zero rate.
|
||||
/// </summary>
|
||||
public static event Action<DurationControl> OnDurationControl;
|
||||
|
||||
|
||||
|
||||
|
||||
static bool _recordingVoice;
|
||||
|
||||
/// <summary>
|
||||
/// Starts/Stops voice recording.
|
||||
/// Once started, use GetAvailableVoice and GetVoice to get the data, and then call StopVoiceRecording
|
||||
/// when the user has released their push-to-talk hotkey or the game session has completed.
|
||||
/// </summary>
|
||||
|
||||
public static bool VoiceRecord
|
||||
{
|
||||
get => _recordingVoice;
|
||||
set
|
||||
{
|
||||
_recordingVoice = value;
|
||||
if ( value ) Internal.StartVoiceRecording();
|
||||
else Internal.StopVoiceRecording();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if we have voice data waiting to be read
|
||||
/// </summary>
|
||||
public static bool HasVoiceData
|
||||
{
|
||||
get
|
||||
{
|
||||
uint szCompressed = 0, deprecated = 0;
|
||||
|
||||
if ( Internal.GetAvailableVoice( ref szCompressed, ref deprecated, 0 ) != VoiceResult.OK )
|
||||
return false;
|
||||
|
||||
return szCompressed > 0;
|
||||
}
|
||||
}
|
||||
|
||||
static byte[] readBuffer = new byte[1024*128];
|
||||
|
||||
/// <summary>
|
||||
/// Reads the voice data and returns the number of bytes written.
|
||||
/// The compressed data can be transmitted by your application and decoded back into raw audio data using
|
||||
/// DecompressVoice on the other side. The compressed data provided is in an arbitrary format and is not meant to be played directly.
|
||||
/// This should be called once per frame, and at worst no more than four times a second to keep the microphone input delay as low as
|
||||
/// possible. Calling this any less may result in gaps in the returned stream.
|
||||
/// </summary>
|
||||
public static unsafe int ReadVoiceData( System.IO.Stream stream )
|
||||
{
|
||||
if ( !HasVoiceData )
|
||||
return 0;
|
||||
|
||||
uint szWritten = 0;
|
||||
uint deprecated = 0;
|
||||
|
||||
fixed ( byte* b = readBuffer )
|
||||
{
|
||||
if ( Internal.GetVoice( true, (IntPtr)b, (uint)readBuffer.Length, ref szWritten, false, IntPtr.Zero, 0, ref deprecated, 0 ) != VoiceResult.OK )
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( szWritten == 0 )
|
||||
return 0;
|
||||
|
||||
stream.Write( readBuffer, 0, (int) szWritten );
|
||||
|
||||
return (int) szWritten;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reads the voice data and returns the bytes. You should obviously ideally be using
|
||||
/// ReadVoiceData because it won't be creating a new byte array every call. But this
|
||||
/// makes it easier to get it working, so let the babies have their bottle.
|
||||
/// </summary>
|
||||
public static unsafe byte[] ReadVoiceDataBytes()
|
||||
{
|
||||
if ( !HasVoiceData )
|
||||
return null;
|
||||
|
||||
uint szWritten = 0;
|
||||
uint deprecated = 0;
|
||||
|
||||
fixed ( byte* b = readBuffer )
|
||||
{
|
||||
if ( Internal.GetVoice( true, (IntPtr)b, (uint)readBuffer.Length, ref szWritten, false, IntPtr.Zero, 0, ref deprecated, 0 ) != VoiceResult.OK )
|
||||
return null;
|
||||
}
|
||||
|
||||
if ( szWritten == 0 )
|
||||
return null;
|
||||
|
||||
var arry = new byte[szWritten];
|
||||
Array.Copy( readBuffer, 0, arry, 0, szWritten );
|
||||
return arry;
|
||||
}
|
||||
|
||||
static uint sampleRate = 48000;
|
||||
|
||||
public static uint SampleRate
|
||||
{
|
||||
get => sampleRate;
|
||||
|
||||
set
|
||||
{
|
||||
if ( SampleRate < 11025 ) throw new System.Exception( "Sample Rate must be between 11025 and 48000" );
|
||||
if ( SampleRate > 48000 ) throw new System.Exception( "Sample Rate must be between 11025 and 48000" );
|
||||
|
||||
sampleRate = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static uint OptimalSampleRate => Internal.GetVoiceOptimalSampleRate();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Decodes the compressed voice data returned by GetVoice.
|
||||
/// The output data is raw single-channel 16-bit PCM audio.The decoder supports any sample rate from 11025 to 48000.
|
||||
/// </summary>
|
||||
public static unsafe int DecompressVoice( System.IO.Stream input, int length, System.IO.Stream output )
|
||||
{
|
||||
var from = Helpers.TakeBuffer( length );
|
||||
var to = Helpers.TakeBuffer( 1024 * 64 );
|
||||
|
||||
//
|
||||
// Copy from input stream to a pinnable buffer
|
||||
//
|
||||
using ( var s = new System.IO.MemoryStream( from ) )
|
||||
{
|
||||
input.CopyTo( s );
|
||||
}
|
||||
|
||||
uint szWritten = 0;
|
||||
|
||||
fixed ( byte* frm = from )
|
||||
fixed ( byte* dst = to )
|
||||
{
|
||||
if ( Internal.DecompressVoice( (IntPtr) frm, (uint) length, (IntPtr)dst, (uint)to.Length, ref szWritten, SampleRate ) != VoiceResult.OK )
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( szWritten == 0 )
|
||||
return 0;
|
||||
|
||||
//
|
||||
// Copy to output buffer
|
||||
//
|
||||
output.Write( to, 0, (int)szWritten );
|
||||
return (int)szWritten;
|
||||
}
|
||||
|
||||
public static unsafe int DecompressVoice( byte[] from, System.IO.Stream output )
|
||||
{
|
||||
var to = Helpers.TakeBuffer( 1024 * 64 );
|
||||
|
||||
uint szWritten = 0;
|
||||
|
||||
fixed ( byte* frm = from )
|
||||
fixed ( byte* dst = to )
|
||||
{
|
||||
if ( Internal.DecompressVoice( (IntPtr)frm, (uint)from.Length, (IntPtr)dst, (uint)to.Length, ref szWritten, SampleRate ) != VoiceResult.OK )
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( szWritten == 0 )
|
||||
return 0;
|
||||
|
||||
//
|
||||
// Copy to output buffer
|
||||
//
|
||||
output.Write( to, 0, (int)szWritten );
|
||||
return (int)szWritten;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve a authentication ticket to be sent to the entity who wishes to authenticate you.
|
||||
/// </summary>
|
||||
public static unsafe AuthTicket GetAuthSessionTicket()
|
||||
{
|
||||
var data = Helpers.TakeBuffer( 1024 );
|
||||
|
||||
fixed ( byte* b = data )
|
||||
{
|
||||
uint ticketLength = 0;
|
||||
uint ticket = Internal.GetAuthSessionTicket( (IntPtr)b, data.Length, ref ticketLength );
|
||||
|
||||
if ( ticket == 0 )
|
||||
return null;
|
||||
|
||||
return new AuthTicket()
|
||||
{
|
||||
Data = data.Take( (int)ticketLength ).ToArray(),
|
||||
Handle = ticket
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve a authentication ticket to be sent to the entity who wishes to authenticate you.
|
||||
/// This waits for a positive response from the backend before returning the ticket. This means
|
||||
/// the ticket is definitely ready to go as soon as it returns. Will return null if the callback
|
||||
/// times out or returns negatively.
|
||||
/// </summary>
|
||||
public static async Task<AuthTicket> GetAuthSessionTicketAsync( double timeoutSeconds = 10.0f )
|
||||
{
|
||||
var result = Result.Pending;
|
||||
AuthTicket ticket = null;
|
||||
var stopwatch = Stopwatch.StartNew();
|
||||
|
||||
void f( GetAuthSessionTicketResponse_t t )
|
||||
{
|
||||
if ( t.AuthTicket != ticket.Handle ) return;
|
||||
result = t.Result;
|
||||
}
|
||||
|
||||
OnGetAuthSessionTicketResponse += f;
|
||||
|
||||
try
|
||||
{
|
||||
ticket = GetAuthSessionTicket();
|
||||
if ( ticket == null )
|
||||
return null;
|
||||
|
||||
while ( result == Result.Pending )
|
||||
{
|
||||
await Task.Delay( 10 );
|
||||
|
||||
if ( stopwatch.Elapsed.TotalSeconds > timeoutSeconds )
|
||||
{
|
||||
ticket.Cancel();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if ( result == Result.OK )
|
||||
return ticket;
|
||||
|
||||
ticket.Cancel();
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
OnGetAuthSessionTicketResponse -= f;
|
||||
}
|
||||
}
|
||||
|
||||
public static unsafe BeginAuthResult BeginAuthSession( byte[] ticketData, SteamId steamid )
|
||||
{
|
||||
fixed ( byte* ptr = ticketData )
|
||||
{
|
||||
return Internal.BeginAuthSession( (IntPtr) ptr, ticketData.Length, steamid );
|
||||
}
|
||||
}
|
||||
|
||||
public static void EndAuthSession( SteamId steamid ) => Internal.EndAuthSession( steamid );
|
||||
|
||||
|
||||
// UserHasLicenseForApp - SERVER VERSION ( DLC CHECKING )
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the current users looks like they are behind a NAT device.
|
||||
/// This is only valid if the user is connected to the Steam servers and may not catch all forms of NAT.
|
||||
/// </summary>
|
||||
public static bool IsBehindNAT => Internal.BIsBehindNAT();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Steam level of the user, as shown on their Steam community profile.
|
||||
/// </summary>
|
||||
public static int SteamLevel => Internal.GetPlayerSteamLevel();
|
||||
|
||||
/// <summary>
|
||||
/// Requests a URL which authenticates an in-game browser for store check-out, and then redirects to the specified URL.
|
||||
/// As long as the in-game browser accepts and handles session cookies, Steam microtransaction checkout pages will automatically recognize the user instead of presenting a login page.
|
||||
/// NOTE: The URL has a very short lifetime to prevent history-snooping attacks, so you should only call this API when you are about to launch the browser, or else immediately navigate to the result URL using a hidden browser window.
|
||||
/// NOTE: The resulting authorization cookie has an expiration time of one day, so it would be a good idea to request and visit a new auth URL every 12 hours.
|
||||
/// </summary>
|
||||
public static async Task<string> GetStoreAuthUrlAsync( string url )
|
||||
{
|
||||
var response = await Internal.RequestStoreAuthURL( url );
|
||||
if ( !response.HasValue )
|
||||
return null;
|
||||
|
||||
return response.Value.URLUTF8();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the current user has verified their phone number.
|
||||
/// </summary>
|
||||
public static bool IsPhoneVerified => Internal.BIsPhoneVerified();
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the current user has Steam Guard two factor authentication enabled on their account.
|
||||
/// </summary>
|
||||
public static bool IsTwoFactorEnabled => Internal.BIsTwoFactorEnabled();
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the user's phone number is used to uniquely identify them.
|
||||
/// </summary>
|
||||
public static bool IsPhoneIdentifying => Internal.BIsPhoneIdentifying();
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the current user's phone number is awaiting (re)verification.
|
||||
/// </summary>
|
||||
public static bool IsPhoneRequiringVerification => Internal.BIsPhoneRequiringVerification();
|
||||
|
||||
/// <summary>
|
||||
/// Requests an application ticket encrypted with the secret "encrypted app ticket key".
|
||||
/// The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
||||
/// There can only be one call pending, and this call is subject to a 60 second rate limit.
|
||||
/// If you get a null result from this it's probably because you're calling it too often.
|
||||
/// This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/
|
||||
/// </summary>
|
||||
public static async Task<byte[]> RequestEncryptedAppTicketAsync( byte[] dataToInclude )
|
||||
{
|
||||
var dataPtr = Marshal.AllocHGlobal( dataToInclude.Length );
|
||||
Marshal.Copy( dataToInclude, 0, dataPtr, dataToInclude.Length );
|
||||
|
||||
try
|
||||
{
|
||||
var result = await Internal.RequestEncryptedAppTicket( dataPtr, dataToInclude.Length );
|
||||
if ( !result.HasValue || result.Value.Result != Result.OK ) return null;
|
||||
|
||||
var ticketData = Marshal.AllocHGlobal( 1024 );
|
||||
uint outSize = 0;
|
||||
byte[] data = null;
|
||||
|
||||
if ( Internal.GetEncryptedAppTicket( ticketData, 1024, ref outSize ) )
|
||||
{
|
||||
data = new byte[outSize];
|
||||
Marshal.Copy( ticketData, data, 0, (int) outSize );
|
||||
}
|
||||
|
||||
Marshal.FreeHGlobal( ticketData );
|
||||
|
||||
return data;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Marshal.FreeHGlobal( dataPtr );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Requests an application ticket encrypted with the secret "encrypted app ticket key".
|
||||
/// The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
||||
/// There can only be one call pending, and this call is subject to a 60 second rate limit.
|
||||
/// This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/
|
||||
/// </summary>
|
||||
public static async Task<byte[]> RequestEncryptedAppTicketAsync()
|
||||
{
|
||||
var result = await Internal.RequestEncryptedAppTicket( IntPtr.Zero, 0 );
|
||||
if ( !result.HasValue || result.Value.Result != Result.OK ) return null;
|
||||
|
||||
var ticketData = Marshal.AllocHGlobal( 1024 );
|
||||
uint outSize = 0;
|
||||
byte[] data = null;
|
||||
|
||||
if ( Internal.GetEncryptedAppTicket( ticketData, 1024, ref outSize ) )
|
||||
{
|
||||
data = new byte[outSize];
|
||||
Marshal.Copy( ticketData, data, 0, (int)outSize );
|
||||
}
|
||||
|
||||
Marshal.FreeHGlobal( ticketData );
|
||||
|
||||
return data;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get anti indulgence / duration control
|
||||
/// </summary>
|
||||
public static async Task<DurationControl> GetDurationControl()
|
||||
{
|
||||
var response = await Internal.GetDurationControl();
|
||||
if ( !response.HasValue ) return default;
|
||||
|
||||
return new DurationControl { _inner = response.Value };
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user