(965c31410a) Unstable v0.10.4.0
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
using Steamworks.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections.Generic;
|
||||
using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
[StructLayout( LayoutKind.Sequential )]
|
||||
internal partial class Callback
|
||||
{
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
public delegate void Run( IntPtr thisptr, IntPtr pvParam );
|
||||
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
public delegate void RunCall( IntPtr thisptr, IntPtr pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall );
|
||||
|
||||
[UnmanagedFunctionPointer( CallingConvention.ThisCall )]
|
||||
public delegate int GetCallbackSizeBytes( IntPtr thisptr );
|
||||
|
||||
internal enum Flags : byte
|
||||
{
|
||||
Registered = 0x01,
|
||||
GameServer = 0x02
|
||||
}
|
||||
|
||||
public IntPtr vTablePtr;
|
||||
public byte CallbackFlags;
|
||||
public int CallbackId;
|
||||
|
||||
//
|
||||
// These are functions that are on CCallback but are never called
|
||||
// We could just send a IntPtr.Zero but it's probably safer to throw a
|
||||
// big apeshit message if steam changes its behaviour at some point
|
||||
//
|
||||
[MonoPInvokeCallback]
|
||||
internal static void RunStub( IntPtr self, IntPtr param, bool failure, SteamAPICall_t call ) =>
|
||||
throw new System.Exception( "Something changed in the Steam API and now CCallbackBack is calling the CallResult function [Run( void *pvParam, bool bIOFailure, SteamAPICall_t hSteamAPICall )]" );
|
||||
|
||||
[MonoPInvokeCallback]
|
||||
internal static int SizeStub( IntPtr self ) =>
|
||||
throw new System.Exception( "Something changed in the Steam API and now CCallbackBack is calling the GetSize function [GetCallbackSizeBytes()]" );
|
||||
};
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
using Steamworks.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
//
|
||||
// Created on registration of a callback
|
||||
//
|
||||
internal class Event : IDisposable
|
||||
{
|
||||
internal static List<IDisposable> AllClient = new List<IDisposable>();
|
||||
internal static List<IDisposable> AllServer = new List<IDisposable>();
|
||||
|
||||
internal static void DisposeAllClient()
|
||||
{
|
||||
foreach ( var a in AllClient.ToArray() )
|
||||
{
|
||||
a.Dispose();
|
||||
}
|
||||
|
||||
AllClient.Clear();
|
||||
}
|
||||
|
||||
internal static void DisposeAllServer()
|
||||
{
|
||||
foreach ( var a in AllServer.ToArray() )
|
||||
{
|
||||
a.Dispose();
|
||||
}
|
||||
|
||||
AllServer.Clear();
|
||||
}
|
||||
|
||||
internal static void Register( Callback.Run func, int size, int callbackId, bool gameserver )
|
||||
{
|
||||
var r = new Event();
|
||||
r.vTablePtr = BuildVTable( func, r.Allocations );
|
||||
|
||||
//
|
||||
// Create the callback object
|
||||
//
|
||||
var cb = new Callback();
|
||||
cb.vTablePtr = r.vTablePtr;
|
||||
cb.CallbackFlags = gameserver ? (byte)0x02 : (byte)0;
|
||||
cb.CallbackId = callbackId;
|
||||
|
||||
//
|
||||
// Pin the callback, so it doesn't get garbage collected and we can pass the pointer to native
|
||||
//
|
||||
r.PinnedCallback = GCHandle.Alloc( cb, GCHandleType.Pinned );
|
||||
|
||||
//
|
||||
// Register the callback with Steam
|
||||
//
|
||||
SteamClient.RegisterCallback( r.PinnedCallback.AddrOfPinnedObject(), cb.CallbackId );
|
||||
|
||||
r.IsAllocated = true;
|
||||
|
||||
if ( gameserver )
|
||||
Event.AllServer.Add( r );
|
||||
else
|
||||
Event.AllClient.Add( r );
|
||||
}
|
||||
|
||||
static IntPtr BuildVTable( Callback.Run run, List<GCHandle> allocations )
|
||||
{
|
||||
var RunStub = (Callback.RunCall)Callback.RunStub;
|
||||
var SizeStub = (Callback.GetCallbackSizeBytes)Callback.SizeStub;
|
||||
|
||||
allocations.Add( GCHandle.Alloc( run ) );
|
||||
allocations.Add( GCHandle.Alloc( RunStub ) );
|
||||
allocations.Add( GCHandle.Alloc( SizeStub ) );
|
||||
|
||||
var a = Marshal.GetFunctionPointerForDelegate<Callback.Run>( run );
|
||||
var b = Marshal.GetFunctionPointerForDelegate<Callback.RunCall>( RunStub );
|
||||
var c = Marshal.GetFunctionPointerForDelegate<Callback.GetCallbackSizeBytes>( SizeStub );
|
||||
|
||||
var vt = Marshal.AllocHGlobal( IntPtr.Size * 3 );
|
||||
|
||||
// Windows switches the function positions
|
||||
#if PLATFORM_WIN
|
||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 0, b );
|
||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 1, a );
|
||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 2, c );
|
||||
#else
|
||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 0, a );
|
||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 1, b );
|
||||
Marshal.WriteIntPtr( vt, IntPtr.Size * 2, c );
|
||||
#endif
|
||||
|
||||
return vt;
|
||||
}
|
||||
|
||||
bool IsAllocated;
|
||||
List<GCHandle> Allocations = new List<GCHandle>();
|
||||
internal IntPtr vTablePtr;
|
||||
internal GCHandle PinnedCallback;
|
||||
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if ( !IsAllocated ) return;
|
||||
IsAllocated = false;
|
||||
|
||||
if ( !PinnedCallback.IsAllocated )
|
||||
throw new System.Exception( "Callback isn't allocated!?" );
|
||||
|
||||
SteamClient.UnregisterCallback( PinnedCallback.AddrOfPinnedObject() );
|
||||
|
||||
foreach ( var a in Allocations )
|
||||
{
|
||||
if ( a.IsAllocated )
|
||||
a.Free();
|
||||
}
|
||||
|
||||
Allocations = null;
|
||||
|
||||
PinnedCallback.Free();
|
||||
|
||||
if ( vTablePtr != IntPtr.Zero )
|
||||
{
|
||||
Marshal.FreeHGlobal( vTablePtr );
|
||||
vTablePtr = IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
~Event()
|
||||
{
|
||||
Dispose();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using Steamworks.Data;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
/// <summary>
|
||||
/// Gives us a generic way to get the CallbackId of structs
|
||||
/// </summary>
|
||||
internal interface ICallbackData
|
||||
{
|
||||
CallbackType CallbackType { get; }
|
||||
int DataSize { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,334 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
using Steamworks;
|
||||
using System.Linq;
|
||||
|
||||
namespace 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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal static class SteamAPI
|
||||
{
|
||||
internal static class Native
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_Init", CallingConvention = CallingConvention.Cdecl )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
public static extern bool SteamAPI_Init();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_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 );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
-8
@@ -17,9 +17,6 @@ namespace Steamworks
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_Shutdown", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern void SteamGameServer_Shutdown();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_GetHSteamUser", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern HSteamUser SteamGameServer_GetHSteamUser();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamGameServer_GetHSteamPipe", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern HSteamPipe SteamGameServer_GetHSteamPipe();
|
||||
|
||||
@@ -34,11 +31,6 @@ namespace Steamworks
|
||||
Native.SteamGameServer_Shutdown();
|
||||
}
|
||||
|
||||
static internal HSteamUser GetHSteamUser()
|
||||
{
|
||||
return Native.SteamGameServer_GetHSteamUser();
|
||||
}
|
||||
|
||||
static internal HSteamPipe GetHSteamPipe()
|
||||
{
|
||||
return Native.SteamGameServer_GetHSteamPipe();
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal static class SteamInternal
|
||||
{
|
||||
internal static class Native
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamInternal_GameServer_Init", CallingConvention = CallingConvention.Cdecl )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
public static extern bool SteamInternal_GameServer_Init( uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString );
|
||||
}
|
||||
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
/// High level connection status
|
||||
public enum ConnectionState
|
||||
{
|
||||
|
||||
/// Dummy value used to indicate an error condition in the API.
|
||||
/// Specified connection doesn't exist or has already been closed.
|
||||
None = 0,
|
||||
|
||||
/// We are trying to establish whether peers can talk to each other,
|
||||
/// whether they WANT to talk to each other, perform basic auth,
|
||||
/// and exchange crypt keys.
|
||||
///
|
||||
/// - For connections on the "client" side (initiated locally):
|
||||
/// We're in the process of trying to establish a connection.
|
||||
/// Depending on the connection type, we might not know who they are.
|
||||
/// Note that it is not possible to tell if we are waiting on the
|
||||
/// network to complete handshake packets, or for the application layer
|
||||
/// to accept the connection.
|
||||
///
|
||||
/// - For connections on the "server" side (accepted through listen socket):
|
||||
/// We have completed some basic handshake and the client has presented
|
||||
/// some proof of identity. The connection is ready to be accepted
|
||||
/// using AcceptConnection().
|
||||
///
|
||||
/// In either case, any unreliable packets sent now are almost certain
|
||||
/// to be dropped. Attempts to receive packets are guaranteed to fail.
|
||||
/// You may send messages if the send mode allows for them to be queued.
|
||||
/// but if you close the connection before the connection is actually
|
||||
/// established, any queued messages will be discarded immediately.
|
||||
/// (We will not attempt to flush the queue and confirm delivery to the
|
||||
/// remote host, which ordinarily happens when a connection is closed.)
|
||||
Connecting = 1,
|
||||
|
||||
/// Some connection types use a back channel or trusted 3rd party
|
||||
/// for earliest communication. If the server accepts the connection,
|
||||
/// then these connections switch into the rendezvous state. During this
|
||||
/// state, we still have not yet established an end-to-end route (through
|
||||
/// the relay network), and so if you send any messages unreliable, they
|
||||
/// are going to be discarded.
|
||||
FindingRoute = 2,
|
||||
|
||||
/// We've received communications from our peer (and we know
|
||||
/// who they are) and are all good. If you close the connection now,
|
||||
/// we will make our best effort to flush out any reliable sent data that
|
||||
/// has not been acknowledged by the peer. (But note that this happens
|
||||
/// from within the application process, so unlike a TCP connection, you are
|
||||
/// not totally handing it off to the operating system to deal with it.)
|
||||
Connected = 3,
|
||||
|
||||
/// Connection has been closed by our peer, but not closed locally.
|
||||
/// The connection still exists from an API perspective. You must close the
|
||||
/// handle to free up resources. If there are any messages in the inbound queue,
|
||||
/// you may retrieve them. Otherwise, nothing may be done with the connection
|
||||
/// except to close it.
|
||||
///
|
||||
/// This stats is similar to CLOSE_WAIT in the TCP state machine.
|
||||
ClosedByPeer = 4,
|
||||
|
||||
/// A disruption in the connection has been detected locally. (E.g. timeout,
|
||||
/// local internet connection disrupted, etc.)
|
||||
///
|
||||
/// The connection still exists from an API perspective. You must close the
|
||||
/// handle to free up resources.
|
||||
///
|
||||
/// Attempts to send further messages will fail. Any remaining received messages
|
||||
/// in the queue are available.
|
||||
ProblemDetectedLocally = 5,
|
||||
|
||||
//
|
||||
// The following values are used internally and will not be returned by any API.
|
||||
// We document them here to provide a little insight into the state machine that is used
|
||||
// under the hood.
|
||||
//
|
||||
|
||||
/// We've disconnected on our side, and from an API perspective the connection is closed.
|
||||
/// No more data may be sent or received. All reliable data has been flushed, or else
|
||||
/// we've given up and discarded it. We do not yet know for sure that the peer knows
|
||||
/// the connection has been closed, however, so we're just hanging around so that if we do
|
||||
/// get a packet from them, we can send them the appropriate packets so that they can
|
||||
/// know why the connection was closed (and not have to rely on a timeout, which makes
|
||||
/// it appear as if something is wrong).
|
||||
FinWait = -1,
|
||||
|
||||
/// We've disconnected on our side, and from an API perspective the connection is closed.
|
||||
/// No more data may be sent or received. From a network perspective, however, on the wire,
|
||||
/// we have not yet given any indication to the peer that the connection is closed.
|
||||
/// We are in the process of flushing out the last bit of reliable data. Once that is done,
|
||||
/// we will inform the peer that the connection has been closed, and transition to the
|
||||
/// FinWait state.
|
||||
///
|
||||
/// Note that no indication is given to the remote host that we have closed the connection,
|
||||
/// until the data has been flushed. If the remote host attempts to send us data, we will
|
||||
/// do whatever is necessary to keep the connection alive until it can be closed properly.
|
||||
/// But in fact the data will be discarded, since there is no way for the application to
|
||||
/// read it back. Typically this is not a problem, as application protocols that utilize
|
||||
/// the lingering functionality are designed for the remote host to wait for the response
|
||||
/// before sending any more data.
|
||||
Linger = -2,
|
||||
|
||||
/// Connection is completely inactive and ready to be destroyed
|
||||
Dead = -3,
|
||||
|
||||
Force32Bit = 0x7fffffff
|
||||
};
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
public enum DebugOutputType : int
|
||||
{
|
||||
None = 0,
|
||||
Bug = 1, // You used the API incorrectly, or an internal error happened
|
||||
Error = 2, // Run-time error condition that isn't the result of a bug. (E.g. we are offline, cannot bind a port, etc)
|
||||
Important = 3, // Nothing is wrong, but this is an important notification
|
||||
Warning = 4,
|
||||
Msg = 5, // Recommended amount
|
||||
Verbose = 6, // Quite a bit
|
||||
Debug = 7, // Practically everything
|
||||
Everything = 8, // Wall of text, detailed packet contents breakdown, etc
|
||||
|
||||
Force32Bit = 0x7fffffff
|
||||
};
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
internal enum NetConfig : int
|
||||
{
|
||||
Invalid = 0,
|
||||
FakePacketLoss_Send = 2,
|
||||
FakePacketLoss_Recv = 3,
|
||||
FakePacketLag_Send = 4,
|
||||
FakePacketLag_Recv = 5,
|
||||
|
||||
FakePacketReorder_Send = 6,
|
||||
FakePacketReorder_Recv = 7,
|
||||
|
||||
FakePacketReorder_Time = 8,
|
||||
|
||||
FakePacketDup_Send = 26,
|
||||
FakePacketDup_Recv = 27,
|
||||
|
||||
FakePacketDup_TimeMax = 28,
|
||||
|
||||
TimeoutInitial = 24,
|
||||
|
||||
TimeoutConnected = 25,
|
||||
|
||||
SendBufferSize = 9,
|
||||
|
||||
SendRateMin = 10,
|
||||
SendRateMax = 11,
|
||||
|
||||
NagleTime = 12,
|
||||
|
||||
IP_AllowWithoutAuth = 23,
|
||||
|
||||
SDRClient_ConsecutitivePingTimeoutsFailInitial = 19,
|
||||
|
||||
SDRClient_ConsecutitivePingTimeoutsFail = 20,
|
||||
|
||||
SDRClient_MinPingsBeforePingAccurate = 21,
|
||||
|
||||
SDRClient_SingleSocket = 22,
|
||||
|
||||
SDRClient_ForceRelayCluster = 29,
|
||||
|
||||
SDRClient_DebugTicketAddress = 30,
|
||||
|
||||
SDRClient_ForceProxyAddr = 31,
|
||||
|
||||
LogLevel_AckRTT = 13,
|
||||
LogLevel_PacketDecode = 14,
|
||||
LogLevel_Message = 15,
|
||||
LogLevel_PacketGaps = 16,
|
||||
LogLevel_P2PRendezvous = 17,
|
||||
LogLevel_SDRRelayPings = 18,
|
||||
|
||||
Force32Bit = 0x7fffffff
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
enum NetConfigResult
|
||||
{
|
||||
BadValue = -1, // No such configuration value
|
||||
BadScopeObj = -2, // Bad connection handle, etc
|
||||
BufferTooSmall = -3, // Couldn't fit the result in your buffer
|
||||
OK = 1,
|
||||
OKInherited = 2, // A value was not set at this level, but the effective (inherited) value was returned.
|
||||
|
||||
Force32Bit = 0x7fffffff
|
||||
};
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
enum NetConfigType
|
||||
{
|
||||
Int32 = 1,
|
||||
Int64 = 2,
|
||||
Float = 3,
|
||||
String = 4,
|
||||
FunctionPtr = 5, // NOTE: When setting callbacks, you should put the pointer into a variable and pass a pointer to that variable.
|
||||
|
||||
Force32Bit = 0x7fffffff
|
||||
};
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
internal enum NetScope : int
|
||||
{
|
||||
Global = 1,
|
||||
SocketsInterface = 2,
|
||||
ListenSocket = 3,
|
||||
Connection = 4,
|
||||
|
||||
Force32Bit = 0x7fffffff
|
||||
}
|
||||
}
|
||||
@@ -7,29 +7,30 @@
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
|
||||
<RootNamespace>Steamworks</RootNamespace>
|
||||
<Platforms>AnyCPU;x64</Platforms>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="steam_api64.dll">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Authors>Garry Newman</Authors>
|
||||
<PackageId>Facepunch.Steamworks</PackageId>
|
||||
<PackageDescription>Another fucking c# Steamworks implementation</PackageDescription>
|
||||
<PackageDescription>Steamworks implementation with an emphasis on making things easy. For Windows x64.</PackageDescription>
|
||||
<PackageProjectUrl>https://github.com/Facepunch/Facepunch.Steamworks</PackageProjectUrl>
|
||||
<PackageIconUrl>https://files.facepunch.com/garry/c5edce1c-0c21-4c5d-95b6-37743be7455d.jpg</PackageIconUrl>
|
||||
<PackageIcon>Facepunch.Steamworks.jpg</PackageIcon>
|
||||
<PackageTags>facepunch;steam;unity;steamworks;valve</PackageTags>
|
||||
<PackageVersion>2.2.0</PackageVersion>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<RepositoryUrl>https://github.com/Facepunch/Facepunch.Steamworks.git</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="steam_api64.dll" PackagePath="\content\" Pack="true" PackageCopyToOutput="true">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Facepunch.Steamworks.jpg" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netstandard2.1|x64'">
|
||||
<NoWarn>1701;1702;1591;1587</NoWarn>
|
||||
@@ -49,4 +50,17 @@
|
||||
|
||||
<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>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -5,6 +5,11 @@
|
||||
<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>
|
||||
|
||||
@@ -0,0 +1,426 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using Steamworks.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace 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 )},
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamAppList : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamAppList( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamAppList_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamAppList_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamAppList_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetNumInstalledApps", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetNumInstalledApps( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetNumInstalledApps()
|
||||
{
|
||||
var returnValue = _GetNumInstalledApps( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetInstalledApps", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetInstalledApps( IntPtr self, [In,Out] AppId[] pvecAppID, uint unMaxAppIDs );
|
||||
|
||||
#endregion
|
||||
internal uint GetInstalledApps( [In,Out] AppId[] pvecAppID, uint unMaxAppIDs )
|
||||
{
|
||||
var returnValue = _GetInstalledApps( Self, pvecAppID, unMaxAppIDs );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetAppName", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAppName( IntPtr self, AppId nAppID, IntPtr pchName, int cchNameMax );
|
||||
|
||||
#endregion
|
||||
internal int GetAppName( AppId nAppID, out string pchName )
|
||||
{
|
||||
IntPtr mempchName = Helpers.TakeMemory();
|
||||
var returnValue = _GetAppName( Self, nAppID, mempchName, (1024 * 32) );
|
||||
pchName = Helpers.MemoryToString( mempchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetAppInstallDir", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAppInstallDir( IntPtr self, AppId nAppID, IntPtr pchDirectory, int cchNameMax );
|
||||
|
||||
#endregion
|
||||
internal int GetAppInstallDir( AppId nAppID, out string pchDirectory )
|
||||
{
|
||||
IntPtr mempchDirectory = Helpers.TakeMemory();
|
||||
var returnValue = _GetAppInstallDir( Self, nAppID, mempchDirectory, (1024 * 32) );
|
||||
pchDirectory = Helpers.MemoryToString( mempchDirectory );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamAppList_GetAppBuildId", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAppBuildId( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal int GetAppBuildId( AppId nAppID )
|
||||
{
|
||||
var returnValue = _GetAppBuildId( Self, nAppID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,78 +9,24 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamApps : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMAPPS_INTERFACE_VERSION008";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamApps( bool IsGameServer )
|
||||
{
|
||||
_BIsSubscribed = Marshal.GetDelegateForFunctionPointer<FBIsSubscribed>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_BIsLowViolence = Marshal.GetDelegateForFunctionPointer<FBIsLowViolence>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_BIsCybercafe = Marshal.GetDelegateForFunctionPointer<FBIsCybercafe>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_BIsVACBanned = Marshal.GetDelegateForFunctionPointer<FBIsVACBanned>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_GetCurrentGameLanguage = Marshal.GetDelegateForFunctionPointer<FGetCurrentGameLanguage>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_GetAvailableGameLanguages = Marshal.GetDelegateForFunctionPointer<FGetAvailableGameLanguages>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_BIsSubscribedApp = Marshal.GetDelegateForFunctionPointer<FBIsSubscribedApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_BIsDlcInstalled = Marshal.GetDelegateForFunctionPointer<FBIsDlcInstalled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_GetEarliestPurchaseUnixTime = Marshal.GetDelegateForFunctionPointer<FGetEarliestPurchaseUnixTime>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_BIsSubscribedFromFreeWeekend = Marshal.GetDelegateForFunctionPointer<FBIsSubscribedFromFreeWeekend>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetDLCCount = Marshal.GetDelegateForFunctionPointer<FGetDLCCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_BGetDLCDataByIndex = Marshal.GetDelegateForFunctionPointer<FBGetDLCDataByIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_InstallDLC = Marshal.GetDelegateForFunctionPointer<FInstallDLC>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_UninstallDLC = Marshal.GetDelegateForFunctionPointer<FUninstallDLC>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_RequestAppProofOfPurchaseKey = Marshal.GetDelegateForFunctionPointer<FRequestAppProofOfPurchaseKey>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetCurrentBetaName = Marshal.GetDelegateForFunctionPointer<FGetCurrentBetaName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_MarkContentCorrupt = Marshal.GetDelegateForFunctionPointer<FMarkContentCorrupt>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetInstalledDepots = Marshal.GetDelegateForFunctionPointer<FGetInstalledDepots>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetAppInstallDir = Marshal.GetDelegateForFunctionPointer<FGetAppInstallDir>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_BIsAppInstalled = Marshal.GetDelegateForFunctionPointer<FBIsAppInstalled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetAppOwner = Marshal.GetDelegateForFunctionPointer<FGetAppOwner>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetLaunchQueryParam = Marshal.GetDelegateForFunctionPointer<FGetLaunchQueryParam>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_GetDlcDownloadProgress = Marshal.GetDelegateForFunctionPointer<FGetDlcDownloadProgress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_GetAppBuildId = Marshal.GetDelegateForFunctionPointer<FGetAppBuildId>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_RequestAllProofOfPurchaseKeys = Marshal.GetDelegateForFunctionPointer<FRequestAllProofOfPurchaseKeys>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_GetFileDetails = Marshal.GetDelegateForFunctionPointer<FGetFileDetails>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_GetLaunchCommandLine = Marshal.GetDelegateForFunctionPointer<FGetLaunchCommandLine>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_BIsSubscribedFromFamilySharing = Marshal.GetDelegateForFunctionPointer<FBIsSubscribedFromFamilySharing>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_BIsSubscribed = null;
|
||||
_BIsLowViolence = null;
|
||||
_BIsCybercafe = null;
|
||||
_BIsVACBanned = null;
|
||||
_GetCurrentGameLanguage = null;
|
||||
_GetAvailableGameLanguages = null;
|
||||
_BIsSubscribedApp = null;
|
||||
_BIsDlcInstalled = null;
|
||||
_GetEarliestPurchaseUnixTime = null;
|
||||
_BIsSubscribedFromFreeWeekend = null;
|
||||
_GetDLCCount = null;
|
||||
_BGetDLCDataByIndex = null;
|
||||
_InstallDLC = null;
|
||||
_UninstallDLC = null;
|
||||
_RequestAppProofOfPurchaseKey = null;
|
||||
_GetCurrentBetaName = null;
|
||||
_MarkContentCorrupt = null;
|
||||
_GetInstalledDepots = null;
|
||||
_GetAppInstallDir = null;
|
||||
_BIsAppInstalled = null;
|
||||
_GetAppOwner = null;
|
||||
_GetLaunchQueryParam = null;
|
||||
_GetDlcDownloadProgress = null;
|
||||
_GetAppBuildId = null;
|
||||
_RequestAllProofOfPurchaseKeys = null;
|
||||
_GetFileDetails = null;
|
||||
_GetLaunchCommandLine = null;
|
||||
_BIsSubscribedFromFamilySharing = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamApps_v008", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamApps_v008();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamApps_v008();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerApps_v008", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerApps_v008();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerApps_v008();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribed", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsSubscribed( IntPtr self );
|
||||
private FBIsSubscribed _BIsSubscribed;
|
||||
private static extern bool _BIsSubscribed( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribed()
|
||||
@@ -90,10 +36,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsLowViolence", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsLowViolence( IntPtr self );
|
||||
private FBIsLowViolence _BIsLowViolence;
|
||||
private static extern bool _BIsLowViolence( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsLowViolence()
|
||||
@@ -103,10 +48,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsCybercafe", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsCybercafe( IntPtr self );
|
||||
private FBIsCybercafe _BIsCybercafe;
|
||||
private static extern bool _BIsCybercafe( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsCybercafe()
|
||||
@@ -116,10 +60,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsVACBanned", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsVACBanned( IntPtr self );
|
||||
private FBIsVACBanned _BIsVACBanned;
|
||||
private static extern bool _BIsVACBanned( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsVACBanned()
|
||||
@@ -129,9 +72,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetCurrentGameLanguage( IntPtr self );
|
||||
private FGetCurrentGameLanguage _GetCurrentGameLanguage;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetCurrentGameLanguage", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetCurrentGameLanguage( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal string GetCurrentGameLanguage()
|
||||
@@ -141,9 +83,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetAvailableGameLanguages( IntPtr self );
|
||||
private FGetAvailableGameLanguages _GetAvailableGameLanguages;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAvailableGameLanguages", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetAvailableGameLanguages( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal string GetAvailableGameLanguages()
|
||||
@@ -153,10 +94,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedApp", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsSubscribedApp( IntPtr self, AppId appID );
|
||||
private FBIsSubscribedApp _BIsSubscribedApp;
|
||||
private static extern bool _BIsSubscribedApp( IntPtr self, AppId appID );
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribedApp( AppId appID )
|
||||
@@ -166,10 +106,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsDlcInstalled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsDlcInstalled( IntPtr self, AppId appID );
|
||||
private FBIsDlcInstalled _BIsDlcInstalled;
|
||||
private static extern bool _BIsDlcInstalled( IntPtr self, AppId appID );
|
||||
|
||||
#endregion
|
||||
internal bool BIsDlcInstalled( AppId appID )
|
||||
@@ -179,9 +118,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetEarliestPurchaseUnixTime( IntPtr self, AppId nAppID );
|
||||
private FGetEarliestPurchaseUnixTime _GetEarliestPurchaseUnixTime;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetEarliestPurchaseUnixTime", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetEarliestPurchaseUnixTime( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal uint GetEarliestPurchaseUnixTime( AppId nAppID )
|
||||
@@ -191,10 +129,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFreeWeekend", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsSubscribedFromFreeWeekend( IntPtr self );
|
||||
private FBIsSubscribedFromFreeWeekend _BIsSubscribedFromFreeWeekend;
|
||||
private static extern bool _BIsSubscribedFromFreeWeekend( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribedFromFreeWeekend()
|
||||
@@ -204,9 +141,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetDLCCount( IntPtr self );
|
||||
private FGetDLCCount _GetDLCCount;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetDLCCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetDLCCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetDLCCount()
|
||||
@@ -216,10 +152,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BGetDLCDataByIndex", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBGetDLCDataByIndex( IntPtr self, int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, IntPtr pchName, int cchNameBufferSize );
|
||||
private FBGetDLCDataByIndex _BGetDLCDataByIndex;
|
||||
private static extern bool _BGetDLCDataByIndex( IntPtr self, int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, IntPtr pchName, int cchNameBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool BGetDLCDataByIndex( int iDLC, ref AppId pAppID, [MarshalAs( UnmanagedType.U1 )] ref bool pbAvailable, out string pchName )
|
||||
@@ -231,9 +166,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FInstallDLC( IntPtr self, AppId nAppID );
|
||||
private FInstallDLC _InstallDLC;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_InstallDLC", CallingConvention = Platform.CC)]
|
||||
private static extern void _InstallDLC( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal void InstallDLC( AppId nAppID )
|
||||
@@ -242,9 +176,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FUninstallDLC( IntPtr self, AppId nAppID );
|
||||
private FUninstallDLC _UninstallDLC;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_UninstallDLC", CallingConvention = Platform.CC)]
|
||||
private static extern void _UninstallDLC( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal void UninstallDLC( AppId nAppID )
|
||||
@@ -253,9 +186,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRequestAppProofOfPurchaseKey( IntPtr self, AppId nAppID );
|
||||
private FRequestAppProofOfPurchaseKey _RequestAppProofOfPurchaseKey;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_RequestAppProofOfPurchaseKey", CallingConvention = Platform.CC)]
|
||||
private static extern void _RequestAppProofOfPurchaseKey( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal void RequestAppProofOfPurchaseKey( AppId nAppID )
|
||||
@@ -264,10 +196,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetCurrentBetaName", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetCurrentBetaName( IntPtr self, IntPtr pchName, int cchNameBufferSize );
|
||||
private FGetCurrentBetaName _GetCurrentBetaName;
|
||||
private static extern bool _GetCurrentBetaName( IntPtr self, IntPtr pchName, int cchNameBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetCurrentBetaName( out string pchName )
|
||||
@@ -279,10 +210,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_MarkContentCorrupt", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FMarkContentCorrupt( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly );
|
||||
private FMarkContentCorrupt _MarkContentCorrupt;
|
||||
private static extern bool _MarkContentCorrupt( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly );
|
||||
|
||||
#endregion
|
||||
internal bool MarkContentCorrupt( [MarshalAs( UnmanagedType.U1 )] bool bMissingFilesOnly )
|
||||
@@ -292,9 +222,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetInstalledDepots( IntPtr self, AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots );
|
||||
private FGetInstalledDepots _GetInstalledDepots;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetInstalledDepots", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetInstalledDepots( IntPtr self, AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots );
|
||||
|
||||
#endregion
|
||||
internal uint GetInstalledDepots( AppId appID, [In,Out] DepotId_t[] pvecDepots, uint cMaxDepots )
|
||||
@@ -304,9 +233,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetAppInstallDir( IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize );
|
||||
private FGetAppInstallDir _GetAppInstallDir;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppInstallDir", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetAppInstallDir( IntPtr self, AppId appID, IntPtr pchFolder, uint cchFolderBufferSize );
|
||||
|
||||
#endregion
|
||||
internal uint GetAppInstallDir( AppId appID, out string pchFolder )
|
||||
@@ -318,10 +246,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsAppInstalled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsAppInstalled( IntPtr self, AppId appID );
|
||||
private FBIsAppInstalled _BIsAppInstalled;
|
||||
private static extern bool _BIsAppInstalled( IntPtr self, AppId appID );
|
||||
|
||||
#endregion
|
||||
internal bool BIsAppInstalled( AppId appID )
|
||||
@@ -331,31 +258,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetAppOwner( IntPtr self, ref SteamId retVal );
|
||||
#else
|
||||
private delegate SteamId FGetAppOwner( IntPtr self );
|
||||
#endif
|
||||
private FGetAppOwner _GetAppOwner;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppOwner", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetAppOwner( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetAppOwner()
|
||||
{
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetAppOwner( Self, ref retVal );
|
||||
return retVal;
|
||||
#else
|
||||
var returnValue = _GetAppOwner( Self );
|
||||
return returnValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetLaunchQueryParam( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
private FGetLaunchQueryParam _GetLaunchQueryParam;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetLaunchQueryParam", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetLaunchQueryParam( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal string GetLaunchQueryParam( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
@@ -365,10 +280,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetDlcDownloadProgress", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetDlcDownloadProgress( IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal );
|
||||
private FGetDlcDownloadProgress _GetDlcDownloadProgress;
|
||||
private static extern bool _GetDlcDownloadProgress( IntPtr self, AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal );
|
||||
|
||||
#endregion
|
||||
internal bool GetDlcDownloadProgress( AppId nAppID, ref ulong punBytesDownloaded, ref ulong punBytesTotal )
|
||||
@@ -378,9 +292,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetAppBuildId( IntPtr self );
|
||||
private FGetAppBuildId _GetAppBuildId;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetAppBuildId", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAppBuildId( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetAppBuildId()
|
||||
@@ -390,9 +303,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRequestAllProofOfPurchaseKeys( IntPtr self );
|
||||
private FRequestAllProofOfPurchaseKeys _RequestAllProofOfPurchaseKeys;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_RequestAllProofOfPurchaseKeys", CallingConvention = Platform.CC)]
|
||||
private static extern void _RequestAllProofOfPurchaseKeys( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RequestAllProofOfPurchaseKeys()
|
||||
@@ -401,21 +313,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FGetFileDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName );
|
||||
private FGetFileDetails _GetFileDetails;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetFileDetails", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetFileDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName );
|
||||
|
||||
#endregion
|
||||
internal async Task<FileDetailsResult_t?> GetFileDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName )
|
||||
internal CallResult<FileDetailsResult_t> GetFileDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszFileName )
|
||||
{
|
||||
var returnValue = _GetFileDetails( Self, pszFileName );
|
||||
return await FileDetailsResult_t.GetResultAsync( returnValue );
|
||||
return new CallResult<FileDetailsResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetLaunchCommandLine( IntPtr self, IntPtr pszCommandLine, int cubCommandLine );
|
||||
private FGetLaunchCommandLine _GetLaunchCommandLine;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_GetLaunchCommandLine", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetLaunchCommandLine( IntPtr self, IntPtr pszCommandLine, int cubCommandLine );
|
||||
|
||||
#endregion
|
||||
internal int GetLaunchCommandLine( out string pszCommandLine )
|
||||
@@ -427,10 +337,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsSubscribedFromFamilySharing", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsSubscribedFromFamilySharing( IntPtr self );
|
||||
private FBIsSubscribedFromFamilySharing _BIsSubscribedFromFamilySharing;
|
||||
private static extern bool _BIsSubscribedFromFamilySharing( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsSubscribedFromFamilySharing()
|
||||
|
||||
@@ -0,0 +1,414 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamClient : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamClient( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_CreateSteamPipe", CallingConvention = Platform.CC)]
|
||||
private static extern HSteamPipe _CreateSteamPipe( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal HSteamPipe CreateSteamPipe()
|
||||
{
|
||||
var returnValue = _CreateSteamPipe( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_BReleaseSteamPipe", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BReleaseSteamPipe( IntPtr self, HSteamPipe hSteamPipe );
|
||||
|
||||
#endregion
|
||||
internal bool BReleaseSteamPipe( HSteamPipe hSteamPipe )
|
||||
{
|
||||
var returnValue = _BReleaseSteamPipe( Self, hSteamPipe );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_ConnectToGlobalUser", CallingConvention = Platform.CC)]
|
||||
private static extern HSteamUser _ConnectToGlobalUser( IntPtr self, HSteamPipe hSteamPipe );
|
||||
|
||||
#endregion
|
||||
internal HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe )
|
||||
{
|
||||
var returnValue = _ConnectToGlobalUser( Self, hSteamPipe );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_CreateLocalUser", CallingConvention = Platform.CC)]
|
||||
private static extern HSteamUser _CreateLocalUser( IntPtr self, ref HSteamPipe phSteamPipe, AccountType eAccountType );
|
||||
|
||||
#endregion
|
||||
internal HSteamUser CreateLocalUser( ref HSteamPipe phSteamPipe, AccountType eAccountType )
|
||||
{
|
||||
var returnValue = _CreateLocalUser( Self, ref phSteamPipe, eAccountType );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_ReleaseUser", CallingConvention = Platform.CC)]
|
||||
private static extern void _ReleaseUser( IntPtr self, HSteamPipe hSteamPipe, HSteamUser hUser );
|
||||
|
||||
#endregion
|
||||
internal void ReleaseUser( HSteamPipe hSteamPipe, HSteamUser hUser )
|
||||
{
|
||||
_ReleaseUser( Self, hSteamPipe, hUser );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUser", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamUser( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamUser( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamUser( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServer", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamGameServer( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamGameServer( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamGameServer( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_SetLocalIPBinding", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetLocalIPBinding( IntPtr self, ref SteamIPAddress unIP, ushort usPort );
|
||||
|
||||
#endregion
|
||||
internal void SetLocalIPBinding( ref SteamIPAddress unIP, ushort usPort )
|
||||
{
|
||||
_SetLocalIPBinding( Self, ref unIP, usPort );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamFriends", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamFriends( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamFriends( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamFriends( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUtils", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamUtils( IntPtr self, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamUtils( HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamUtils( Self, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmaking", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamMatchmaking( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamMatchmaking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamMatchmaking( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMatchmakingServers", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamMatchmakingServers( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamMatchmakingServers( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamMatchmakingServers( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGenericInterface", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamGenericInterface( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamGenericInterface( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamGenericInterface( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUserStats", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamUserStats( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamUserStats( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamUserStats( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameServerStats", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamGameServerStats( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamGameServerStats( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamGameServerStats( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamApps", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamApps( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamApps( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamApps( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamNetworking", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamNetworking( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamNetworking( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamNetworking( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemoteStorage", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamRemoteStorage( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamRemoteStorage( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamRemoteStorage( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamScreenshots", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamScreenshots( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamScreenshots( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamScreenshots( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamGameSearch", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamGameSearch( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamGameSearch( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamGameSearch( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetIPCCallCount", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetIPCCallCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetIPCCallCount()
|
||||
{
|
||||
var returnValue = _GetIPCCallCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_SetWarningMessageHook", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetWarningMessageHook( IntPtr self, IntPtr pFunction );
|
||||
|
||||
#endregion
|
||||
internal void SetWarningMessageHook( IntPtr pFunction )
|
||||
{
|
||||
_SetWarningMessageHook( Self, pFunction );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_BShutdownIfAllPipesClosed", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BShutdownIfAllPipesClosed( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BShutdownIfAllPipesClosed()
|
||||
{
|
||||
var returnValue = _BShutdownIfAllPipesClosed( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTTP", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamHTTP( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamHTTP( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamHTTP( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamController", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamController( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamController( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamController( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamUGC", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamUGC( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamUGC( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamUGC( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamAppList", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamAppList( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamAppList( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamAppList( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusic", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamMusic( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamMusic( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamMusic( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamMusicRemote", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamMusicRemote( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamMusicRemote( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamMusicRemote( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamHTMLSurface", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamHTMLSurface( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamHTMLSurface( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamHTMLSurface( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamInventory", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamInventory( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamInventory( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamInventory( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamVideo", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamVideo( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamVideo( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamVideo( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamParentalSettings", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamParentalSettings( IntPtr self, HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamParentalSettings( HSteamUser hSteamuser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamParentalSettings( Self, hSteamuser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamInput", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamInput( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamInput( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamInput( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamParties", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamParties( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamParties( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamParties( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamClient_GetISteamRemotePlay", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetISteamRemotePlay( IntPtr self, HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion );
|
||||
|
||||
#endregion
|
||||
internal IntPtr GetISteamRemotePlay( HSteamUser hSteamUser, HSteamPipe hSteamPipe, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersion )
|
||||
{
|
||||
var returnValue = _GetISteamRemotePlay( Self, hSteamUser, hSteamPipe, pchVersion );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,392 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamController : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamController( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamController_v007", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamController_v007();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamController_v007();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_Init", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _Init( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool Init()
|
||||
{
|
||||
var returnValue = _Init( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_Shutdown", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _Shutdown( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool Shutdown()
|
||||
{
|
||||
var returnValue = _Shutdown( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_RunFrame", CallingConvention = Platform.CC)]
|
||||
private static extern void _RunFrame( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RunFrame()
|
||||
{
|
||||
_RunFrame( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetConnectedControllers", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetConnectedControllers( IntPtr self, [In,Out] ControllerHandle_t[] handlesOut );
|
||||
|
||||
#endregion
|
||||
internal int GetConnectedControllers( [In,Out] ControllerHandle_t[] handlesOut )
|
||||
{
|
||||
var returnValue = _GetConnectedControllers( Self, handlesOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActionSetHandle", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerActionSetHandle_t _GetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
|
||||
|
||||
#endregion
|
||||
internal ControllerActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName )
|
||||
{
|
||||
var returnValue = _GetActionSetHandle( Self, pszActionSetName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ActivateActionSet", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateActionSet( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle );
|
||||
|
||||
#endregion
|
||||
internal void ActivateActionSet( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle )
|
||||
{
|
||||
_ActivateActionSet( Self, controllerHandle, actionSetHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetCurrentActionSet", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerActionSetHandle_t _GetCurrentActionSet( IntPtr self, ControllerHandle_t controllerHandle );
|
||||
|
||||
#endregion
|
||||
internal ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle )
|
||||
{
|
||||
var returnValue = _GetCurrentActionSet( Self, controllerHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ActivateActionSetLayer", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateActionSetLayer( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle );
|
||||
|
||||
#endregion
|
||||
internal void ActivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle )
|
||||
{
|
||||
_ActivateActionSetLayer( Self, controllerHandle, actionSetLayerHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_DeactivateActionSetLayer", CallingConvention = Platform.CC)]
|
||||
private static extern void _DeactivateActionSetLayer( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle );
|
||||
|
||||
#endregion
|
||||
internal void DeactivateActionSetLayer( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetLayerHandle )
|
||||
{
|
||||
_DeactivateActionSetLayer( Self, controllerHandle, actionSetLayerHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_DeactivateAllActionSetLayers", CallingConvention = Platform.CC)]
|
||||
private static extern void _DeactivateAllActionSetLayers( IntPtr self, ControllerHandle_t controllerHandle );
|
||||
|
||||
#endregion
|
||||
internal void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle )
|
||||
{
|
||||
_DeactivateAllActionSetLayers( Self, controllerHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActiveActionSetLayers", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetActiveActionSetLayers( IntPtr self, ControllerHandle_t controllerHandle, [In,Out] ControllerActionSetHandle_t[] handlesOut );
|
||||
|
||||
#endregion
|
||||
internal int GetActiveActionSetLayers( ControllerHandle_t controllerHandle, [In,Out] ControllerActionSetHandle_t[] handlesOut )
|
||||
{
|
||||
var returnValue = _GetActiveActionSetLayers( Self, controllerHandle, handlesOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionHandle", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerDigitalActionHandle_t _GetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
|
||||
#endregion
|
||||
internal ControllerDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
|
||||
{
|
||||
var returnValue = _GetDigitalActionHandle( Self, pszActionName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionData", CallingConvention = Platform.CC)]
|
||||
private static extern DigitalState _GetDigitalActionData( IntPtr self, ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle );
|
||||
|
||||
#endregion
|
||||
internal DigitalState GetDigitalActionData( ControllerHandle_t controllerHandle, ControllerDigitalActionHandle_t digitalActionHandle )
|
||||
{
|
||||
var returnValue = _GetDigitalActionData( Self, controllerHandle, digitalActionHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetDigitalActionOrigins", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetDigitalActionOrigins( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, ref ControllerActionOrigin originsOut );
|
||||
|
||||
#endregion
|
||||
internal int GetDigitalActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerDigitalActionHandle_t digitalActionHandle, ref ControllerActionOrigin originsOut )
|
||||
{
|
||||
var returnValue = _GetDigitalActionOrigins( Self, controllerHandle, actionSetHandle, digitalActionHandle, ref originsOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionHandle", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerAnalogActionHandle_t _GetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
|
||||
#endregion
|
||||
internal ControllerAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
|
||||
{
|
||||
var returnValue = _GetAnalogActionHandle( Self, pszActionName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionData", CallingConvention = Platform.CC)]
|
||||
private static extern AnalogState _GetAnalogActionData( IntPtr self, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle );
|
||||
|
||||
#endregion
|
||||
internal AnalogState GetAnalogActionData( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t analogActionHandle )
|
||||
{
|
||||
var returnValue = _GetAnalogActionData( Self, controllerHandle, analogActionHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetAnalogActionOrigins", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAnalogActionOrigins( IntPtr self, ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, ref ControllerActionOrigin originsOut );
|
||||
|
||||
#endregion
|
||||
internal int GetAnalogActionOrigins( ControllerHandle_t controllerHandle, ControllerActionSetHandle_t actionSetHandle, ControllerAnalogActionHandle_t analogActionHandle, ref ControllerActionOrigin originsOut )
|
||||
{
|
||||
var returnValue = _GetAnalogActionOrigins( Self, controllerHandle, actionSetHandle, analogActionHandle, ref originsOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGlyphForActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetGlyphForActionOrigin( IntPtr self, ControllerActionOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetGlyphForActionOrigin( ControllerActionOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetGlyphForActionOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetStringForActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetStringForActionOrigin( IntPtr self, ControllerActionOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetStringForActionOrigin( ControllerActionOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetStringForActionOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_StopAnalogActionMomentum", CallingConvention = Platform.CC)]
|
||||
private static extern void _StopAnalogActionMomentum( IntPtr self, ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction );
|
||||
|
||||
#endregion
|
||||
internal void StopAnalogActionMomentum( ControllerHandle_t controllerHandle, ControllerAnalogActionHandle_t eAction )
|
||||
{
|
||||
_StopAnalogActionMomentum( Self, controllerHandle, eAction );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetMotionData", CallingConvention = Platform.CC)]
|
||||
private static extern MotionState _GetMotionData( IntPtr self, ControllerHandle_t controllerHandle );
|
||||
|
||||
#endregion
|
||||
internal MotionState GetMotionData( ControllerHandle_t controllerHandle )
|
||||
{
|
||||
var returnValue = _GetMotionData( Self, controllerHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerHapticPulse", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerHapticPulse( IntPtr self, ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
|
||||
|
||||
#endregion
|
||||
internal void TriggerHapticPulse( ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec )
|
||||
{
|
||||
_TriggerHapticPulse( Self, controllerHandle, eTargetPad, usDurationMicroSec );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerRepeatedHapticPulse", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerRepeatedHapticPulse( IntPtr self, ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
|
||||
|
||||
#endregion
|
||||
internal void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags )
|
||||
{
|
||||
_TriggerRepeatedHapticPulse( Self, controllerHandle, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TriggerVibration", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerVibration( IntPtr self, ControllerHandle_t controllerHandle, ushort usLeftSpeed, ushort usRightSpeed );
|
||||
|
||||
#endregion
|
||||
internal void TriggerVibration( ControllerHandle_t controllerHandle, ushort usLeftSpeed, ushort usRightSpeed )
|
||||
{
|
||||
_TriggerVibration( Self, controllerHandle, usLeftSpeed, usRightSpeed );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_SetLEDColor", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetLEDColor( IntPtr self, ControllerHandle_t controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags );
|
||||
|
||||
#endregion
|
||||
internal void SetLEDColor( ControllerHandle_t controllerHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags )
|
||||
{
|
||||
_SetLEDColor( Self, controllerHandle, nColorR, nColorG, nColorB, nFlags );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_ShowBindingPanel", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ShowBindingPanel( IntPtr self, ControllerHandle_t controllerHandle );
|
||||
|
||||
#endregion
|
||||
internal bool ShowBindingPanel( ControllerHandle_t controllerHandle )
|
||||
{
|
||||
var returnValue = _ShowBindingPanel( Self, controllerHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetInputTypeForHandle", CallingConvention = Platform.CC)]
|
||||
private static extern InputType _GetInputTypeForHandle( IntPtr self, ControllerHandle_t controllerHandle );
|
||||
|
||||
#endregion
|
||||
internal InputType GetInputTypeForHandle( ControllerHandle_t controllerHandle )
|
||||
{
|
||||
var returnValue = _GetInputTypeForHandle( Self, controllerHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetControllerForGamepadIndex", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerHandle_t _GetControllerForGamepadIndex( IntPtr self, int nIndex );
|
||||
|
||||
#endregion
|
||||
internal ControllerHandle_t GetControllerForGamepadIndex( int nIndex )
|
||||
{
|
||||
var returnValue = _GetControllerForGamepadIndex( Self, nIndex );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGamepadIndexForController", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetGamepadIndexForController( IntPtr self, ControllerHandle_t ulControllerHandle );
|
||||
|
||||
#endregion
|
||||
internal int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle )
|
||||
{
|
||||
var returnValue = _GetGamepadIndexForController( Self, ulControllerHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetStringForXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetStringForXboxOrigin( XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetStringForXboxOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetGlyphForXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetGlyphForXboxOrigin( Self, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetActionOriginFromXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerActionOrigin _GetActionOriginFromXboxOrigin( IntPtr self, ControllerHandle_t controllerHandle, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal ControllerActionOrigin GetActionOriginFromXboxOrigin( ControllerHandle_t controllerHandle, XboxOrigin eOrigin )
|
||||
{
|
||||
var returnValue = _GetActionOriginFromXboxOrigin( Self, controllerHandle, eOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_TranslateActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern ControllerActionOrigin _TranslateActionOrigin( IntPtr self, InputType eDestinationInputType, ControllerActionOrigin eSourceOrigin );
|
||||
|
||||
#endregion
|
||||
internal ControllerActionOrigin TranslateActionOrigin( InputType eDestinationInputType, ControllerActionOrigin eSourceOrigin )
|
||||
{
|
||||
var returnValue = _TranslateActionOrigin( Self, eDestinationInputType, eSourceOrigin );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamController_GetControllerBindingRevision", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetControllerBindingRevision( IntPtr self, ControllerHandle_t controllerHandle, ref int pMajor, ref int pMinor );
|
||||
|
||||
#endregion
|
||||
internal bool GetControllerBindingRevision( ControllerHandle_t controllerHandle, ref int pMajor, ref int pMinor )
|
||||
{
|
||||
var returnValue = _GetControllerBindingRevision( Self, controllerHandle, ref pMajor, ref pMinor );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,180 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamGameSearch : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamGameSearch( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameSearch_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameSearch_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamGameSearch_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_AddGameSearchParams", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _AddGameSearchParams( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToFind, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValuesToFind );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t AddGameSearchParams( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToFind, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValuesToFind )
|
||||
{
|
||||
var returnValue = _AddGameSearchParams( Self, pchKeyToFind, pchValuesToFind );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameWithLobby", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _SearchForGameWithLobby( IntPtr self, SteamId steamIDLobby, int nPlayerMin, int nPlayerMax );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t SearchForGameWithLobby( SteamId steamIDLobby, int nPlayerMin, int nPlayerMax )
|
||||
{
|
||||
var returnValue = _SearchForGameWithLobby( Self, steamIDLobby, nPlayerMin, nPlayerMax );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SearchForGameSolo", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _SearchForGameSolo( IntPtr self, int nPlayerMin, int nPlayerMax );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t SearchForGameSolo( int nPlayerMin, int nPlayerMax )
|
||||
{
|
||||
var returnValue = _SearchForGameSolo( Self, nPlayerMin, nPlayerMax );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_AcceptGame", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _AcceptGame( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t AcceptGame()
|
||||
{
|
||||
var returnValue = _AcceptGame( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_DeclineGame", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _DeclineGame( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t DeclineGame()
|
||||
{
|
||||
var returnValue = _DeclineGame( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_RetrieveConnectionDetails", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _RetrieveConnectionDetails( IntPtr self, SteamId steamIDHost, IntPtr pchConnectionDetails, int cubConnectionDetails );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t RetrieveConnectionDetails( SteamId steamIDHost, out string pchConnectionDetails )
|
||||
{
|
||||
IntPtr mempchConnectionDetails = Helpers.TakeMemory();
|
||||
var returnValue = _RetrieveConnectionDetails( Self, steamIDHost, mempchConnectionDetails, (1024 * 32) );
|
||||
pchConnectionDetails = Helpers.MemoryToString( mempchConnectionDetails );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_EndGameSearch", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _EndGameSearch( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t EndGameSearch()
|
||||
{
|
||||
var returnValue = _EndGameSearch( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SetGameHostParams", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _SetGameHostParams( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t SetGameHostParams( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
{
|
||||
var returnValue = _SetGameHostParams( Self, pchKey, pchValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SetConnectionDetails", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _SetConnectionDetails( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectionDetails, int cubConnectionDetails );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t SetConnectionDetails( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectionDetails, int cubConnectionDetails )
|
||||
{
|
||||
var returnValue = _SetConnectionDetails( Self, pchConnectionDetails, cubConnectionDetails );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_RequestPlayersForGame", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _RequestPlayersForGame( IntPtr self, int nPlayerMin, int nPlayerMax, int nMaxTeamSize );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t RequestPlayersForGame( int nPlayerMin, int nPlayerMax, int nMaxTeamSize )
|
||||
{
|
||||
var returnValue = _RequestPlayersForGame( Self, nPlayerMin, nPlayerMax, nMaxTeamSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_HostConfirmGameStart", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _HostConfirmGameStart( IntPtr self, ulong ullUniqueGameID );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t HostConfirmGameStart( ulong ullUniqueGameID )
|
||||
{
|
||||
var returnValue = _HostConfirmGameStart( Self, ullUniqueGameID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_CancelRequestPlayersForGame", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _CancelRequestPlayersForGame( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t CancelRequestPlayersForGame()
|
||||
{
|
||||
var returnValue = _CancelRequestPlayersForGame( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_SubmitPlayerResult", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _SubmitPlayerResult( IntPtr self, ulong ullUniqueGameID, SteamId steamIDPlayer, PlayerResult_t EPlayerResult );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t SubmitPlayerResult( ulong ullUniqueGameID, SteamId steamIDPlayer, PlayerResult_t EPlayerResult )
|
||||
{
|
||||
var returnValue = _SubmitPlayerResult( Self, ullUniqueGameID, steamIDPlayer, EPlayerResult );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameSearch_EndGame", CallingConvention = Platform.CC)]
|
||||
private static extern GameSearchErrorCode_t _EndGame( IntPtr self, ulong ullUniqueGameID );
|
||||
|
||||
#endregion
|
||||
internal GameSearchErrorCode_t EndGame( ulong ullUniqueGameID )
|
||||
{
|
||||
var returnValue = _EndGame( Self, ullUniqueGameID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,122 +9,20 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamGameServer : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamGameServer012";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamGameServer( bool IsGameServer )
|
||||
{
|
||||
_InitGameServer = Marshal.GetDelegateForFunctionPointer<FInitGameServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_SetProduct = Marshal.GetDelegateForFunctionPointer<FSetProduct>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_SetGameDescription = Marshal.GetDelegateForFunctionPointer<FSetGameDescription>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_SetModDir = Marshal.GetDelegateForFunctionPointer<FSetModDir>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_SetDedicatedServer = Marshal.GetDelegateForFunctionPointer<FSetDedicatedServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_LogOn = Marshal.GetDelegateForFunctionPointer<FLogOn>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_LogOnAnonymous = Marshal.GetDelegateForFunctionPointer<FLogOnAnonymous>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_LogOff = Marshal.GetDelegateForFunctionPointer<FLogOff>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_BLoggedOn = Marshal.GetDelegateForFunctionPointer<FBLoggedOn>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_BSecure = Marshal.GetDelegateForFunctionPointer<FBSecure>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetSteamID = Marshal.GetDelegateForFunctionPointer<FGetSteamID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_WasRestartRequested = Marshal.GetDelegateForFunctionPointer<FWasRestartRequested>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_SetMaxPlayerCount = Marshal.GetDelegateForFunctionPointer<FSetMaxPlayerCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_SetBotPlayerCount = Marshal.GetDelegateForFunctionPointer<FSetBotPlayerCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_SetServerName = Marshal.GetDelegateForFunctionPointer<FSetServerName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_SetMapName = Marshal.GetDelegateForFunctionPointer<FSetMapName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_SetPasswordProtected = Marshal.GetDelegateForFunctionPointer<FSetPasswordProtected>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_SetSpectatorPort = Marshal.GetDelegateForFunctionPointer<FSetSpectatorPort>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_SetSpectatorServerName = Marshal.GetDelegateForFunctionPointer<FSetSpectatorServerName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_ClearAllKeyValues = Marshal.GetDelegateForFunctionPointer<FClearAllKeyValues>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_SetKeyValue = Marshal.GetDelegateForFunctionPointer<FSetKeyValue>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_SetGameTags = Marshal.GetDelegateForFunctionPointer<FSetGameTags>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_SetGameData = Marshal.GetDelegateForFunctionPointer<FSetGameData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_SetRegion = Marshal.GetDelegateForFunctionPointer<FSetRegion>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_SendUserConnectAndAuthenticate = Marshal.GetDelegateForFunctionPointer<FSendUserConnectAndAuthenticate>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_CreateUnauthenticatedUserConnection = Marshal.GetDelegateForFunctionPointer<FCreateUnauthenticatedUserConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_SendUserDisconnect = Marshal.GetDelegateForFunctionPointer<FSendUserDisconnect>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_BUpdateUserData = Marshal.GetDelegateForFunctionPointer<FBUpdateUserData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_GetAuthSessionTicket = Marshal.GetDelegateForFunctionPointer<FGetAuthSessionTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_BeginAuthSession = Marshal.GetDelegateForFunctionPointer<FBeginAuthSession>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
_EndAuthSession = Marshal.GetDelegateForFunctionPointer<FEndAuthSession>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
|
||||
_CancelAuthTicket = Marshal.GetDelegateForFunctionPointer<FCancelAuthTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
|
||||
_UserHasLicenseForApp = Marshal.GetDelegateForFunctionPointer<FUserHasLicenseForApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
|
||||
_RequestUserGroupStatus = Marshal.GetDelegateForFunctionPointer<FRequestUserGroupStatus>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) );
|
||||
_GetGameplayStats = Marshal.GetDelegateForFunctionPointer<FGetGameplayStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) );
|
||||
_GetServerReputation = Marshal.GetDelegateForFunctionPointer<FGetServerReputation>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) );
|
||||
_GetPublicIP = Marshal.GetDelegateForFunctionPointer<FGetPublicIP>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) );
|
||||
_HandleIncomingPacket = Marshal.GetDelegateForFunctionPointer<FHandleIncomingPacket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) );
|
||||
_GetNextOutgoingPacket = Marshal.GetDelegateForFunctionPointer<FGetNextOutgoingPacket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 304 ) ) );
|
||||
_EnableHeartbeats = Marshal.GetDelegateForFunctionPointer<FEnableHeartbeats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) );
|
||||
_SetHeartbeatInterval = Marshal.GetDelegateForFunctionPointer<FSetHeartbeatInterval>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) );
|
||||
_ForceHeartbeat = Marshal.GetDelegateForFunctionPointer<FForceHeartbeat>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) );
|
||||
_AssociateWithClan = Marshal.GetDelegateForFunctionPointer<FAssociateWithClan>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) );
|
||||
_ComputeNewPlayerCompatibility = Marshal.GetDelegateForFunctionPointer<FComputeNewPlayerCompatibility>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 344 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_InitGameServer = null;
|
||||
_SetProduct = null;
|
||||
_SetGameDescription = null;
|
||||
_SetModDir = null;
|
||||
_SetDedicatedServer = null;
|
||||
_LogOn = null;
|
||||
_LogOnAnonymous = null;
|
||||
_LogOff = null;
|
||||
_BLoggedOn = null;
|
||||
_BSecure = null;
|
||||
_GetSteamID = null;
|
||||
_WasRestartRequested = null;
|
||||
_SetMaxPlayerCount = null;
|
||||
_SetBotPlayerCount = null;
|
||||
_SetServerName = null;
|
||||
_SetMapName = null;
|
||||
_SetPasswordProtected = null;
|
||||
_SetSpectatorPort = null;
|
||||
_SetSpectatorServerName = null;
|
||||
_ClearAllKeyValues = null;
|
||||
_SetKeyValue = null;
|
||||
_SetGameTags = null;
|
||||
_SetGameData = null;
|
||||
_SetRegion = null;
|
||||
_SendUserConnectAndAuthenticate = null;
|
||||
_CreateUnauthenticatedUserConnection = null;
|
||||
_SendUserDisconnect = null;
|
||||
_BUpdateUserData = null;
|
||||
_GetAuthSessionTicket = null;
|
||||
_BeginAuthSession = null;
|
||||
_EndAuthSession = null;
|
||||
_CancelAuthTicket = null;
|
||||
_UserHasLicenseForApp = null;
|
||||
_RequestUserGroupStatus = null;
|
||||
_GetGameplayStats = null;
|
||||
_GetServerReputation = null;
|
||||
_GetPublicIP = null;
|
||||
_HandleIncomingPacket = null;
|
||||
_GetNextOutgoingPacket = null;
|
||||
_EnableHeartbeats = null;
|
||||
_SetHeartbeatInterval = null;
|
||||
_ForceHeartbeat = null;
|
||||
_AssociateWithClan = null;
|
||||
_ComputeNewPlayerCompatibility = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServer_v013", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServer_v013();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServer_v013();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FInitGameServer( IntPtr self, uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString );
|
||||
private FInitGameServer _InitGameServer;
|
||||
|
||||
#endregion
|
||||
internal bool InitGameServer( uint unIP, ushort usGamePort, ushort usQueryPort, uint unFlags, AppId nGameAppId, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString )
|
||||
{
|
||||
var returnValue = _InitGameServer( Self, unIP, usGamePort, usQueryPort, unFlags, nGameAppId, pchVersionString );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetProduct( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct );
|
||||
private FSetProduct _SetProduct;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetProduct", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetProduct( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct );
|
||||
|
||||
#endregion
|
||||
internal void SetProduct( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszProduct )
|
||||
@@ -133,9 +31,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription );
|
||||
private FSetGameDescription _SetGameDescription;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameDescription", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetGameDescription( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription );
|
||||
|
||||
#endregion
|
||||
internal void SetGameDescription( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszGameDescription )
|
||||
@@ -144,9 +41,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir );
|
||||
private FSetModDir _SetModDir;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetModDir", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetModDir( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir );
|
||||
|
||||
#endregion
|
||||
internal void SetModDir( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszModDir )
|
||||
@@ -155,9 +51,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated );
|
||||
private FSetDedicatedServer _SetDedicatedServer;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetDedicatedServer", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetDedicatedServer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bDedicated );
|
||||
|
||||
#endregion
|
||||
internal void SetDedicatedServer( [MarshalAs( UnmanagedType.U1 )] bool bDedicated )
|
||||
@@ -166,9 +61,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FLogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken );
|
||||
private FLogOn _LogOn;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOn", CallingConvention = Platform.CC)]
|
||||
private static extern void _LogOn( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken );
|
||||
|
||||
#endregion
|
||||
internal void LogOn( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszToken )
|
||||
@@ -177,9 +71,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FLogOnAnonymous( IntPtr self );
|
||||
private FLogOnAnonymous _LogOnAnonymous;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOnAnonymous", CallingConvention = Platform.CC)]
|
||||
private static extern void _LogOnAnonymous( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void LogOnAnonymous()
|
||||
@@ -188,9 +81,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FLogOff( IntPtr self );
|
||||
private FLogOff _LogOff;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_LogOff", CallingConvention = Platform.CC)]
|
||||
private static extern void _LogOff( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void LogOff()
|
||||
@@ -199,10 +91,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BLoggedOn", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBLoggedOn( IntPtr self );
|
||||
private FBLoggedOn _BLoggedOn;
|
||||
private static extern bool _BLoggedOn( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BLoggedOn()
|
||||
@@ -212,10 +103,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BSecure", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBSecure( IntPtr self );
|
||||
private FBSecure _BSecure;
|
||||
private static extern bool _BSecure( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BSecure()
|
||||
@@ -225,32 +115,20 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetSteamID( IntPtr self, ref SteamId retVal );
|
||||
#else
|
||||
private delegate SteamId FGetSteamID( IntPtr self );
|
||||
#endif
|
||||
private FGetSteamID _GetSteamID;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetSteamID", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetSteamID( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetSteamID()
|
||||
{
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetSteamID( Self, ref retVal );
|
||||
return retVal;
|
||||
#else
|
||||
var returnValue = _GetSteamID( Self );
|
||||
return returnValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_WasRestartRequested", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FWasRestartRequested( IntPtr self );
|
||||
private FWasRestartRequested _WasRestartRequested;
|
||||
private static extern bool _WasRestartRequested( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool WasRestartRequested()
|
||||
@@ -260,9 +138,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetMaxPlayerCount( IntPtr self, int cPlayersMax );
|
||||
private FSetMaxPlayerCount _SetMaxPlayerCount;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMaxPlayerCount", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetMaxPlayerCount( IntPtr self, int cPlayersMax );
|
||||
|
||||
#endregion
|
||||
internal void SetMaxPlayerCount( int cPlayersMax )
|
||||
@@ -271,9 +148,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetBotPlayerCount( IntPtr self, int cBotplayers );
|
||||
private FSetBotPlayerCount _SetBotPlayerCount;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetBotPlayerCount", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetBotPlayerCount( IntPtr self, int cBotplayers );
|
||||
|
||||
#endregion
|
||||
internal void SetBotPlayerCount( int cBotplayers )
|
||||
@@ -282,9 +158,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName );
|
||||
private FSetServerName _SetServerName;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetServerName", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName );
|
||||
|
||||
#endregion
|
||||
internal void SetServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszServerName )
|
||||
@@ -293,9 +168,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName );
|
||||
private FSetMapName _SetMapName;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetMapName", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetMapName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName );
|
||||
|
||||
#endregion
|
||||
internal void SetMapName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszMapName )
|
||||
@@ -304,9 +178,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected );
|
||||
private FSetPasswordProtected _SetPasswordProtected;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetPasswordProtected", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetPasswordProtected( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected );
|
||||
|
||||
#endregion
|
||||
internal void SetPasswordProtected( [MarshalAs( UnmanagedType.U1 )] bool bPasswordProtected )
|
||||
@@ -315,9 +188,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetSpectatorPort( IntPtr self, ushort unSpectatorPort );
|
||||
private FSetSpectatorPort _SetSpectatorPort;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorPort", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetSpectatorPort( IntPtr self, ushort unSpectatorPort );
|
||||
|
||||
#endregion
|
||||
internal void SetSpectatorPort( ushort unSpectatorPort )
|
||||
@@ -326,9 +198,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName );
|
||||
private FSetSpectatorServerName _SetSpectatorServerName;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetSpectatorServerName", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetSpectatorServerName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName );
|
||||
|
||||
#endregion
|
||||
internal void SetSpectatorServerName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszSpectatorServerName )
|
||||
@@ -337,9 +208,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FClearAllKeyValues( IntPtr self );
|
||||
private FClearAllKeyValues _ClearAllKeyValues;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ClearAllKeyValues", CallingConvention = Platform.CC)]
|
||||
private static extern void _ClearAllKeyValues( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void ClearAllKeyValues()
|
||||
@@ -348,9 +218,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetKeyValue( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue );
|
||||
private FSetKeyValue _SetKeyValue;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetKeyValue", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetKeyValue( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue );
|
||||
|
||||
#endregion
|
||||
internal void SetKeyValue( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pValue )
|
||||
@@ -359,9 +228,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags );
|
||||
private FSetGameTags _SetGameTags;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameTags", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetGameTags( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags );
|
||||
|
||||
#endregion
|
||||
internal void SetGameTags( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameTags )
|
||||
@@ -370,9 +238,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData );
|
||||
private FSetGameData _SetGameData;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetGameData", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData );
|
||||
|
||||
#endregion
|
||||
internal void SetGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchGameData )
|
||||
@@ -381,9 +248,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion );
|
||||
private FSetRegion _SetRegion;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetRegion", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion );
|
||||
|
||||
#endregion
|
||||
internal void SetRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszRegion )
|
||||
@@ -392,10 +258,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserConnectAndAuthenticate", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSendUserConnectAndAuthenticate( IntPtr self, uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser );
|
||||
private FSendUserConnectAndAuthenticate _SendUserConnectAndAuthenticate;
|
||||
private static extern bool _SendUserConnectAndAuthenticate( IntPtr self, uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser );
|
||||
|
||||
#endregion
|
||||
internal bool SendUserConnectAndAuthenticate( uint unIPClient, IntPtr pvAuthBlob, uint cubAuthBlobSize, ref SteamId pSteamIDUser )
|
||||
@@ -405,31 +270,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FCreateUnauthenticatedUserConnection( IntPtr self, ref SteamId retVal );
|
||||
#else
|
||||
private delegate SteamId FCreateUnauthenticatedUserConnection( IntPtr self );
|
||||
#endif
|
||||
private FCreateUnauthenticatedUserConnection _CreateUnauthenticatedUserConnection;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CreateUnauthenticatedUserConnection", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _CreateUnauthenticatedUserConnection( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamId CreateUnauthenticatedUserConnection()
|
||||
{
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_CreateUnauthenticatedUserConnection( Self, ref retVal );
|
||||
return retVal;
|
||||
#else
|
||||
var returnValue = _CreateUnauthenticatedUserConnection( Self );
|
||||
return returnValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSendUserDisconnect( IntPtr self, SteamId steamIDUser );
|
||||
private FSendUserDisconnect _SendUserDisconnect;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SendUserDisconnect", CallingConvention = Platform.CC)]
|
||||
private static extern void _SendUserDisconnect( IntPtr self, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal void SendUserDisconnect( SteamId steamIDUser )
|
||||
@@ -438,10 +291,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BUpdateUserData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBUpdateUserData( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore );
|
||||
private FBUpdateUserData _BUpdateUserData;
|
||||
private static extern bool _BUpdateUserData( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore );
|
||||
|
||||
#endregion
|
||||
internal bool BUpdateUserData( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPlayerName, uint uScore )
|
||||
@@ -451,9 +303,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
|
||||
private FGetAuthSessionTicket _GetAuthSessionTicket;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetAuthSessionTicket", CallingConvention = Platform.CC)]
|
||||
private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
|
||||
|
||||
#endregion
|
||||
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
|
||||
@@ -463,9 +314,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate BeginAuthResult FBeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
|
||||
private FBeginAuthSession _BeginAuthSession;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_BeginAuthSession", CallingConvention = Platform.CC)]
|
||||
private static extern BeginAuthResult _BeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID )
|
||||
@@ -475,9 +325,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FEndAuthSession( IntPtr self, SteamId steamID );
|
||||
private FEndAuthSession _EndAuthSession;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_EndAuthSession", CallingConvention = Platform.CC)]
|
||||
private static extern void _EndAuthSession( IntPtr self, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal void EndAuthSession( SteamId steamID )
|
||||
@@ -486,9 +335,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FCancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
|
||||
private FCancelAuthTicket _CancelAuthTicket;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_CancelAuthTicket", CallingConvention = Platform.CC)]
|
||||
private static extern void _CancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
|
||||
|
||||
#endregion
|
||||
internal void CancelAuthTicket( HAuthTicket hAuthTicket )
|
||||
@@ -497,9 +345,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate UserHasLicenseForAppResult FUserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
|
||||
private FUserHasLicenseForApp _UserHasLicenseForApp;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_UserHasLicenseForApp", CallingConvention = Platform.CC)]
|
||||
private static extern UserHasLicenseForAppResult _UserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
|
||||
|
||||
#endregion
|
||||
internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID )
|
||||
@@ -509,10 +356,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_RequestUserGroupStatus", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FRequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup );
|
||||
private FRequestUserGroupStatus _RequestUserGroupStatus;
|
||||
private static extern bool _RequestUserGroupStatus( IntPtr self, SteamId steamIDUser, SteamId steamIDGroup );
|
||||
|
||||
#endregion
|
||||
internal bool RequestUserGroupStatus( SteamId steamIDUser, SteamId steamIDGroup )
|
||||
@@ -522,9 +368,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FGetGameplayStats( IntPtr self );
|
||||
private FGetGameplayStats _GetGameplayStats;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetGameplayStats", CallingConvention = Platform.CC)]
|
||||
private static extern void _GetGameplayStats( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void GetGameplayStats()
|
||||
@@ -533,34 +378,31 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FGetServerReputation( IntPtr self );
|
||||
private FGetServerReputation _GetServerReputation;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetServerReputation", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetServerReputation( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal async Task<GSReputation_t?> GetServerReputation()
|
||||
internal CallResult<GSReputation_t> GetServerReputation()
|
||||
{
|
||||
var returnValue = _GetServerReputation( Self );
|
||||
return await GSReputation_t.GetResultAsync( returnValue );
|
||||
return new CallResult<GSReputation_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetPublicIP( IntPtr self );
|
||||
private FGetPublicIP _GetPublicIP;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetPublicIP", CallingConvention = Platform.CC)]
|
||||
private static extern SteamIPAddress _GetPublicIP( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetPublicIP()
|
||||
internal SteamIPAddress GetPublicIP()
|
||||
{
|
||||
var returnValue = _GetPublicIP( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_HandleIncomingPacket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FHandleIncomingPacket( IntPtr self, IntPtr pData, int cbData, uint srcIP, ushort srcPort );
|
||||
private FHandleIncomingPacket _HandleIncomingPacket;
|
||||
private static extern bool _HandleIncomingPacket( IntPtr self, IntPtr pData, int cbData, uint srcIP, ushort srcPort );
|
||||
|
||||
#endregion
|
||||
internal bool HandleIncomingPacket( IntPtr pData, int cbData, uint srcIP, ushort srcPort )
|
||||
@@ -570,9 +412,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort );
|
||||
private FGetNextOutgoingPacket _GetNextOutgoingPacket;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_GetNextOutgoingPacket", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetNextOutgoingPacket( IntPtr self, IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort );
|
||||
|
||||
#endregion
|
||||
internal int GetNextOutgoingPacket( IntPtr pOut, int cbMaxOut, ref uint pNetAdr, ref ushort pPort )
|
||||
@@ -582,9 +423,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FEnableHeartbeats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive );
|
||||
private FEnableHeartbeats _EnableHeartbeats;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_EnableHeartbeats", CallingConvention = Platform.CC)]
|
||||
private static extern void _EnableHeartbeats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bActive );
|
||||
|
||||
#endregion
|
||||
internal void EnableHeartbeats( [MarshalAs( UnmanagedType.U1 )] bool bActive )
|
||||
@@ -593,9 +433,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetHeartbeatInterval( IntPtr self, int iHeartbeatInterval );
|
||||
private FSetHeartbeatInterval _SetHeartbeatInterval;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_SetHeartbeatInterval", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetHeartbeatInterval( IntPtr self, int iHeartbeatInterval );
|
||||
|
||||
#endregion
|
||||
internal void SetHeartbeatInterval( int iHeartbeatInterval )
|
||||
@@ -604,9 +443,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FForceHeartbeat( IntPtr self );
|
||||
private FForceHeartbeat _ForceHeartbeat;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ForceHeartbeat", CallingConvention = Platform.CC)]
|
||||
private static extern void _ForceHeartbeat( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void ForceHeartbeat()
|
||||
@@ -615,27 +453,25 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FAssociateWithClan( IntPtr self, SteamId steamIDClan );
|
||||
private FAssociateWithClan _AssociateWithClan;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_AssociateWithClan", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _AssociateWithClan( IntPtr self, SteamId steamIDClan );
|
||||
|
||||
#endregion
|
||||
internal async Task<AssociateWithClanResult_t?> AssociateWithClan( SteamId steamIDClan )
|
||||
internal CallResult<AssociateWithClanResult_t> AssociateWithClan( SteamId steamIDClan )
|
||||
{
|
||||
var returnValue = _AssociateWithClan( Self, steamIDClan );
|
||||
return await AssociateWithClanResult_t.GetResultAsync( returnValue );
|
||||
return new CallResult<AssociateWithClanResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer );
|
||||
private FComputeNewPlayerCompatibility _ComputeNewPlayerCompatibility;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServer_ComputeNewPlayerCompatibility", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _ComputeNewPlayerCompatibility( IntPtr self, SteamId steamIDNewPlayer );
|
||||
|
||||
#endregion
|
||||
internal async Task<ComputeNewPlayerCompatibilityResult_t?> ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer )
|
||||
internal CallResult<ComputeNewPlayerCompatibilityResult_t> ComputeNewPlayerCompatibility( SteamId steamIDNewPlayer )
|
||||
{
|
||||
var returnValue = _ComputeNewPlayerCompatibility( Self, steamIDNewPlayer );
|
||||
return await ComputeNewPlayerCompatibilityResult_t.GetResultAsync( returnValue );
|
||||
return new CallResult<ComputeNewPlayerCompatibilityResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,88 +9,56 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamGameServerStats : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamGameServerStats001";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamGameServerStats( bool IsGameServer )
|
||||
{
|
||||
_RequestUserStats = Marshal.GetDelegateForFunctionPointer<FRequestUserStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_GetUserAchievement = Marshal.GetDelegateForFunctionPointer<FGetUserAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_UpdateUserAvgRateStat = Marshal.GetDelegateForFunctionPointer<FUpdateUserAvgRateStat>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_SetUserAchievement = Marshal.GetDelegateForFunctionPointer<FSetUserAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_ClearUserAchievement = Marshal.GetDelegateForFunctionPointer<FClearUserAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_StoreUserStats = Marshal.GetDelegateForFunctionPointer<FStoreUserStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
|
||||
#if PLATFORM_WIN
|
||||
_GetUserStat1 = Marshal.GetDelegateForFunctionPointer<FGetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetUserStat2 = Marshal.GetDelegateForFunctionPointer<FGetUserStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_SetUserStat1 = Marshal.GetDelegateForFunctionPointer<FSetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_SetUserStat2 = Marshal.GetDelegateForFunctionPointer<FSetUserStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
#else
|
||||
_GetUserStat1 = Marshal.GetDelegateForFunctionPointer<FGetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetUserStat2 = Marshal.GetDelegateForFunctionPointer<FGetUserStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_SetUserStat1 = Marshal.GetDelegateForFunctionPointer<FSetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_SetUserStat2 = Marshal.GetDelegateForFunctionPointer<FSetUserStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
#endif
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_RequestUserStats = null;
|
||||
_GetUserStat1 = null;
|
||||
_GetUserStat2 = null;
|
||||
_GetUserAchievement = null;
|
||||
_SetUserStat1 = null;
|
||||
_SetUserStat2 = null;
|
||||
_UpdateUserAvgRateStat = null;
|
||||
_SetUserAchievement = null;
|
||||
_ClearUserAchievement = null;
|
||||
_StoreUserStats = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerStats_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerStats_v001();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerStats_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestUserStats( IntPtr self, SteamId steamIDUser );
|
||||
private FRequestUserStats _RequestUserStats;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_RequestUserStats", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal async Task<GSStatsReceived_t?> RequestUserStats( SteamId steamIDUser )
|
||||
internal CallResult<GSStatsReceived_t> RequestUserStats( SteamId steamIDUser )
|
||||
{
|
||||
var returnValue = _RequestUserStats( Self, steamIDUser );
|
||||
return await GSStatsReceived_t.GetResultAsync( returnValue );
|
||||
return new CallResult<GSStatsReceived_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
|
||||
private FGetUserStat1 _GetUserStat1;
|
||||
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
{
|
||||
var returnValue = _GetUserStat1( Self, steamIDUser, pchName, ref pData );
|
||||
var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserStatFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
|
||||
private FGetUserStat2 _GetUserStat2;
|
||||
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
{
|
||||
var returnValue = _GetUserStat2( Self, steamIDUser, pchName, ref pData );
|
||||
var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_GetUserAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
private FGetUserAchievement _GetUserAchievement;
|
||||
private static extern bool _GetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
@@ -100,36 +68,33 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
|
||||
private FSetUserStat1 _SetUserStat1;
|
||||
private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
|
||||
|
||||
#endregion
|
||||
internal bool SetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
|
||||
internal bool SetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
|
||||
{
|
||||
var returnValue = _SetUserStat1( Self, steamIDUser, pchName, nData );
|
||||
var returnValue = _SetUserStat( Self, steamIDUser, pchName, nData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserStatFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
|
||||
private FSetUserStat2 _SetUserStat2;
|
||||
private static extern bool _SetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
|
||||
|
||||
#endregion
|
||||
internal bool SetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
|
||||
internal bool SetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
|
||||
{
|
||||
var returnValue = _SetUserStat2( Self, steamIDUser, pchName, fData );
|
||||
var returnValue = _SetUserStat( Self, steamIDUser, pchName, fData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_UpdateUserAvgRateStat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FUpdateUserAvgRateStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
|
||||
private FUpdateUserAvgRateStat _UpdateUserAvgRateStat;
|
||||
private static extern bool _UpdateUserAvgRateStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateUserAvgRateStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength )
|
||||
@@ -139,10 +104,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_SetUserAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
private FSetUserAchievement _SetUserAchievement;
|
||||
private static extern bool _SetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
|
||||
#endregion
|
||||
internal bool SetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
@@ -152,10 +116,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_ClearUserAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
private FClearUserAchievement _ClearUserAchievement;
|
||||
private static extern bool _ClearUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
|
||||
#endregion
|
||||
internal bool ClearUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
@@ -165,15 +128,14 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FStoreUserStats( IntPtr self, SteamId steamIDUser );
|
||||
private FStoreUserStats _StoreUserStats;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamGameServerStats_StoreUserStats", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _StoreUserStats( IntPtr self, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal async Task<GSStatsStored_t?> StoreUserStats( SteamId steamIDUser )
|
||||
internal CallResult<GSStatsStored_t> StoreUserStats( SteamId steamIDUser )
|
||||
{
|
||||
var returnValue = _StoreUserStats( Self, steamIDUser );
|
||||
return await GSStatsStored_t.GetResultAsync( returnValue );
|
||||
return new CallResult<GSStatsStored_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,399 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamHTMLSurface : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamHTMLSurface( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamHTMLSurface_v005", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamHTMLSurface_v005();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamHTMLSurface_v005();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Init", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _Init( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool Init()
|
||||
{
|
||||
var returnValue = _Init( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_Shutdown", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _Shutdown( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool Shutdown()
|
||||
{
|
||||
var returnValue = _Shutdown( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTMLSurface_CreateBrowser", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _CreateBrowser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserCSS );
|
||||
|
||||
#endregion
|
||||
internal CallResult<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 );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,325 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamHTTP : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamHTTP( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamHTTP_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamHTTP_v003();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamHTTP_v003();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerHTTP_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerHTTP_v003();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerHTTP_v003();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_CreateHTTPRequest", CallingConvention = Platform.CC)]
|
||||
private static extern HTTPRequestHandle _CreateHTTPRequest( IntPtr self, HTTPMethod eHTTPRequestMethod, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchAbsoluteURL );
|
||||
|
||||
#endregion
|
||||
internal HTTPRequestHandle CreateHTTPRequest( HTTPMethod eHTTPRequestMethod, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchAbsoluteURL )
|
||||
{
|
||||
var returnValue = _CreateHTTPRequest( Self, eHTTPRequestMethod, pchAbsoluteURL );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestContextValue", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestContextValue( IntPtr self, HTTPRequestHandle hRequest, ulong ulContextValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestContextValue( HTTPRequestHandle hRequest, ulong ulContextValue )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestContextValue( Self, hRequest, ulContextValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestNetworkActivityTimeout", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestNetworkActivityTimeout( IntPtr self, HTTPRequestHandle hRequest, uint unTimeoutSeconds );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hRequest, uint unTimeoutSeconds )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestNetworkActivityTimeout( Self, hRequest, unTimeoutSeconds );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestHeaderValue", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestHeaderValue( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderValue )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestHeaderValue( Self, hRequest, pchHeaderName, pchHeaderValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestGetOrPostParameter", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestGetOrPostParameter( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchParamValue )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestGetOrPostParameter( Self, hRequest, pchParamName, pchParamValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SendHTTPRequest", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SendHTTPRequest( IntPtr self, HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle );
|
||||
|
||||
#endregion
|
||||
internal bool SendHTTPRequest( HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle )
|
||||
{
|
||||
var returnValue = _SendHTTPRequest( Self, hRequest, ref pCallHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SendHTTPRequestAndStreamResponse", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SendHTTPRequestAndStreamResponse( IntPtr self, HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle );
|
||||
|
||||
#endregion
|
||||
internal bool SendHTTPRequestAndStreamResponse( HTTPRequestHandle hRequest, ref SteamAPICall_t pCallHandle )
|
||||
{
|
||||
var returnValue = _SendHTTPRequestAndStreamResponse( Self, hRequest, ref pCallHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_DeferHTTPRequest", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _DeferHTTPRequest( IntPtr self, HTTPRequestHandle hRequest );
|
||||
|
||||
#endregion
|
||||
internal bool DeferHTTPRequest( HTTPRequestHandle hRequest )
|
||||
{
|
||||
var returnValue = _DeferHTTPRequest( Self, hRequest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_PrioritizeHTTPRequest", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _PrioritizeHTTPRequest( IntPtr self, HTTPRequestHandle hRequest );
|
||||
|
||||
#endregion
|
||||
internal bool PrioritizeHTTPRequest( HTTPRequestHandle hRequest )
|
||||
{
|
||||
var returnValue = _PrioritizeHTTPRequest( Self, hRequest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseHeaderSize", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPResponseHeaderSize( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref uint unResponseHeaderSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref uint unResponseHeaderSize )
|
||||
{
|
||||
var returnValue = _GetHTTPResponseHeaderSize( Self, hRequest, pchHeaderName, ref unResponseHeaderSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseHeaderValue", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPResponseHeaderValue( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref byte pHeaderValueBuffer, uint unBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHeaderName, ref byte pHeaderValueBuffer, uint unBufferSize )
|
||||
{
|
||||
var returnValue = _GetHTTPResponseHeaderValue( Self, hRequest, pchHeaderName, ref pHeaderValueBuffer, unBufferSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseBodySize", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPResponseBodySize( IntPtr self, HTTPRequestHandle hRequest, ref uint unBodySize );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPResponseBodySize( HTTPRequestHandle hRequest, ref uint unBodySize )
|
||||
{
|
||||
var returnValue = _GetHTTPResponseBodySize( Self, hRequest, ref unBodySize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPResponseBodyData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPResponseBodyData( IntPtr self, HTTPRequestHandle hRequest, ref byte pBodyDataBuffer, uint unBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPResponseBodyData( HTTPRequestHandle hRequest, ref byte pBodyDataBuffer, uint unBufferSize )
|
||||
{
|
||||
var returnValue = _GetHTTPResponseBodyData( Self, hRequest, ref pBodyDataBuffer, unBufferSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPStreamingResponseBodyData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPStreamingResponseBodyData( IntPtr self, HTTPRequestHandle hRequest, uint cOffset, ref byte pBodyDataBuffer, uint unBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest, uint cOffset, ref byte pBodyDataBuffer, uint unBufferSize )
|
||||
{
|
||||
var returnValue = _GetHTTPStreamingResponseBodyData( Self, hRequest, cOffset, ref pBodyDataBuffer, unBufferSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_ReleaseHTTPRequest", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ReleaseHTTPRequest( IntPtr self, HTTPRequestHandle hRequest );
|
||||
|
||||
#endregion
|
||||
internal bool ReleaseHTTPRequest( HTTPRequestHandle hRequest )
|
||||
{
|
||||
var returnValue = _ReleaseHTTPRequest( Self, hRequest );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPDownloadProgressPct", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPDownloadProgressPct( IntPtr self, HTTPRequestHandle hRequest, ref float pflPercentOut );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest, ref float pflPercentOut )
|
||||
{
|
||||
var returnValue = _GetHTTPDownloadProgressPct( Self, hRequest, ref pflPercentOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestRawPostBody", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestRawPostBody( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchContentType, [In,Out] byte[] pubBody, uint unBodyLen );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchContentType, [In,Out] byte[] pubBody, uint unBodyLen )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestRawPostBody( Self, hRequest, pchContentType, pubBody, unBodyLen );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_CreateCookieContainer", CallingConvention = Platform.CC)]
|
||||
private static extern HTTPCookieContainerHandle _CreateCookieContainer( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllowResponsesToModify );
|
||||
|
||||
#endregion
|
||||
internal HTTPCookieContainerHandle CreateCookieContainer( [MarshalAs( UnmanagedType.U1 )] bool bAllowResponsesToModify )
|
||||
{
|
||||
var returnValue = _CreateCookieContainer( Self, bAllowResponsesToModify );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_ReleaseCookieContainer", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ReleaseCookieContainer( IntPtr self, HTTPCookieContainerHandle hCookieContainer );
|
||||
|
||||
#endregion
|
||||
internal bool ReleaseCookieContainer( HTTPCookieContainerHandle hCookieContainer )
|
||||
{
|
||||
var returnValue = _ReleaseCookieContainer( Self, hCookieContainer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetCookie", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetCookie( IntPtr self, HTTPCookieContainerHandle hCookieContainer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHost, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUrl, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCookie );
|
||||
|
||||
#endregion
|
||||
internal bool SetCookie( HTTPCookieContainerHandle hCookieContainer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchHost, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUrl, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchCookie )
|
||||
{
|
||||
var returnValue = _SetCookie( Self, hCookieContainer, pchHost, pchUrl, pchCookie );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestCookieContainer", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestCookieContainer( IntPtr self, HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestCookieContainer( HTTPRequestHandle hRequest, HTTPCookieContainerHandle hCookieContainer )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestCookieContainer( Self, hRequest, hCookieContainer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestUserAgentInfo", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestUserAgentInfo( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgentInfo );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchUserAgentInfo )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestUserAgentInfo( Self, hRequest, pchUserAgentInfo );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestRequiresVerifiedCertificate( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] bool bRequireVerifiedCertificate );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestRequiresVerifiedCertificate( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] bool bRequireVerifiedCertificate )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestRequiresVerifiedCertificate( Self, hRequest, bRequireVerifiedCertificate );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetHTTPRequestAbsoluteTimeoutMS( IntPtr self, HTTPRequestHandle hRequest, uint unMilliseconds );
|
||||
|
||||
#endregion
|
||||
internal bool SetHTTPRequestAbsoluteTimeoutMS( HTTPRequestHandle hRequest, uint unMilliseconds )
|
||||
{
|
||||
var returnValue = _SetHTTPRequestAbsoluteTimeoutMS( Self, hRequest, unMilliseconds );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamHTTP_GetHTTPRequestWasTimedOut", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetHTTPRequestWasTimedOut( IntPtr self, HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] ref bool pbWasTimedOut );
|
||||
|
||||
#endregion
|
||||
internal bool GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest, [MarshalAs( UnmanagedType.U1 )] ref bool pbWasTimedOut )
|
||||
{
|
||||
var returnValue = _GetHTTPRequestWasTimedOut( Self, hRequest, ref pbWasTimedOut );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,113 +9,44 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamInput : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamInput001";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamInput( bool IsGameServer )
|
||||
{
|
||||
_DoInit = Marshal.GetDelegateForFunctionPointer<FDoInit>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_DoShutdown = Marshal.GetDelegateForFunctionPointer<FDoShutdown>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_RunFrame = Marshal.GetDelegateForFunctionPointer<FRunFrame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetConnectedControllers = Marshal.GetDelegateForFunctionPointer<FGetConnectedControllers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_GetActionSetHandle = Marshal.GetDelegateForFunctionPointer<FGetActionSetHandle>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_ActivateActionSet = Marshal.GetDelegateForFunctionPointer<FActivateActionSet>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetCurrentActionSet = Marshal.GetDelegateForFunctionPointer<FGetCurrentActionSet>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_ActivateActionSetLayer = Marshal.GetDelegateForFunctionPointer<FActivateActionSetLayer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_DeactivateActionSetLayer = Marshal.GetDelegateForFunctionPointer<FDeactivateActionSetLayer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_DeactivateAllActionSetLayers = Marshal.GetDelegateForFunctionPointer<FDeactivateAllActionSetLayers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetActiveActionSetLayers = Marshal.GetDelegateForFunctionPointer<FGetActiveActionSetLayers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GetDigitalActionHandle = Marshal.GetDelegateForFunctionPointer<FGetDigitalActionHandle>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_GetDigitalActionData = Marshal.GetDelegateForFunctionPointer<FGetDigitalActionData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_GetDigitalActionOrigins = Marshal.GetDelegateForFunctionPointer<FGetDigitalActionOrigins>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_GetAnalogActionHandle = Marshal.GetDelegateForFunctionPointer<FGetAnalogActionHandle>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetAnalogActionData = Marshal.GetDelegateForFunctionPointer<FGetAnalogActionData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_GetAnalogActionOrigins = Marshal.GetDelegateForFunctionPointer<FGetAnalogActionOrigins>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetGlyphForActionOrigin = Marshal.GetDelegateForFunctionPointer<FGetGlyphForActionOrigin>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetStringForActionOrigin = Marshal.GetDelegateForFunctionPointer<FGetStringForActionOrigin>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_StopAnalogActionMomentum = Marshal.GetDelegateForFunctionPointer<FStopAnalogActionMomentum>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetMotionData = Marshal.GetDelegateForFunctionPointer<FGetMotionData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_TriggerVibration = Marshal.GetDelegateForFunctionPointer<FTriggerVibration>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_SetLEDColor = Marshal.GetDelegateForFunctionPointer<FSetLEDColor>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_TriggerHapticPulse = Marshal.GetDelegateForFunctionPointer<FTriggerHapticPulse>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_TriggerRepeatedHapticPulse = Marshal.GetDelegateForFunctionPointer<FTriggerRepeatedHapticPulse>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_ShowBindingPanel = Marshal.GetDelegateForFunctionPointer<FShowBindingPanel>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_GetInputTypeForHandle = Marshal.GetDelegateForFunctionPointer<FGetInputTypeForHandle>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_GetControllerForGamepadIndex = Marshal.GetDelegateForFunctionPointer<FGetControllerForGamepadIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_GetGamepadIndexForController = Marshal.GetDelegateForFunctionPointer<FGetGamepadIndexForController>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_GetStringForXboxOrigin = Marshal.GetDelegateForFunctionPointer<FGetStringForXboxOrigin>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
_GetGlyphForXboxOrigin = Marshal.GetDelegateForFunctionPointer<FGetGlyphForXboxOrigin>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
|
||||
_GetActionOriginFromXboxOrigin = Marshal.GetDelegateForFunctionPointer<FGetActionOriginFromXboxOrigin>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
|
||||
_TranslateActionOrigin = Marshal.GetDelegateForFunctionPointer<FTranslateActionOrigin>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_DoInit = null;
|
||||
_DoShutdown = null;
|
||||
_RunFrame = null;
|
||||
_GetConnectedControllers = null;
|
||||
_GetActionSetHandle = null;
|
||||
_ActivateActionSet = null;
|
||||
_GetCurrentActionSet = null;
|
||||
_ActivateActionSetLayer = null;
|
||||
_DeactivateActionSetLayer = null;
|
||||
_DeactivateAllActionSetLayers = null;
|
||||
_GetActiveActionSetLayers = null;
|
||||
_GetDigitalActionHandle = null;
|
||||
_GetDigitalActionData = null;
|
||||
_GetDigitalActionOrigins = null;
|
||||
_GetAnalogActionHandle = null;
|
||||
_GetAnalogActionData = null;
|
||||
_GetAnalogActionOrigins = null;
|
||||
_GetGlyphForActionOrigin = null;
|
||||
_GetStringForActionOrigin = null;
|
||||
_StopAnalogActionMomentum = null;
|
||||
_GetMotionData = null;
|
||||
_TriggerVibration = null;
|
||||
_SetLEDColor = null;
|
||||
_TriggerHapticPulse = null;
|
||||
_TriggerRepeatedHapticPulse = null;
|
||||
_ShowBindingPanel = null;
|
||||
_GetInputTypeForHandle = null;
|
||||
_GetControllerForGamepadIndex = null;
|
||||
_GetGamepadIndexForController = null;
|
||||
_GetStringForXboxOrigin = null;
|
||||
_GetGlyphForXboxOrigin = null;
|
||||
_GetActionOriginFromXboxOrigin = null;
|
||||
_TranslateActionOrigin = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamInput_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamInput_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamInput_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Init", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDoInit( IntPtr self );
|
||||
private FDoInit _DoInit;
|
||||
private static extern bool _Init( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool DoInit()
|
||||
internal bool Init()
|
||||
{
|
||||
var returnValue = _DoInit( Self );
|
||||
var returnValue = _Init( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_Shutdown", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDoShutdown( IntPtr self );
|
||||
private FDoShutdown _DoShutdown;
|
||||
private static extern bool _Shutdown( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool DoShutdown()
|
||||
internal bool Shutdown()
|
||||
{
|
||||
var returnValue = _DoShutdown( Self );
|
||||
var returnValue = _Shutdown( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRunFrame( IntPtr self );
|
||||
private FRunFrame _RunFrame;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_RunFrame", CallingConvention = Platform.CC)]
|
||||
private static extern void _RunFrame( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RunFrame()
|
||||
@@ -124,9 +55,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut );
|
||||
private FGetConnectedControllers _GetConnectedControllers;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetConnectedControllers", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetConnectedControllers( IntPtr self, [In,Out] InputHandle_t[] handlesOut );
|
||||
|
||||
#endregion
|
||||
internal int GetConnectedControllers( [In,Out] InputHandle_t[] handlesOut )
|
||||
@@ -136,9 +66,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputActionSetHandle_t FGetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
|
||||
private FGetActionSetHandle _GetActionSetHandle;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionSetHandle", CallingConvention = Platform.CC)]
|
||||
private static extern InputActionSetHandle_t _GetActionSetHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName );
|
||||
|
||||
#endregion
|
||||
internal InputActionSetHandle_t GetActionSetHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionSetName )
|
||||
@@ -148,9 +77,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
|
||||
private FActivateActionSet _ActivateActionSet;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSet", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateActionSet( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle );
|
||||
|
||||
#endregion
|
||||
internal void ActivateActionSet( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle )
|
||||
@@ -159,9 +87,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputActionSetHandle_t FGetCurrentActionSet( IntPtr self, InputHandle_t inputHandle );
|
||||
private FGetCurrentActionSet _GetCurrentActionSet;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetCurrentActionSet", CallingConvention = Platform.CC)]
|
||||
private static extern InputActionSetHandle_t _GetCurrentActionSet( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal InputActionSetHandle_t GetCurrentActionSet( InputHandle_t inputHandle )
|
||||
@@ -171,9 +98,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
|
||||
private FActivateActionSetLayer _ActivateActionSetLayer;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ActivateActionSetLayer", CallingConvention = Platform.CC)]
|
||||
private static extern void _ActivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
|
||||
|
||||
#endregion
|
||||
internal void ActivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
|
||||
@@ -182,9 +108,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FDeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
|
||||
private FDeactivateActionSetLayer _DeactivateActionSetLayer;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateActionSetLayer", CallingConvention = Platform.CC)]
|
||||
private static extern void _DeactivateActionSetLayer( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle );
|
||||
|
||||
#endregion
|
||||
internal void DeactivateActionSetLayer( InputHandle_t inputHandle, InputActionSetHandle_t actionSetLayerHandle )
|
||||
@@ -193,9 +118,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FDeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle );
|
||||
private FDeactivateAllActionSetLayers _DeactivateAllActionSetLayers;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_DeactivateAllActionSetLayers", CallingConvention = Platform.CC)]
|
||||
private static extern void _DeactivateAllActionSetLayers( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal void DeactivateAllActionSetLayers( InputHandle_t inputHandle )
|
||||
@@ -204,9 +128,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut );
|
||||
private FGetActiveActionSetLayers _GetActiveActionSetLayers;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActiveActionSetLayers", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetActiveActionSetLayers( IntPtr self, InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut );
|
||||
|
||||
#endregion
|
||||
internal int GetActiveActionSetLayers( InputHandle_t inputHandle, [In,Out] InputActionSetHandle_t[] handlesOut )
|
||||
@@ -216,9 +139,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputDigitalActionHandle_t FGetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
private FGetDigitalActionHandle _GetDigitalActionHandle;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionHandle", CallingConvention = Platform.CC)]
|
||||
private static extern InputDigitalActionHandle_t _GetDigitalActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
|
||||
#endregion
|
||||
internal InputDigitalActionHandle_t GetDigitalActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
|
||||
@@ -228,31 +150,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetDigitalActionData( IntPtr self, ref DigitalState retVal, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
|
||||
#else
|
||||
private delegate DigitalState FGetDigitalActionData( IntPtr self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
|
||||
#endif
|
||||
private FGetDigitalActionData _GetDigitalActionData;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionData", CallingConvention = Platform.CC)]
|
||||
private static extern DigitalState _GetDigitalActionData( IntPtr self, InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle );
|
||||
|
||||
#endregion
|
||||
internal DigitalState GetDigitalActionData( InputHandle_t inputHandle, InputDigitalActionHandle_t digitalActionHandle )
|
||||
{
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( DigitalState );
|
||||
_GetDigitalActionData( Self, ref retVal, inputHandle, digitalActionHandle );
|
||||
return retVal;
|
||||
#else
|
||||
var returnValue = _GetDigitalActionData( Self, inputHandle, digitalActionHandle );
|
||||
return returnValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetDigitalActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut );
|
||||
private FGetDigitalActionOrigins _GetDigitalActionOrigins;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDigitalActionOrigins", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetDigitalActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut );
|
||||
|
||||
#endregion
|
||||
internal int GetDigitalActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputDigitalActionHandle_t digitalActionHandle, ref InputActionOrigin originsOut )
|
||||
@@ -262,9 +172,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputAnalogActionHandle_t FGetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
private FGetAnalogActionHandle _GetAnalogActionHandle;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionHandle", CallingConvention = Platform.CC)]
|
||||
private static extern InputAnalogActionHandle_t _GetAnalogActionHandle( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName );
|
||||
|
||||
#endregion
|
||||
internal InputAnalogActionHandle_t GetAnalogActionHandle( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszActionName )
|
||||
@@ -274,31 +183,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetAnalogActionData( IntPtr self, ref AnalogState retVal, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
|
||||
#else
|
||||
private delegate AnalogState FGetAnalogActionData( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
|
||||
#endif
|
||||
private FGetAnalogActionData _GetAnalogActionData;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionData", CallingConvention = Platform.CC)]
|
||||
private static extern AnalogState _GetAnalogActionData( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle );
|
||||
|
||||
#endregion
|
||||
internal AnalogState GetAnalogActionData( InputHandle_t inputHandle, InputAnalogActionHandle_t analogActionHandle )
|
||||
{
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( AnalogState );
|
||||
_GetAnalogActionData( Self, ref retVal, inputHandle, analogActionHandle );
|
||||
return retVal;
|
||||
#else
|
||||
var returnValue = _GetAnalogActionData( Self, inputHandle, analogActionHandle );
|
||||
return returnValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetAnalogActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut );
|
||||
private FGetAnalogActionOrigins _GetAnalogActionOrigins;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetAnalogActionOrigins", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAnalogActionOrigins( IntPtr self, InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut );
|
||||
|
||||
#endregion
|
||||
internal int GetAnalogActionOrigins( InputHandle_t inputHandle, InputActionSetHandle_t actionSetHandle, InputAnalogActionHandle_t analogActionHandle, ref InputActionOrigin originsOut )
|
||||
@@ -308,9 +205,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetGlyphForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
|
||||
private FGetGlyphForActionOrigin _GetGlyphForActionOrigin;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetGlyphForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetGlyphForActionOrigin( InputActionOrigin eOrigin )
|
||||
@@ -320,9 +216,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
|
||||
private FGetStringForActionOrigin _GetStringForActionOrigin;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetStringForActionOrigin( IntPtr self, InputActionOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetStringForActionOrigin( InputActionOrigin eOrigin )
|
||||
@@ -332,9 +227,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FStopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
|
||||
private FStopAnalogActionMomentum _StopAnalogActionMomentum;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_StopAnalogActionMomentum", CallingConvention = Platform.CC)]
|
||||
private static extern void _StopAnalogActionMomentum( IntPtr self, InputHandle_t inputHandle, InputAnalogActionHandle_t eAction );
|
||||
|
||||
#endregion
|
||||
internal void StopAnalogActionMomentum( InputHandle_t inputHandle, InputAnalogActionHandle_t eAction )
|
||||
@@ -343,31 +237,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetMotionData( IntPtr self, ref MotionState retVal, InputHandle_t inputHandle );
|
||||
#else
|
||||
private delegate MotionState FGetMotionData( IntPtr self, InputHandle_t inputHandle );
|
||||
#endif
|
||||
private FGetMotionData _GetMotionData;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetMotionData", CallingConvention = Platform.CC)]
|
||||
private static extern MotionState _GetMotionData( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal MotionState GetMotionData( InputHandle_t inputHandle )
|
||||
{
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( MotionState );
|
||||
_GetMotionData( Self, ref retVal, inputHandle );
|
||||
return retVal;
|
||||
#else
|
||||
var returnValue = _GetMotionData( Self, inputHandle );
|
||||
return returnValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FTriggerVibration( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed );
|
||||
private FTriggerVibration _TriggerVibration;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerVibration", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerVibration( IntPtr self, InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed );
|
||||
|
||||
#endregion
|
||||
internal void TriggerVibration( InputHandle_t inputHandle, ushort usLeftSpeed, ushort usRightSpeed )
|
||||
@@ -376,9 +258,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetLEDColor( IntPtr self, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags );
|
||||
private FSetLEDColor _SetLEDColor;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_SetLEDColor", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetLEDColor( IntPtr self, InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags );
|
||||
|
||||
#endregion
|
||||
internal void SetLEDColor( InputHandle_t inputHandle, byte nColorR, byte nColorG, byte nColorB, uint nFlags )
|
||||
@@ -387,9 +268,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FTriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
|
||||
private FTriggerHapticPulse _TriggerHapticPulse;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerHapticPulse", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec );
|
||||
|
||||
#endregion
|
||||
internal void TriggerHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec )
|
||||
@@ -398,9 +278,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FTriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
|
||||
private FTriggerRepeatedHapticPulse _TriggerRepeatedHapticPulse;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TriggerRepeatedHapticPulse", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerRepeatedHapticPulse( IntPtr self, InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags );
|
||||
|
||||
#endregion
|
||||
internal void TriggerRepeatedHapticPulse( InputHandle_t inputHandle, SteamControllerPad eTargetPad, ushort usDurationMicroSec, ushort usOffMicroSec, ushort unRepeat, uint nFlags )
|
||||
@@ -409,10 +288,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_ShowBindingPanel", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FShowBindingPanel( IntPtr self, InputHandle_t inputHandle );
|
||||
private FShowBindingPanel _ShowBindingPanel;
|
||||
private static extern bool _ShowBindingPanel( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal bool ShowBindingPanel( InputHandle_t inputHandle )
|
||||
@@ -422,9 +300,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputType FGetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle );
|
||||
private FGetInputTypeForHandle _GetInputTypeForHandle;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetInputTypeForHandle", CallingConvention = Platform.CC)]
|
||||
private static extern InputType _GetInputTypeForHandle( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal InputType GetInputTypeForHandle( InputHandle_t inputHandle )
|
||||
@@ -434,9 +311,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputHandle_t FGetControllerForGamepadIndex( IntPtr self, int nIndex );
|
||||
private FGetControllerForGamepadIndex _GetControllerForGamepadIndex;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetControllerForGamepadIndex", CallingConvention = Platform.CC)]
|
||||
private static extern InputHandle_t _GetControllerForGamepadIndex( IntPtr self, int nIndex );
|
||||
|
||||
#endregion
|
||||
internal InputHandle_t GetControllerForGamepadIndex( int nIndex )
|
||||
@@ -446,9 +322,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle );
|
||||
private FGetGamepadIndexForController _GetGamepadIndexForController;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGamepadIndexForController", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetGamepadIndexForController( IntPtr self, InputHandle_t ulinputHandle );
|
||||
|
||||
#endregion
|
||||
internal int GetGamepadIndexForController( InputHandle_t ulinputHandle )
|
||||
@@ -458,9 +333,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
private FGetStringForXboxOrigin _GetStringForXboxOrigin;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetStringForXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetStringForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetStringForXboxOrigin( XboxOrigin eOrigin )
|
||||
@@ -470,9 +344,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
private FGetGlyphForXboxOrigin _GetGlyphForXboxOrigin;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetGlyphForXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetGlyphForXboxOrigin( IntPtr self, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal string GetGlyphForXboxOrigin( XboxOrigin eOrigin )
|
||||
@@ -482,9 +355,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputActionOrigin FGetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin );
|
||||
private FGetActionOriginFromXboxOrigin _GetActionOriginFromXboxOrigin;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetActionOriginFromXboxOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern InputActionOrigin _GetActionOriginFromXboxOrigin( IntPtr self, InputHandle_t inputHandle, XboxOrigin eOrigin );
|
||||
|
||||
#endregion
|
||||
internal InputActionOrigin GetActionOriginFromXboxOrigin( InputHandle_t inputHandle, XboxOrigin eOrigin )
|
||||
@@ -494,9 +366,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate InputActionOrigin FTranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin );
|
||||
private FTranslateActionOrigin _TranslateActionOrigin;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_TranslateActionOrigin", CallingConvention = Platform.CC)]
|
||||
private static extern InputActionOrigin _TranslateActionOrigin( IntPtr self, InputType eDestinationInputType, InputActionOrigin eSourceOrigin );
|
||||
|
||||
#endregion
|
||||
internal InputActionOrigin TranslateActionOrigin( InputType eDestinationInputType, InputActionOrigin eSourceOrigin )
|
||||
@@ -505,5 +376,28 @@ namespace Steamworks
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetDeviceBindingRevision", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetDeviceBindingRevision( IntPtr self, InputHandle_t inputHandle, ref int pMajor, ref int pMinor );
|
||||
|
||||
#endregion
|
||||
internal bool GetDeviceBindingRevision( InputHandle_t inputHandle, ref int pMajor, ref int pMinor )
|
||||
{
|
||||
var returnValue = _GetDeviceBindingRevision( Self, inputHandle, ref pMajor, ref pMinor );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInput_GetRemotePlaySessionID", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetRemotePlaySessionID( IntPtr self, InputHandle_t inputHandle );
|
||||
|
||||
#endregion
|
||||
internal uint GetRemotePlaySessionID( InputHandle_t inputHandle )
|
||||
{
|
||||
var returnValue = _GetRemotePlaySessionID( Self, inputHandle );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,97 +9,28 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamInventory : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMINVENTORY_INTERFACE_V003";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamInventory( bool IsGameServer )
|
||||
{
|
||||
_GetResultStatus = Marshal.GetDelegateForFunctionPointer<FGetResultStatus>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_GetResultItems = Marshal.GetDelegateForFunctionPointer<FGetResultItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetResultItemProperty = Marshal.GetDelegateForFunctionPointer<FGetResultItemProperty>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetResultTimestamp = Marshal.GetDelegateForFunctionPointer<FGetResultTimestamp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_CheckResultSteamID = Marshal.GetDelegateForFunctionPointer<FCheckResultSteamID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_DestroyResult = Marshal.GetDelegateForFunctionPointer<FDestroyResult>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetAllItems = Marshal.GetDelegateForFunctionPointer<FGetAllItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_GetItemsByID = Marshal.GetDelegateForFunctionPointer<FGetItemsByID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_SerializeResult = Marshal.GetDelegateForFunctionPointer<FSerializeResult>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_DeserializeResult = Marshal.GetDelegateForFunctionPointer<FDeserializeResult>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GenerateItems = Marshal.GetDelegateForFunctionPointer<FGenerateItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GrantPromoItems = Marshal.GetDelegateForFunctionPointer<FGrantPromoItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_AddPromoItem = Marshal.GetDelegateForFunctionPointer<FAddPromoItem>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_AddPromoItems = Marshal.GetDelegateForFunctionPointer<FAddPromoItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_ConsumeItem = Marshal.GetDelegateForFunctionPointer<FConsumeItem>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_ExchangeItems = Marshal.GetDelegateForFunctionPointer<FExchangeItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_TransferItemQuantity = Marshal.GetDelegateForFunctionPointer<FTransferItemQuantity>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_SendItemDropHeartbeat = Marshal.GetDelegateForFunctionPointer<FSendItemDropHeartbeat>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_TriggerItemDrop = Marshal.GetDelegateForFunctionPointer<FTriggerItemDrop>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_TradeItems = Marshal.GetDelegateForFunctionPointer<FTradeItems>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_LoadItemDefinitions = Marshal.GetDelegateForFunctionPointer<FLoadItemDefinitions>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetItemDefinitionIDs = Marshal.GetDelegateForFunctionPointer<FGetItemDefinitionIDs>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_GetItemDefinitionProperty = Marshal.GetDelegateForFunctionPointer<FGetItemDefinitionProperty>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_RequestEligiblePromoItemDefinitionsIDs = Marshal.GetDelegateForFunctionPointer<FRequestEligiblePromoItemDefinitionsIDs>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_GetEligiblePromoItemDefinitionIDs = Marshal.GetDelegateForFunctionPointer<FGetEligiblePromoItemDefinitionIDs>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_StartPurchase = Marshal.GetDelegateForFunctionPointer<FStartPurchase>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_RequestPrices = Marshal.GetDelegateForFunctionPointer<FRequestPrices>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_GetNumItemsWithPrices = Marshal.GetDelegateForFunctionPointer<FGetNumItemsWithPrices>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_GetItemsWithPrices = Marshal.GetDelegateForFunctionPointer<FGetItemsWithPrices>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_GetItemPrice = Marshal.GetDelegateForFunctionPointer<FGetItemPrice>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
_StartUpdateProperties = Marshal.GetDelegateForFunctionPointer<FStartUpdateProperties>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
|
||||
_RemoveProperty = Marshal.GetDelegateForFunctionPointer<FRemoveProperty>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
|
||||
_SetProperty1 = Marshal.GetDelegateForFunctionPointer<FSetProperty1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
|
||||
_SetProperty2 = Marshal.GetDelegateForFunctionPointer<FSetProperty2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) );
|
||||
_SetProperty3 = Marshal.GetDelegateForFunctionPointer<FSetProperty3>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) );
|
||||
_SetProperty4 = Marshal.GetDelegateForFunctionPointer<FSetProperty4>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) );
|
||||
_SubmitUpdateProperties = Marshal.GetDelegateForFunctionPointer<FSubmitUpdateProperties>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_GetResultStatus = null;
|
||||
_GetResultItems = null;
|
||||
_GetResultItemProperty = null;
|
||||
_GetResultTimestamp = null;
|
||||
_CheckResultSteamID = null;
|
||||
_DestroyResult = null;
|
||||
_GetAllItems = null;
|
||||
_GetItemsByID = null;
|
||||
_SerializeResult = null;
|
||||
_DeserializeResult = null;
|
||||
_GenerateItems = null;
|
||||
_GrantPromoItems = null;
|
||||
_AddPromoItem = null;
|
||||
_AddPromoItems = null;
|
||||
_ConsumeItem = null;
|
||||
_ExchangeItems = null;
|
||||
_TransferItemQuantity = null;
|
||||
_SendItemDropHeartbeat = null;
|
||||
_TriggerItemDrop = null;
|
||||
_TradeItems = null;
|
||||
_LoadItemDefinitions = null;
|
||||
_GetItemDefinitionIDs = null;
|
||||
_GetItemDefinitionProperty = null;
|
||||
_RequestEligiblePromoItemDefinitionsIDs = null;
|
||||
_GetEligiblePromoItemDefinitionIDs = null;
|
||||
_StartPurchase = null;
|
||||
_RequestPrices = null;
|
||||
_GetNumItemsWithPrices = null;
|
||||
_GetItemsWithPrices = null;
|
||||
_GetItemPrice = null;
|
||||
_StartUpdateProperties = null;
|
||||
_RemoveProperty = null;
|
||||
_SetProperty1 = null;
|
||||
_SetProperty2 = null;
|
||||
_SetProperty3 = null;
|
||||
_SetProperty4 = null;
|
||||
_SubmitUpdateProperties = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamInventory_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamInventory_v003();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamInventory_v003();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerInventory_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerInventory_v003();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerInventory_v003();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Result FGetResultStatus( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
private FGetResultStatus _GetResultStatus;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultStatus", CallingConvention = Platform.CC)]
|
||||
private static extern Result _GetResultStatus( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Find out the status of an asynchronous inventory result handle.
|
||||
/// </summary>
|
||||
internal Result GetResultStatus( SteamInventoryResult_t resultHandle )
|
||||
{
|
||||
var returnValue = _GetResultStatus( Self, resultHandle );
|
||||
@@ -107,12 +38,14 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetResultItems( IntPtr self, SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize );
|
||||
private FGetResultItems _GetResultItems;
|
||||
private static extern bool _GetResultItems( IntPtr self, SteamInventoryResult_t resultHandle, [In,Out] SteamItemDetails_t[] pOutItemsArray, ref uint punOutItemsArraySize );
|
||||
|
||||
#endregion
|
||||
/// <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 );
|
||||
@@ -120,10 +53,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultItemProperty", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetResultItemProperty( IntPtr self, SteamInventoryResult_t resultHandle, uint unItemIndex, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut );
|
||||
private FGetResultItemProperty _GetResultItemProperty;
|
||||
private static extern bool _GetResultItemProperty( IntPtr self, SteamInventoryResult_t resultHandle, uint unItemIndex, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut );
|
||||
|
||||
#endregion
|
||||
internal bool GetResultItemProperty( SteamInventoryResult_t resultHandle, uint unItemIndex, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut )
|
||||
@@ -135,11 +67,13 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetResultTimestamp( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
private FGetResultTimestamp _GetResultTimestamp;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetResultTimestamp", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetResultTimestamp( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
|
||||
#endregion
|
||||
/// <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 );
|
||||
@@ -147,12 +81,14 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_CheckResultSteamID", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCheckResultSteamID( IntPtr self, SteamInventoryResult_t resultHandle, SteamId steamIDExpected );
|
||||
private FCheckResultSteamID _CheckResultSteamID;
|
||||
private static extern bool _CheckResultSteamID( IntPtr self, SteamInventoryResult_t resultHandle, SteamId steamIDExpected );
|
||||
|
||||
#endregion
|
||||
/// <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 );
|
||||
@@ -160,23 +96,27 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FDestroyResult( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
private FDestroyResult _DestroyResult;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_DestroyResult", CallingConvention = Platform.CC)]
|
||||
private static extern void _DestroyResult( IntPtr self, SteamInventoryResult_t resultHandle );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Destroys a result handle and frees all associated memory.
|
||||
/// </summary>
|
||||
internal void DestroyResult( SteamInventoryResult_t resultHandle )
|
||||
{
|
||||
_DestroyResult( Self, resultHandle );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetAllItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetAllItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
|
||||
private FGetAllItems _GetAllItems;
|
||||
private static extern bool _GetAllItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
|
||||
|
||||
#endregion
|
||||
/// <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 );
|
||||
@@ -184,12 +124,14 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemsByID", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetItemsByID( IntPtr self, ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs );
|
||||
private FGetItemsByID _GetItemsByID;
|
||||
private static extern bool _GetItemsByID( IntPtr self, ref SteamInventoryResult_t pResultHandle, ref InventoryItemId pInstanceIDs, uint unCountInstanceIDs );
|
||||
|
||||
#endregion
|
||||
/// <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 );
|
||||
@@ -197,10 +139,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SerializeResult", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSerializeResult( IntPtr self, SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize );
|
||||
private FSerializeResult _SerializeResult;
|
||||
private static extern bool _SerializeResult( IntPtr self, SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool SerializeResult( SteamInventoryResult_t resultHandle, IntPtr pOutBuffer, ref uint punOutBufferSize )
|
||||
@@ -210,10 +151,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_DeserializeResult", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDeserializeResult( IntPtr self, ref SteamInventoryResult_t pOutResultHandle, IntPtr pBuffer, uint unBufferSize, [MarshalAs( UnmanagedType.U1 )] bool bRESERVED_MUST_BE_FALSE );
|
||||
private FDeserializeResult _DeserializeResult;
|
||||
private static extern bool _DeserializeResult( IntPtr self, ref SteamInventoryResult_t pOutResultHandle, IntPtr pBuffer, uint unBufferSize, [MarshalAs( UnmanagedType.U1 )] bool bRESERVED_MUST_BE_FALSE );
|
||||
|
||||
#endregion
|
||||
internal bool DeserializeResult( ref SteamInventoryResult_t pOutResultHandle, IntPtr pBuffer, uint unBufferSize, [MarshalAs( UnmanagedType.U1 )] bool bRESERVED_MUST_BE_FALSE )
|
||||
@@ -223,10 +163,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GenerateItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGenerateItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength );
|
||||
private FGenerateItems _GenerateItems;
|
||||
private static extern bool _GenerateItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength );
|
||||
|
||||
#endregion
|
||||
internal bool GenerateItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength )
|
||||
@@ -236,12 +175,14 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GrantPromoItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGrantPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
|
||||
private FGrantPromoItems _GrantPromoItems;
|
||||
private static extern bool _GrantPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle );
|
||||
|
||||
#endregion
|
||||
/// <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 );
|
||||
@@ -249,10 +190,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_AddPromoItem", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FAddPromoItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef );
|
||||
private FAddPromoItem _AddPromoItem;
|
||||
private static extern bool _AddPromoItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef );
|
||||
|
||||
#endregion
|
||||
internal bool AddPromoItem( ref SteamInventoryResult_t pResultHandle, InventoryDefId itemDef )
|
||||
@@ -262,10 +202,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_AddPromoItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FAddPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength );
|
||||
private FAddPromoItems _AddPromoItems;
|
||||
private static extern bool _AddPromoItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength );
|
||||
|
||||
#endregion
|
||||
internal bool AddPromoItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayItemDefs, uint unArrayLength )
|
||||
@@ -275,12 +214,14 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_ConsumeItem", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FConsumeItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity );
|
||||
private FConsumeItem _ConsumeItem;
|
||||
private static extern bool _ConsumeItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemConsume, uint unQuantity );
|
||||
|
||||
#endregion
|
||||
/// <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 );
|
||||
@@ -288,10 +229,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_ExchangeItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FExchangeItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayGenerate, [In,Out] uint[] punArrayGenerateQuantity, uint unArrayGenerateLength, [In,Out] InventoryItemId[] pArrayDestroy, [In,Out] uint[] punArrayDestroyQuantity, uint unArrayDestroyLength );
|
||||
private FExchangeItems _ExchangeItems;
|
||||
private static extern bool _ExchangeItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayGenerate, [In,Out] uint[] punArrayGenerateQuantity, uint unArrayGenerateLength, [In,Out] InventoryItemId[] pArrayDestroy, [In,Out] uint[] punArrayDestroyQuantity, uint unArrayDestroyLength );
|
||||
|
||||
#endregion
|
||||
internal bool ExchangeItems( ref SteamInventoryResult_t pResultHandle, [In,Out] InventoryDefId[] pArrayGenerate, [In,Out] uint[] punArrayGenerateQuantity, uint unArrayGenerateLength, [In,Out] InventoryItemId[] pArrayDestroy, [In,Out] uint[] punArrayDestroyQuantity, uint unArrayDestroyLength )
|
||||
@@ -301,10 +241,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TransferItemQuantity", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FTransferItemQuantity( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest );
|
||||
private FTransferItemQuantity _TransferItemQuantity;
|
||||
private static extern bool _TransferItemQuantity( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest );
|
||||
|
||||
#endregion
|
||||
internal bool TransferItemQuantity( ref SteamInventoryResult_t pResultHandle, InventoryItemId itemIdSource, uint unQuantity, InventoryItemId itemIdDest )
|
||||
@@ -314,23 +253,27 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSendItemDropHeartbeat( IntPtr self );
|
||||
private FSendItemDropHeartbeat _SendItemDropHeartbeat;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SendItemDropHeartbeat", CallingConvention = Platform.CC)]
|
||||
private static extern void _SendItemDropHeartbeat( IntPtr self );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Deprecated method. Playtime accounting is performed on the Steam servers.
|
||||
/// </summary>
|
||||
internal void SendItemDropHeartbeat()
|
||||
{
|
||||
_SendItemDropHeartbeat( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TriggerItemDrop", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FTriggerItemDrop( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition );
|
||||
private FTriggerItemDrop _TriggerItemDrop;
|
||||
private static extern bool _TriggerItemDrop( IntPtr self, ref SteamInventoryResult_t pResultHandle, InventoryDefId dropListDefinition );
|
||||
|
||||
#endregion
|
||||
/// <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 );
|
||||
@@ -338,10 +281,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_TradeItems", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FTradeItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, SteamId steamIDTradePartner, [In,Out] InventoryItemId[] pArrayGive, [In,Out] uint[] pArrayGiveQuantity, uint nArrayGiveLength, [In,Out] InventoryItemId[] pArrayGet, [In,Out] uint[] pArrayGetQuantity, uint nArrayGetLength );
|
||||
private FTradeItems _TradeItems;
|
||||
private static extern bool _TradeItems( IntPtr self, ref SteamInventoryResult_t pResultHandle, SteamId steamIDTradePartner, [In,Out] InventoryItemId[] pArrayGive, [In,Out] uint[] pArrayGiveQuantity, uint nArrayGiveLength, [In,Out] InventoryItemId[] pArrayGet, [In,Out] uint[] pArrayGetQuantity, uint nArrayGetLength );
|
||||
|
||||
#endregion
|
||||
internal bool TradeItems( ref SteamInventoryResult_t pResultHandle, SteamId steamIDTradePartner, [In,Out] InventoryItemId[] pArrayGive, [In,Out] uint[] pArrayGiveQuantity, uint nArrayGiveLength, [In,Out] InventoryItemId[] pArrayGet, [In,Out] uint[] pArrayGetQuantity, uint nArrayGetLength )
|
||||
@@ -351,12 +293,14 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_LoadItemDefinitions", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FLoadItemDefinitions( IntPtr self );
|
||||
private FLoadItemDefinitions _LoadItemDefinitions;
|
||||
private static extern bool _LoadItemDefinitions( IntPtr self );
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// LoadItemDefinitions triggers the automatic load and refresh of item definitions.
|
||||
/// </summary>
|
||||
internal bool LoadItemDefinitions()
|
||||
{
|
||||
var returnValue = _LoadItemDefinitions( Self );
|
||||
@@ -364,10 +308,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemDefinitionIDs", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetItemDefinitionIDs( IntPtr self, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
|
||||
private FGetItemDefinitionIDs _GetItemDefinitionIDs;
|
||||
private static extern bool _GetItemDefinitionIDs( IntPtr self, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
|
||||
|
||||
#endregion
|
||||
internal bool GetItemDefinitionIDs( [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize )
|
||||
@@ -377,10 +320,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemDefinitionProperty", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetItemDefinitionProperty( IntPtr self, InventoryDefId iDefinition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut );
|
||||
private FGetItemDefinitionProperty _GetItemDefinitionProperty;
|
||||
private static extern bool _GetItemDefinitionProperty( IntPtr self, InventoryDefId iDefinition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, IntPtr pchValueBuffer, ref uint punValueBufferSizeOut );
|
||||
|
||||
#endregion
|
||||
internal bool GetItemDefinitionProperty( InventoryDefId iDefinition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, out string pchValueBuffer, ref uint punValueBufferSizeOut )
|
||||
@@ -392,22 +334,20 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestEligiblePromoItemDefinitionsIDs( IntPtr self, SteamId steamID );
|
||||
private FRequestEligiblePromoItemDefinitionsIDs _RequestEligiblePromoItemDefinitionsIDs;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RequestEligiblePromoItemDefinitionsIDs", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestEligiblePromoItemDefinitionsIDs( IntPtr self, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal async Task<SteamInventoryEligiblePromoItemDefIDs_t?> RequestEligiblePromoItemDefinitionsIDs( SteamId steamID )
|
||||
internal CallResult<SteamInventoryEligiblePromoItemDefIDs_t> RequestEligiblePromoItemDefinitionsIDs( SteamId steamID )
|
||||
{
|
||||
var returnValue = _RequestEligiblePromoItemDefinitionsIDs( Self, steamID );
|
||||
return await SteamInventoryEligiblePromoItemDefIDs_t.GetResultAsync( returnValue );
|
||||
return new CallResult<SteamInventoryEligiblePromoItemDefIDs_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetEligiblePromoItemDefinitionIDs", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetEligiblePromoItemDefinitionIDs( IntPtr self, SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
|
||||
private FGetEligiblePromoItemDefinitionIDs _GetEligiblePromoItemDefinitionIDs;
|
||||
private static extern bool _GetEligiblePromoItemDefinitionIDs( IntPtr self, SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize );
|
||||
|
||||
#endregion
|
||||
internal bool GetEligiblePromoItemDefinitionIDs( SteamId steamID, [In,Out] InventoryDefId[] pItemDefIDs, ref uint punItemDefIDsArraySize )
|
||||
@@ -417,33 +357,30 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FStartPurchase( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength );
|
||||
private FStartPurchase _StartPurchase;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_StartPurchase", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _StartPurchase( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength );
|
||||
|
||||
#endregion
|
||||
internal async Task<SteamInventoryStartPurchaseResult_t?> StartPurchase( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength )
|
||||
internal CallResult<SteamInventoryStartPurchaseResult_t> StartPurchase( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] uint[] punArrayQuantity, uint unArrayLength )
|
||||
{
|
||||
var returnValue = _StartPurchase( Self, pArrayItemDefs, punArrayQuantity, unArrayLength );
|
||||
return await SteamInventoryStartPurchaseResult_t.GetResultAsync( returnValue );
|
||||
return new CallResult<SteamInventoryStartPurchaseResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestPrices( IntPtr self );
|
||||
private FRequestPrices _RequestPrices;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RequestPrices", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestPrices( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal async Task<SteamInventoryRequestPricesResult_t?> RequestPrices()
|
||||
internal CallResult<SteamInventoryRequestPricesResult_t> RequestPrices()
|
||||
{
|
||||
var returnValue = _RequestPrices( Self );
|
||||
return await SteamInventoryRequestPricesResult_t.GetResultAsync( returnValue );
|
||||
return new CallResult<SteamInventoryRequestPricesResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetNumItemsWithPrices( IntPtr self );
|
||||
private FGetNumItemsWithPrices _GetNumItemsWithPrices;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetNumItemsWithPrices", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetNumItemsWithPrices( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetNumItemsWithPrices()
|
||||
@@ -453,10 +390,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemsWithPrices", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetItemsWithPrices( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] ulong[] pCurrentPrices, [In,Out] ulong[] pBasePrices, uint unArrayLength );
|
||||
private FGetItemsWithPrices _GetItemsWithPrices;
|
||||
private static extern bool _GetItemsWithPrices( IntPtr self, [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] ulong[] pCurrentPrices, [In,Out] ulong[] pBasePrices, uint unArrayLength );
|
||||
|
||||
#endregion
|
||||
internal bool GetItemsWithPrices( [In,Out] InventoryDefId[] pArrayItemDefs, [In,Out] ulong[] pCurrentPrices, [In,Out] ulong[] pBasePrices, uint unArrayLength )
|
||||
@@ -466,10 +402,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_GetItemPrice", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetItemPrice( IntPtr self, InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice );
|
||||
private FGetItemPrice _GetItemPrice;
|
||||
private static extern bool _GetItemPrice( IntPtr self, InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice );
|
||||
|
||||
#endregion
|
||||
internal bool GetItemPrice( InventoryDefId iDefinition, ref ulong pCurrentPrice, ref ulong pBasePrice )
|
||||
@@ -479,9 +414,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamInventoryUpdateHandle_t FStartUpdateProperties( IntPtr self );
|
||||
private FStartUpdateProperties _StartUpdateProperties;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_StartUpdateProperties", CallingConvention = Platform.CC)]
|
||||
private static extern SteamInventoryUpdateHandle_t _StartUpdateProperties( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamInventoryUpdateHandle_t StartUpdateProperties()
|
||||
@@ -491,10 +425,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_RemoveProperty", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FRemoveProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName );
|
||||
private FRemoveProperty _RemoveProperty;
|
||||
private static extern bool _RemoveProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName );
|
||||
|
||||
#endregion
|
||||
internal bool RemoveProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName )
|
||||
@@ -504,62 +437,57 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetProperty1( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue );
|
||||
private FSetProperty1 _SetProperty1;
|
||||
private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetProperty1( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue )
|
||||
internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyValue )
|
||||
{
|
||||
var returnValue = _SetProperty1( Self, handle, nItemID, pchPropertyName, pchPropertyValue );
|
||||
var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, pchPropertyValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyBool", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetProperty2( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
private FSetProperty2 _SetProperty2;
|
||||
private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetProperty2( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _SetProperty2( Self, handle, nItemID, pchPropertyName, bValue );
|
||||
var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyInt64", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetProperty3( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue );
|
||||
private FSetProperty3 _SetProperty3;
|
||||
private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetProperty3( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue )
|
||||
internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, long nValue )
|
||||
{
|
||||
var returnValue = _SetProperty3( Self, handle, nItemID, pchPropertyName, nValue );
|
||||
var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, nValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SetPropertyFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetProperty4( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue );
|
||||
private FSetProperty4 _SetProperty4;
|
||||
private static extern bool _SetProperty( IntPtr self, SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetProperty4( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue )
|
||||
internal bool SetProperty( SteamInventoryUpdateHandle_t handle, InventoryItemId nItemID, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchPropertyName, float flValue )
|
||||
{
|
||||
var returnValue = _SetProperty4( Self, handle, nItemID, pchPropertyName, flValue );
|
||||
var returnValue = _SetProperty( Self, handle, nItemID, pchPropertyName, flValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_SubmitUpdateProperties", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSubmitUpdateProperties( IntPtr self, SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle );
|
||||
private FSubmitUpdateProperties _SubmitUpdateProperties;
|
||||
private static extern bool _SubmitUpdateProperties( IntPtr self, SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle );
|
||||
|
||||
#endregion
|
||||
internal bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle, ref SteamInventoryResult_t pResultHandle )
|
||||
|
||||
@@ -9,97 +9,20 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamMatchmaking : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamMatchMaking009";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamMatchmaking( bool IsGameServer )
|
||||
{
|
||||
_GetFavoriteGameCount = Marshal.GetDelegateForFunctionPointer<FGetFavoriteGameCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_GetFavoriteGame = Marshal.GetDelegateForFunctionPointer<FGetFavoriteGame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_AddFavoriteGame = Marshal.GetDelegateForFunctionPointer<FAddFavoriteGame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_RemoveFavoriteGame = Marshal.GetDelegateForFunctionPointer<FRemoveFavoriteGame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_RequestLobbyList = Marshal.GetDelegateForFunctionPointer<FRequestLobbyList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_AddRequestLobbyListStringFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListStringFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_AddRequestLobbyListNumericalFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListNumericalFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_AddRequestLobbyListNearValueFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListNearValueFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_AddRequestLobbyListFilterSlotsAvailable = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListFilterSlotsAvailable>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_AddRequestLobbyListDistanceFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListDistanceFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_AddRequestLobbyListResultCountFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListResultCountFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_AddRequestLobbyListCompatibleMembersFilter = Marshal.GetDelegateForFunctionPointer<FAddRequestLobbyListCompatibleMembersFilter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_GetLobbyByIndex = Marshal.GetDelegateForFunctionPointer<FGetLobbyByIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_CreateLobby = Marshal.GetDelegateForFunctionPointer<FCreateLobby>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_JoinLobby = Marshal.GetDelegateForFunctionPointer<FJoinLobby>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_LeaveLobby = Marshal.GetDelegateForFunctionPointer<FLeaveLobby>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_InviteUserToLobby = Marshal.GetDelegateForFunctionPointer<FInviteUserToLobby>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetNumLobbyMembers = Marshal.GetDelegateForFunctionPointer<FGetNumLobbyMembers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetLobbyMemberByIndex = Marshal.GetDelegateForFunctionPointer<FGetLobbyMemberByIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_GetLobbyData = Marshal.GetDelegateForFunctionPointer<FGetLobbyData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_SetLobbyData = Marshal.GetDelegateForFunctionPointer<FSetLobbyData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetLobbyDataCount = Marshal.GetDelegateForFunctionPointer<FGetLobbyDataCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_GetLobbyDataByIndex = Marshal.GetDelegateForFunctionPointer<FGetLobbyDataByIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_DeleteLobbyData = Marshal.GetDelegateForFunctionPointer<FDeleteLobbyData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_GetLobbyMemberData = Marshal.GetDelegateForFunctionPointer<FGetLobbyMemberData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_SetLobbyMemberData = Marshal.GetDelegateForFunctionPointer<FSetLobbyMemberData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_SendLobbyChatMsg = Marshal.GetDelegateForFunctionPointer<FSendLobbyChatMsg>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_GetLobbyChatEntry = Marshal.GetDelegateForFunctionPointer<FGetLobbyChatEntry>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_RequestLobbyData = Marshal.GetDelegateForFunctionPointer<FRequestLobbyData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_SetLobbyGameServer = Marshal.GetDelegateForFunctionPointer<FSetLobbyGameServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
_GetLobbyGameServer = Marshal.GetDelegateForFunctionPointer<FGetLobbyGameServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
|
||||
_SetLobbyMemberLimit = Marshal.GetDelegateForFunctionPointer<FSetLobbyMemberLimit>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
|
||||
_GetLobbyMemberLimit = Marshal.GetDelegateForFunctionPointer<FGetLobbyMemberLimit>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
|
||||
_SetLobbyType = Marshal.GetDelegateForFunctionPointer<FSetLobbyType>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) );
|
||||
_SetLobbyJoinable = Marshal.GetDelegateForFunctionPointer<FSetLobbyJoinable>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) );
|
||||
_GetLobbyOwner = Marshal.GetDelegateForFunctionPointer<FGetLobbyOwner>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) );
|
||||
_SetLobbyOwner = Marshal.GetDelegateForFunctionPointer<FSetLobbyOwner>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) );
|
||||
_SetLinkedLobby = Marshal.GetDelegateForFunctionPointer<FSetLinkedLobby>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_GetFavoriteGameCount = null;
|
||||
_GetFavoriteGame = null;
|
||||
_AddFavoriteGame = null;
|
||||
_RemoveFavoriteGame = null;
|
||||
_RequestLobbyList = null;
|
||||
_AddRequestLobbyListStringFilter = null;
|
||||
_AddRequestLobbyListNumericalFilter = null;
|
||||
_AddRequestLobbyListNearValueFilter = null;
|
||||
_AddRequestLobbyListFilterSlotsAvailable = null;
|
||||
_AddRequestLobbyListDistanceFilter = null;
|
||||
_AddRequestLobbyListResultCountFilter = null;
|
||||
_AddRequestLobbyListCompatibleMembersFilter = null;
|
||||
_GetLobbyByIndex = null;
|
||||
_CreateLobby = null;
|
||||
_JoinLobby = null;
|
||||
_LeaveLobby = null;
|
||||
_InviteUserToLobby = null;
|
||||
_GetNumLobbyMembers = null;
|
||||
_GetLobbyMemberByIndex = null;
|
||||
_GetLobbyData = null;
|
||||
_SetLobbyData = null;
|
||||
_GetLobbyDataCount = null;
|
||||
_GetLobbyDataByIndex = null;
|
||||
_DeleteLobbyData = null;
|
||||
_GetLobbyMemberData = null;
|
||||
_SetLobbyMemberData = null;
|
||||
_SendLobbyChatMsg = null;
|
||||
_GetLobbyChatEntry = null;
|
||||
_RequestLobbyData = null;
|
||||
_SetLobbyGameServer = null;
|
||||
_GetLobbyGameServer = null;
|
||||
_SetLobbyMemberLimit = null;
|
||||
_GetLobbyMemberLimit = null;
|
||||
_SetLobbyType = null;
|
||||
_SetLobbyJoinable = null;
|
||||
_GetLobbyOwner = null;
|
||||
_SetLobbyOwner = null;
|
||||
_SetLinkedLobby = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMatchmaking_v009", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamMatchmaking_v009();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMatchmaking_v009();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetFavoriteGameCount( IntPtr self );
|
||||
private FGetFavoriteGameCount _GetFavoriteGameCount;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGameCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFavoriteGameCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetFavoriteGameCount()
|
||||
@@ -109,10 +32,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetFavoriteGame", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetFavoriteGame( IntPtr self, int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer );
|
||||
private FGetFavoriteGame _GetFavoriteGame;
|
||||
private static extern bool _GetFavoriteGame( IntPtr self, int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer );
|
||||
|
||||
#endregion
|
||||
internal bool GetFavoriteGame( int iGame, ref AppId pnAppID, ref uint pnIP, ref ushort pnConnPort, ref ushort pnQueryPort, ref uint punFlags, ref uint pRTime32LastPlayedOnServer )
|
||||
@@ -122,9 +44,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FAddFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer );
|
||||
private FAddFavoriteGame _AddFavoriteGame;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddFavoriteGame", CallingConvention = Platform.CC)]
|
||||
private static extern int _AddFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer );
|
||||
|
||||
#endregion
|
||||
internal int AddFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags, uint rTime32LastPlayedOnServer )
|
||||
@@ -134,10 +55,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RemoveFavoriteGame", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FRemoveFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags );
|
||||
private FRemoveFavoriteGame _RemoveFavoriteGame;
|
||||
private static extern bool _RemoveFavoriteGame( IntPtr self, AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags );
|
||||
|
||||
#endregion
|
||||
internal bool RemoveFavoriteGame( AppId nAppID, uint nIP, ushort nConnPort, ushort nQueryPort, uint unFlags )
|
||||
@@ -147,21 +67,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestLobbyList( IntPtr self );
|
||||
private FRequestLobbyList _RequestLobbyList;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyList", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestLobbyList( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal async Task<LobbyMatchList_t?> RequestLobbyList()
|
||||
internal CallResult<LobbyMatchList_t> RequestLobbyList()
|
||||
{
|
||||
var returnValue = _RequestLobbyList( Self );
|
||||
return await LobbyMatchList_t.GetResultAsync( returnValue );
|
||||
return new CallResult<LobbyMatchList_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListStringFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValueToMatch, LobbyComparison eComparisonType );
|
||||
private FAddRequestLobbyListStringFilter _AddRequestLobbyListStringFilter;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListStringFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListStringFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValueToMatch, LobbyComparison eComparisonType );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListStringFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValueToMatch, LobbyComparison eComparisonType )
|
||||
@@ -170,9 +88,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListNumericalFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType );
|
||||
private FAddRequestLobbyListNumericalFilter _AddRequestLobbyListNumericalFilter;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNumericalFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListNumericalFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListNumericalFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToMatch, LobbyComparison eComparisonType )
|
||||
@@ -181,9 +98,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListNearValueFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo );
|
||||
private FAddRequestLobbyListNearValueFilter _AddRequestLobbyListNearValueFilter;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListNearValueFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListNearValueFilter( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListNearValueFilter( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKeyToMatch, int nValueToBeCloseTo )
|
||||
@@ -192,9 +108,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListFilterSlotsAvailable( IntPtr self, int nSlotsAvailable );
|
||||
private FAddRequestLobbyListFilterSlotsAvailable _AddRequestLobbyListFilterSlotsAvailable;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListFilterSlotsAvailable( IntPtr self, int nSlotsAvailable );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable )
|
||||
@@ -203,9 +118,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListDistanceFilter( IntPtr self, LobbyDistanceFilter eLobbyDistanceFilter );
|
||||
private FAddRequestLobbyListDistanceFilter _AddRequestLobbyListDistanceFilter;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListDistanceFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListDistanceFilter( IntPtr self, LobbyDistanceFilter eLobbyDistanceFilter );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListDistanceFilter( LobbyDistanceFilter eLobbyDistanceFilter )
|
||||
@@ -214,9 +128,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListResultCountFilter( IntPtr self, int cMaxResults );
|
||||
private FAddRequestLobbyListResultCountFilter _AddRequestLobbyListResultCountFilter;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListResultCountFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListResultCountFilter( IntPtr self, int cMaxResults );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListResultCountFilter( int cMaxResults )
|
||||
@@ -225,9 +138,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAddRequestLobbyListCompatibleMembersFilter( IntPtr self, SteamId steamIDLobby );
|
||||
private FAddRequestLobbyListCompatibleMembersFilter _AddRequestLobbyListCompatibleMembersFilter;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddRequestLobbyListCompatibleMembersFilter( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal void AddRequestLobbyListCompatibleMembersFilter( SteamId steamIDLobby )
|
||||
@@ -236,55 +148,41 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetLobbyByIndex( IntPtr self, ref SteamId retVal, int iLobby );
|
||||
#else
|
||||
private delegate SteamId FGetLobbyByIndex( IntPtr self, int iLobby );
|
||||
#endif
|
||||
private FGetLobbyByIndex _GetLobbyByIndex;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetLobbyByIndex( IntPtr self, int iLobby );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetLobbyByIndex( int iLobby )
|
||||
{
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetLobbyByIndex( Self, ref retVal, iLobby );
|
||||
return retVal;
|
||||
#else
|
||||
var returnValue = _GetLobbyByIndex( Self, iLobby );
|
||||
return returnValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FCreateLobby( IntPtr self, LobbyType eLobbyType, int cMaxMembers );
|
||||
private FCreateLobby _CreateLobby;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_CreateLobby", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _CreateLobby( IntPtr self, LobbyType eLobbyType, int cMaxMembers );
|
||||
|
||||
#endregion
|
||||
internal async Task<LobbyCreated_t?> CreateLobby( LobbyType eLobbyType, int cMaxMembers )
|
||||
internal CallResult<LobbyCreated_t> CreateLobby( LobbyType eLobbyType, int cMaxMembers )
|
||||
{
|
||||
var returnValue = _CreateLobby( Self, eLobbyType, cMaxMembers );
|
||||
return await LobbyCreated_t.GetResultAsync( returnValue );
|
||||
return new CallResult<LobbyCreated_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FJoinLobby( IntPtr self, SteamId steamIDLobby );
|
||||
private FJoinLobby _JoinLobby;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_JoinLobby", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _JoinLobby( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal async Task<LobbyEnter_t?> JoinLobby( SteamId steamIDLobby )
|
||||
internal CallResult<LobbyEnter_t> JoinLobby( SteamId steamIDLobby )
|
||||
{
|
||||
var returnValue = _JoinLobby( Self, steamIDLobby );
|
||||
return await LobbyEnter_t.GetResultAsync( returnValue );
|
||||
return new CallResult<LobbyEnter_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FLeaveLobby( IntPtr self, SteamId steamIDLobby );
|
||||
private FLeaveLobby _LeaveLobby;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_LeaveLobby", CallingConvention = Platform.CC)]
|
||||
private static extern void _LeaveLobby( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal void LeaveLobby( SteamId steamIDLobby )
|
||||
@@ -293,10 +191,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_InviteUserToLobby", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FInviteUserToLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDInvitee );
|
||||
private FInviteUserToLobby _InviteUserToLobby;
|
||||
private static extern bool _InviteUserToLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDInvitee );
|
||||
|
||||
#endregion
|
||||
internal bool InviteUserToLobby( SteamId steamIDLobby, SteamId steamIDInvitee )
|
||||
@@ -306,9 +203,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetNumLobbyMembers( IntPtr self, SteamId steamIDLobby );
|
||||
private FGetNumLobbyMembers _GetNumLobbyMembers;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetNumLobbyMembers", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetNumLobbyMembers( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal int GetNumLobbyMembers( SteamId steamIDLobby )
|
||||
@@ -318,31 +214,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetLobbyMemberByIndex( IntPtr self, ref SteamId retVal, SteamId steamIDLobby, int iMember );
|
||||
#else
|
||||
private delegate SteamId FGetLobbyMemberByIndex( IntPtr self, SteamId steamIDLobby, int iMember );
|
||||
#endif
|
||||
private FGetLobbyMemberByIndex _GetLobbyMemberByIndex;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetLobbyMemberByIndex( IntPtr self, SteamId steamIDLobby, int iMember );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetLobbyMemberByIndex( SteamId steamIDLobby, int iMember )
|
||||
{
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetLobbyMemberByIndex( Self, ref retVal, steamIDLobby, iMember );
|
||||
return retVal;
|
||||
#else
|
||||
var returnValue = _GetLobbyMemberByIndex( Self, steamIDLobby, iMember );
|
||||
return returnValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
private FGetLobbyData _GetLobbyData;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyData", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal string GetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
@@ -352,10 +236,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
private FSetLobbyData _SetLobbyData;
|
||||
private static extern bool _SetLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
@@ -365,9 +248,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetLobbyDataCount( IntPtr self, SteamId steamIDLobby );
|
||||
private FGetLobbyDataCount _GetLobbyDataCount;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyDataCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetLobbyDataCount( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal int GetLobbyDataCount( SteamId steamIDLobby )
|
||||
@@ -377,10 +259,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyDataByIndex", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetLobbyDataByIndex( IntPtr self, SteamId steamIDLobby, int iLobbyData, IntPtr pchKey, int cchKeyBufferSize, IntPtr pchValue, int cchValueBufferSize );
|
||||
private FGetLobbyDataByIndex _GetLobbyDataByIndex;
|
||||
private static extern bool _GetLobbyDataByIndex( IntPtr self, SteamId steamIDLobby, int iLobbyData, IntPtr pchKey, int cchKeyBufferSize, IntPtr pchValue, int cchValueBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetLobbyDataByIndex( SteamId steamIDLobby, int iLobbyData, out string pchKey, out string pchValue )
|
||||
@@ -394,10 +275,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_DeleteLobbyData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDeleteLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
private FDeleteLobbyData _DeleteLobbyData;
|
||||
private static extern bool _DeleteLobbyData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal bool DeleteLobbyData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
@@ -407,9 +287,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetLobbyMemberData( IntPtr self, SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
private FGetLobbyMemberData _GetLobbyMemberData;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberData", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetLobbyMemberData( IntPtr self, SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal string GetLobbyMemberData( SteamId steamIDLobby, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
@@ -419,9 +298,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetLobbyMemberData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
private FSetLobbyMemberData _SetLobbyMemberData;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberData", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetLobbyMemberData( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
|
||||
#endregion
|
||||
internal void SetLobbyMemberData( SteamId steamIDLobby, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
@@ -430,10 +308,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SendLobbyChatMsg", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSendLobbyChatMsg( IntPtr self, SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody );
|
||||
private FSendLobbyChatMsg _SendLobbyChatMsg;
|
||||
private static extern bool _SendLobbyChatMsg( IntPtr self, SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody );
|
||||
|
||||
#endregion
|
||||
internal bool SendLobbyChatMsg( SteamId steamIDLobby, IntPtr pvMsgBody, int cubMsgBody )
|
||||
@@ -443,9 +320,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetLobbyChatEntry( IntPtr self, SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType );
|
||||
private FGetLobbyChatEntry _GetLobbyChatEntry;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyChatEntry", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetLobbyChatEntry( IntPtr self, SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType );
|
||||
|
||||
#endregion
|
||||
internal int GetLobbyChatEntry( SteamId steamIDLobby, int iChatID, ref SteamId pSteamIDUser, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType )
|
||||
@@ -455,10 +331,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_RequestLobbyData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FRequestLobbyData( IntPtr self, SteamId steamIDLobby );
|
||||
private FRequestLobbyData _RequestLobbyData;
|
||||
private static extern bool _RequestLobbyData( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal bool RequestLobbyData( SteamId steamIDLobby )
|
||||
@@ -468,9 +343,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetLobbyGameServer( IntPtr self, SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer );
|
||||
private FSetLobbyGameServer _SetLobbyGameServer;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyGameServer", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetLobbyGameServer( IntPtr self, SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer );
|
||||
|
||||
#endregion
|
||||
internal void SetLobbyGameServer( SteamId steamIDLobby, uint unGameServerIP, ushort unGameServerPort, SteamId steamIDGameServer )
|
||||
@@ -479,10 +353,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyGameServer", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetLobbyGameServer( IntPtr self, SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer );
|
||||
private FGetLobbyGameServer _GetLobbyGameServer;
|
||||
private static extern bool _GetLobbyGameServer( IntPtr self, SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer );
|
||||
|
||||
#endregion
|
||||
internal bool GetLobbyGameServer( SteamId steamIDLobby, ref uint punGameServerIP, ref ushort punGameServerPort, ref SteamId psteamIDGameServer )
|
||||
@@ -492,10 +365,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyMemberLimit", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby, int cMaxMembers );
|
||||
private FSetLobbyMemberLimit _SetLobbyMemberLimit;
|
||||
private static extern bool _SetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby, int cMaxMembers );
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyMemberLimit( SteamId steamIDLobby, int cMaxMembers )
|
||||
@@ -505,9 +377,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby );
|
||||
private FGetLobbyMemberLimit _GetLobbyMemberLimit;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyMemberLimit", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetLobbyMemberLimit( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal int GetLobbyMemberLimit( SteamId steamIDLobby )
|
||||
@@ -517,10 +388,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyType", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLobbyType( IntPtr self, SteamId steamIDLobby, LobbyType eLobbyType );
|
||||
private FSetLobbyType _SetLobbyType;
|
||||
private static extern bool _SetLobbyType( IntPtr self, SteamId steamIDLobby, LobbyType eLobbyType );
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyType( SteamId steamIDLobby, LobbyType eLobbyType )
|
||||
@@ -530,10 +400,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyJoinable", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLobbyJoinable( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable );
|
||||
private FSetLobbyJoinable _SetLobbyJoinable;
|
||||
private static extern bool _SetLobbyJoinable( IntPtr self, SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable );
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyJoinable( SteamId steamIDLobby, [MarshalAs( UnmanagedType.U1 )] bool bLobbyJoinable )
|
||||
@@ -543,32 +412,20 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetLobbyOwner( IntPtr self, ref SteamId retVal, SteamId steamIDLobby );
|
||||
#else
|
||||
private delegate SteamId FGetLobbyOwner( IntPtr self, SteamId steamIDLobby );
|
||||
#endif
|
||||
private FGetLobbyOwner _GetLobbyOwner;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_GetLobbyOwner", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetLobbyOwner( IntPtr self, SteamId steamIDLobby );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetLobbyOwner( SteamId steamIDLobby )
|
||||
{
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetLobbyOwner( Self, ref retVal, steamIDLobby );
|
||||
return retVal;
|
||||
#else
|
||||
var returnValue = _GetLobbyOwner( Self, steamIDLobby );
|
||||
return returnValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLobbyOwner", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLobbyOwner( IntPtr self, SteamId steamIDLobby, SteamId steamIDNewOwner );
|
||||
private FSetLobbyOwner _SetLobbyOwner;
|
||||
private static extern bool _SetLobbyOwner( IntPtr self, SteamId steamIDLobby, SteamId steamIDNewOwner );
|
||||
|
||||
#endregion
|
||||
internal bool SetLobbyOwner( SteamId steamIDLobby, SteamId steamIDNewOwner )
|
||||
@@ -578,10 +435,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmaking_SetLinkedLobby", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLinkedLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDLobbyDependent );
|
||||
private FSetLinkedLobby _SetLinkedLobby;
|
||||
private static extern bool _SetLinkedLobby( IntPtr self, SteamId steamIDLobby, SteamId steamIDLobbyDependent );
|
||||
|
||||
#endregion
|
||||
internal bool SetLinkedLobby( SteamId steamIDLobby, SteamId steamIDLobbyDependent )
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamMatchmakingPingResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingPingResponse( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPingResponse_ServerResponded", CallingConvention = Platform.CC)]
|
||||
private static extern void _ServerResponded( IntPtr self, ref gameserveritem_t server );
|
||||
|
||||
#endregion
|
||||
internal void ServerResponded( ref gameserveritem_t server )
|
||||
{
|
||||
_ServerResponded( Self, ref server );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPingResponse_ServerFailedToRespond", CallingConvention = Platform.CC)]
|
||||
private static extern void _ServerFailedToRespond( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void ServerFailedToRespond()
|
||||
{
|
||||
_ServerFailedToRespond( Self );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamMatchmakingPlayersResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingPlayersResponse( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPlayersResponse_AddPlayerToList", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddPlayerToList( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nScore, float flTimePlayed );
|
||||
|
||||
#endregion
|
||||
internal void AddPlayerToList( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nScore, float flTimePlayed )
|
||||
{
|
||||
_AddPlayerToList( Self, pchName, nScore, flTimePlayed );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPlayersResponse_PlayersFailedToRespond", CallingConvention = Platform.CC)]
|
||||
private static extern void _PlayersFailedToRespond( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void PlayersFailedToRespond()
|
||||
{
|
||||
_PlayersFailedToRespond( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingPlayersResponse_PlayersRefreshComplete", CallingConvention = Platform.CC)]
|
||||
private static extern void _PlayersRefreshComplete( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void PlayersRefreshComplete()
|
||||
{
|
||||
_PlayersRefreshComplete( Self );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamMatchmakingRulesResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingRulesResponse( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded", CallingConvention = Platform.CC)]
|
||||
private static extern void _RulesResponded( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRule, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
|
||||
#endregion
|
||||
internal void RulesResponded( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRule, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
{
|
||||
_RulesResponded( Self, pchRule, pchValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingRulesResponse_RulesFailedToRespond", CallingConvention = Platform.CC)]
|
||||
private static extern void _RulesFailedToRespond( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RulesFailedToRespond()
|
||||
{
|
||||
_RulesFailedToRespond( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingRulesResponse_RulesRefreshComplete", CallingConvention = Platform.CC)]
|
||||
private static extern void _RulesRefreshComplete( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RulesRefreshComplete()
|
||||
{
|
||||
_RulesRefreshComplete( Self );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamMatchmakingServerListResponse : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMatchmakingServerListResponse( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServerListResponse_ServerResponded", CallingConvention = Platform.CC)]
|
||||
private static extern void _ServerResponded( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
|
||||
#endregion
|
||||
internal void ServerResponded( HServerListRequest hRequest, int iServer )
|
||||
{
|
||||
_ServerResponded( Self, hRequest, iServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServerListResponse_ServerFailedToRespond", CallingConvention = Platform.CC)]
|
||||
private static extern void _ServerFailedToRespond( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
|
||||
#endregion
|
||||
internal void ServerFailedToRespond( HServerListRequest hRequest, int iServer )
|
||||
{
|
||||
_ServerFailedToRespond( Self, hRequest, iServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServerListResponse_RefreshComplete", CallingConvention = Platform.CC)]
|
||||
private static extern void _RefreshComplete( IntPtr self, HServerListRequest hRequest, MatchMakingServerResponse response );
|
||||
|
||||
#endregion
|
||||
internal void RefreshComplete( HServerListRequest hRequest, MatchMakingServerResponse response )
|
||||
{
|
||||
_RefreshComplete( Self, hRequest, response );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,55 +9,20 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamMatchmakingServers : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamMatchMakingServers002";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamMatchmakingServers( bool IsGameServer )
|
||||
{
|
||||
_RequestInternetServerList = Marshal.GetDelegateForFunctionPointer<FRequestInternetServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_RequestLANServerList = Marshal.GetDelegateForFunctionPointer<FRequestLANServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_RequestFriendsServerList = Marshal.GetDelegateForFunctionPointer<FRequestFriendsServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_RequestFavoritesServerList = Marshal.GetDelegateForFunctionPointer<FRequestFavoritesServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_RequestHistoryServerList = Marshal.GetDelegateForFunctionPointer<FRequestHistoryServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_RequestSpectatorServerList = Marshal.GetDelegateForFunctionPointer<FRequestSpectatorServerList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_ReleaseRequest = Marshal.GetDelegateForFunctionPointer<FReleaseRequest>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_GetServerDetails = Marshal.GetDelegateForFunctionPointer<FGetServerDetails>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_CancelQuery = Marshal.GetDelegateForFunctionPointer<FCancelQuery>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_RefreshQuery = Marshal.GetDelegateForFunctionPointer<FRefreshQuery>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_IsRefreshing = Marshal.GetDelegateForFunctionPointer<FIsRefreshing>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GetServerCount = Marshal.GetDelegateForFunctionPointer<FGetServerCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_RefreshServer = Marshal.GetDelegateForFunctionPointer<FRefreshServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_PingServer = Marshal.GetDelegateForFunctionPointer<FPingServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_PlayerDetails = Marshal.GetDelegateForFunctionPointer<FPlayerDetails>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_ServerRules = Marshal.GetDelegateForFunctionPointer<FServerRules>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_CancelServerQuery = Marshal.GetDelegateForFunctionPointer<FCancelServerQuery>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_RequestInternetServerList = null;
|
||||
_RequestLANServerList = null;
|
||||
_RequestFriendsServerList = null;
|
||||
_RequestFavoritesServerList = null;
|
||||
_RequestHistoryServerList = null;
|
||||
_RequestSpectatorServerList = null;
|
||||
_ReleaseRequest = null;
|
||||
_GetServerDetails = null;
|
||||
_CancelQuery = null;
|
||||
_RefreshQuery = null;
|
||||
_IsRefreshing = null;
|
||||
_GetServerCount = null;
|
||||
_RefreshServer = null;
|
||||
_PingServer = null;
|
||||
_PlayerDetails = null;
|
||||
_ServerRules = null;
|
||||
_CancelServerQuery = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMatchmakingServers_v002", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamMatchmakingServers_v002();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMatchmakingServers_v002();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerListRequest FRequestInternetServerList( IntPtr self, AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
private FRequestInternetServerList _RequestInternetServerList;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestInternetServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestInternetServerList( IntPtr self, AppId iApp, IntPtr ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestInternetServerList( AppId iApp, MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
@@ -95,9 +60,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerListRequest FRequestLANServerList( IntPtr self, AppId iApp, IntPtr pRequestServersResponse );
|
||||
private FRequestLANServerList _RequestLANServerList;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestLANServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestLANServerList( IntPtr self, AppId iApp, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestLANServerList( AppId iApp, IntPtr pRequestServersResponse )
|
||||
@@ -107,9 +71,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerListRequest FRequestFriendsServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
private FRequestFriendsServerList _RequestFriendsServerList;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestFriendsServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestFriendsServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestFriendsServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
@@ -119,9 +82,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerListRequest FRequestFavoritesServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
private FRequestFavoritesServerList _RequestFavoritesServerList;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestFavoritesServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestFavoritesServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestFavoritesServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
@@ -131,9 +93,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerListRequest FRequestHistoryServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
private FRequestHistoryServerList _RequestHistoryServerList;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestHistoryServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestHistoryServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestHistoryServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
@@ -143,9 +104,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerListRequest FRequestSpectatorServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
private FRequestSpectatorServerList _RequestSpectatorServerList;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RequestSpectatorServerList", CallingConvention = Platform.CC)]
|
||||
private static extern HServerListRequest _RequestSpectatorServerList( IntPtr self, AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerListRequest RequestSpectatorServerList( AppId iApp, [In,Out] ref MatchMakingKeyValuePair[] ppchFilters, uint nFilters, IntPtr pRequestServersResponse )
|
||||
@@ -155,9 +115,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FReleaseRequest( IntPtr self, HServerListRequest hServerListRequest );
|
||||
private FReleaseRequest _ReleaseRequest;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_ReleaseRequest", CallingConvention = Platform.CC)]
|
||||
private static extern void _ReleaseRequest( IntPtr self, HServerListRequest hServerListRequest );
|
||||
|
||||
#endregion
|
||||
internal void ReleaseRequest( HServerListRequest hServerListRequest )
|
||||
@@ -166,21 +125,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate IntPtr FGetServerDetails( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
private FGetServerDetails _GetServerDetails;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_GetServerDetails", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _GetServerDetails( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
|
||||
#endregion
|
||||
internal gameserveritem_t GetServerDetails( HServerListRequest hRequest, int iServer )
|
||||
{
|
||||
var returnValue = _GetServerDetails( Self, hRequest, iServer );
|
||||
return gameserveritem_t.Fill( returnValue );
|
||||
return returnValue.ToType<gameserveritem_t>();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FCancelQuery( IntPtr self, HServerListRequest hRequest );
|
||||
private FCancelQuery _CancelQuery;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelQuery", CallingConvention = Platform.CC)]
|
||||
private static extern void _CancelQuery( IntPtr self, HServerListRequest hRequest );
|
||||
|
||||
#endregion
|
||||
internal void CancelQuery( HServerListRequest hRequest )
|
||||
@@ -189,9 +146,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRefreshQuery( IntPtr self, HServerListRequest hRequest );
|
||||
private FRefreshQuery _RefreshQuery;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RefreshQuery", CallingConvention = Platform.CC)]
|
||||
private static extern void _RefreshQuery( IntPtr self, HServerListRequest hRequest );
|
||||
|
||||
#endregion
|
||||
internal void RefreshQuery( HServerListRequest hRequest )
|
||||
@@ -200,10 +156,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_IsRefreshing", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsRefreshing( IntPtr self, HServerListRequest hRequest );
|
||||
private FIsRefreshing _IsRefreshing;
|
||||
private static extern bool _IsRefreshing( IntPtr self, HServerListRequest hRequest );
|
||||
|
||||
#endregion
|
||||
internal bool IsRefreshing( HServerListRequest hRequest )
|
||||
@@ -213,9 +168,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetServerCount( IntPtr self, HServerListRequest hRequest );
|
||||
private FGetServerCount _GetServerCount;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_GetServerCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetServerCount( IntPtr self, HServerListRequest hRequest );
|
||||
|
||||
#endregion
|
||||
internal int GetServerCount( HServerListRequest hRequest )
|
||||
@@ -225,9 +179,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRefreshServer( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
private FRefreshServer _RefreshServer;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_RefreshServer", CallingConvention = Platform.CC)]
|
||||
private static extern void _RefreshServer( IntPtr self, HServerListRequest hRequest, int iServer );
|
||||
|
||||
#endregion
|
||||
internal void RefreshServer( HServerListRequest hRequest, int iServer )
|
||||
@@ -236,9 +189,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerQuery FPingServer( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
private FPingServer _PingServer;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_PingServer", CallingConvention = Platform.CC)]
|
||||
private static extern HServerQuery _PingServer( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerQuery PingServer( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
|
||||
@@ -248,9 +200,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerQuery FPlayerDetails( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
private FPlayerDetails _PlayerDetails;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_PlayerDetails", CallingConvention = Platform.CC)]
|
||||
private static extern HServerQuery _PlayerDetails( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerQuery PlayerDetails( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
|
||||
@@ -260,9 +211,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HServerQuery FServerRules( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
private FServerRules _ServerRules;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_ServerRules", CallingConvention = Platform.CC)]
|
||||
private static extern HServerQuery _ServerRules( IntPtr self, uint unIP, ushort usPort, IntPtr pRequestServersResponse );
|
||||
|
||||
#endregion
|
||||
internal HServerQuery ServerRules( uint unIP, ushort usPort, IntPtr pRequestServersResponse )
|
||||
@@ -272,9 +222,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FCancelServerQuery( IntPtr self, HServerQuery hServerQuery );
|
||||
private FCancelServerQuery _CancelServerQuery;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMatchmakingServers_CancelServerQuery", CallingConvention = Platform.CC)]
|
||||
private static extern void _CancelServerQuery( IntPtr self, HServerQuery hServerQuery );
|
||||
|
||||
#endregion
|
||||
internal void CancelServerQuery( HServerQuery hServerQuery )
|
||||
|
||||
@@ -9,40 +9,21 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamMusic : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMMUSIC_INTERFACE_VERSION001";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamMusic( bool IsGameServer )
|
||||
{
|
||||
_BIsEnabled = Marshal.GetDelegateForFunctionPointer<FBIsEnabled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_BIsPlaying = Marshal.GetDelegateForFunctionPointer<FBIsPlaying>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetPlaybackStatus = Marshal.GetDelegateForFunctionPointer<FGetPlaybackStatus>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_Play = Marshal.GetDelegateForFunctionPointer<FPlay>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_Pause = Marshal.GetDelegateForFunctionPointer<FPause>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_PlayPrevious = Marshal.GetDelegateForFunctionPointer<FPlayPrevious>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_PlayNext = Marshal.GetDelegateForFunctionPointer<FPlayNext>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_SetVolume = Marshal.GetDelegateForFunctionPointer<FSetVolume>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_GetVolume = Marshal.GetDelegateForFunctionPointer<FGetVolume>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_BIsEnabled = null;
|
||||
_BIsPlaying = null;
|
||||
_GetPlaybackStatus = null;
|
||||
_Play = null;
|
||||
_Pause = null;
|
||||
_PlayPrevious = null;
|
||||
_PlayNext = null;
|
||||
_SetVolume = null;
|
||||
_GetVolume = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMusic_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamMusic_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMusic_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_BIsEnabled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsEnabled( IntPtr self );
|
||||
private FBIsEnabled _BIsEnabled;
|
||||
private static extern bool _BIsEnabled( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsEnabled()
|
||||
@@ -52,10 +33,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_BIsPlaying", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsPlaying( IntPtr self );
|
||||
private FBIsPlaying _BIsPlaying;
|
||||
private static extern bool _BIsPlaying( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsPlaying()
|
||||
@@ -65,9 +45,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate MusicStatus FGetPlaybackStatus( IntPtr self );
|
||||
private FGetPlaybackStatus _GetPlaybackStatus;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_GetPlaybackStatus", CallingConvention = Platform.CC)]
|
||||
private static extern MusicStatus _GetPlaybackStatus( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal MusicStatus GetPlaybackStatus()
|
||||
@@ -77,9 +56,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FPlay( IntPtr self );
|
||||
private FPlay _Play;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_Play", CallingConvention = Platform.CC)]
|
||||
private static extern void _Play( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void Play()
|
||||
@@ -88,9 +66,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FPause( IntPtr self );
|
||||
private FPause _Pause;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_Pause", CallingConvention = Platform.CC)]
|
||||
private static extern void _Pause( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void Pause()
|
||||
@@ -99,9 +76,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FPlayPrevious( IntPtr self );
|
||||
private FPlayPrevious _PlayPrevious;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_PlayPrevious", CallingConvention = Platform.CC)]
|
||||
private static extern void _PlayPrevious( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void PlayPrevious()
|
||||
@@ -110,9 +86,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FPlayNext( IntPtr self );
|
||||
private FPlayNext _PlayNext;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_PlayNext", CallingConvention = Platform.CC)]
|
||||
private static extern void _PlayNext( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void PlayNext()
|
||||
@@ -121,9 +96,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetVolume( IntPtr self, float flVolume );
|
||||
private FSetVolume _SetVolume;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_SetVolume", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetVolume( IntPtr self, float flVolume );
|
||||
|
||||
#endregion
|
||||
internal void SetVolume( float flVolume )
|
||||
@@ -132,9 +106,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate float FGetVolume( IntPtr self );
|
||||
private FGetVolume _GetVolume;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusic_GetVolume", CallingConvention = Platform.CC)]
|
||||
private static extern float _GetVolume( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal float GetVolume()
|
||||
|
||||
@@ -0,0 +1,408 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamMusicRemote : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamMusicRemote( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamMusicRemote_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamMusicRemote_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamMusicRemote_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_RegisterSteamMusicRemote", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _RegisterSteamMusicRemote( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
|
||||
#endregion
|
||||
internal bool RegisterSteamMusicRemote( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
{
|
||||
var returnValue = _RegisterSteamMusicRemote( Self, pchName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_DeregisterSteamMusicRemote", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _DeregisterSteamMusicRemote( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool DeregisterSteamMusicRemote()
|
||||
{
|
||||
var returnValue = _DeregisterSteamMusicRemote( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_BIsCurrentMusicRemote", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BIsCurrentMusicRemote( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsCurrentMusicRemote()
|
||||
{
|
||||
var returnValue = _BIsCurrentMusicRemote( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_BActivationSuccess", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BActivationSuccess( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool BActivationSuccess( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _BActivationSuccess( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetDisplayName", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetDisplayName( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDisplayName );
|
||||
|
||||
#endregion
|
||||
internal bool SetDisplayName( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDisplayName )
|
||||
{
|
||||
var returnValue = _SetDisplayName( Self, pchDisplayName );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetPNGIcon_64x64", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetPNGIcon_64x64( IntPtr self, IntPtr pvBuffer, uint cbBufferLength );
|
||||
|
||||
#endregion
|
||||
internal bool SetPNGIcon_64x64( IntPtr pvBuffer, uint cbBufferLength )
|
||||
{
|
||||
var returnValue = _SetPNGIcon_64x64( Self, pvBuffer, cbBufferLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlayPrevious", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnablePlayPrevious( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnablePlayPrevious( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnablePlayPrevious( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlayNext", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnablePlayNext( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnablePlayNext( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnablePlayNext( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableShuffled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnableShuffled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnableShuffled( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnableShuffled( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableLooped", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnableLooped( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnableLooped( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnableLooped( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnableQueue", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnableQueue( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnableQueue( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnableQueue( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_EnablePlaylists", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _EnablePlaylists( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool EnablePlaylists( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _EnablePlaylists( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdatePlaybackStatus", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdatePlaybackStatus( IntPtr self, MusicStatus nStatus );
|
||||
|
||||
#endregion
|
||||
internal bool UpdatePlaybackStatus( MusicStatus nStatus )
|
||||
{
|
||||
var returnValue = _UpdatePlaybackStatus( Self, nStatus );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateShuffled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateShuffled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateShuffled( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _UpdateShuffled( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateLooped", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateLooped( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bValue );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateLooped( [MarshalAs( UnmanagedType.U1 )] bool bValue )
|
||||
{
|
||||
var returnValue = _UpdateLooped( Self, bValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateVolume", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateVolume( IntPtr self, float flValue );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateVolume( float flValue )
|
||||
{
|
||||
var returnValue = _UpdateVolume( Self, flValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryWillChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CurrentEntryWillChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool CurrentEntryWillChange()
|
||||
{
|
||||
var returnValue = _CurrentEntryWillChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryIsAvailable", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CurrentEntryIsAvailable( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAvailable );
|
||||
|
||||
#endregion
|
||||
internal bool CurrentEntryIsAvailable( [MarshalAs( UnmanagedType.U1 )] bool bAvailable )
|
||||
{
|
||||
var returnValue = _CurrentEntryIsAvailable( Self, bAvailable );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryText", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateCurrentEntryText( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateCurrentEntryText( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchText )
|
||||
{
|
||||
var returnValue = _UpdateCurrentEntryText( Self, pchText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryElapsedSeconds", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateCurrentEntryElapsedSeconds( IntPtr self, int nValue );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateCurrentEntryElapsedSeconds( int nValue )
|
||||
{
|
||||
var returnValue = _UpdateCurrentEntryElapsedSeconds( Self, nValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_UpdateCurrentEntryCoverArt", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _UpdateCurrentEntryCoverArt( IntPtr self, IntPtr pvBuffer, uint cbBufferLength );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateCurrentEntryCoverArt( IntPtr pvBuffer, uint cbBufferLength )
|
||||
{
|
||||
var returnValue = _UpdateCurrentEntryCoverArt( Self, pvBuffer, cbBufferLength );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_CurrentEntryDidChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _CurrentEntryDidChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool CurrentEntryDidChange()
|
||||
{
|
||||
var returnValue = _CurrentEntryDidChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_QueueWillChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _QueueWillChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool QueueWillChange()
|
||||
{
|
||||
var returnValue = _QueueWillChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_ResetQueueEntries", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ResetQueueEntries( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool ResetQueueEntries()
|
||||
{
|
||||
var returnValue = _ResetQueueEntries( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetQueueEntry", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetQueueEntry( IntPtr self, int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText );
|
||||
|
||||
#endregion
|
||||
internal bool SetQueueEntry( int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText )
|
||||
{
|
||||
var returnValue = _SetQueueEntry( Self, nID, nPosition, pchEntryText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetCurrentQueueEntry", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetCurrentQueueEntry( IntPtr self, int nID );
|
||||
|
||||
#endregion
|
||||
internal bool SetCurrentQueueEntry( int nID )
|
||||
{
|
||||
var returnValue = _SetCurrentQueueEntry( Self, nID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_QueueDidChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _QueueDidChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool QueueDidChange()
|
||||
{
|
||||
var returnValue = _QueueDidChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_PlaylistWillChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _PlaylistWillChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool PlaylistWillChange()
|
||||
{
|
||||
var returnValue = _PlaylistWillChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_ResetPlaylistEntries", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ResetPlaylistEntries( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool ResetPlaylistEntries()
|
||||
{
|
||||
var returnValue = _ResetPlaylistEntries( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetPlaylistEntry", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetPlaylistEntry( IntPtr self, int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText );
|
||||
|
||||
#endregion
|
||||
internal bool SetPlaylistEntry( int nID, int nPosition, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchEntryText )
|
||||
{
|
||||
var returnValue = _SetPlaylistEntry( Self, nID, nPosition, pchEntryText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_SetCurrentPlaylistEntry", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetCurrentPlaylistEntry( IntPtr self, int nID );
|
||||
|
||||
#endregion
|
||||
internal bool SetCurrentPlaylistEntry( int nID )
|
||||
{
|
||||
var returnValue = _SetCurrentPlaylistEntry( Self, nID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamMusicRemote_PlaylistDidChange", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _PlaylistDidChange( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool PlaylistDidChange()
|
||||
{
|
||||
var returnValue = _PlaylistDidChange( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,66 +9,24 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamNetworking : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamNetworking005";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamNetworking( bool IsGameServer )
|
||||
{
|
||||
_SendP2PPacket = Marshal.GetDelegateForFunctionPointer<FSendP2PPacket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_IsP2PPacketAvailable = Marshal.GetDelegateForFunctionPointer<FIsP2PPacketAvailable>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_ReadP2PPacket = Marshal.GetDelegateForFunctionPointer<FReadP2PPacket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_AcceptP2PSessionWithUser = Marshal.GetDelegateForFunctionPointer<FAcceptP2PSessionWithUser>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_CloseP2PSessionWithUser = Marshal.GetDelegateForFunctionPointer<FCloseP2PSessionWithUser>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_CloseP2PChannelWithUser = Marshal.GetDelegateForFunctionPointer<FCloseP2PChannelWithUser>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetP2PSessionState = Marshal.GetDelegateForFunctionPointer<FGetP2PSessionState>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_AllowP2PPacketRelay = Marshal.GetDelegateForFunctionPointer<FAllowP2PPacketRelay>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_CreateListenSocket = Marshal.GetDelegateForFunctionPointer<FCreateListenSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_CreateP2PConnectionSocket = Marshal.GetDelegateForFunctionPointer<FCreateP2PConnectionSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_CreateConnectionSocket = Marshal.GetDelegateForFunctionPointer<FCreateConnectionSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_DestroySocket = Marshal.GetDelegateForFunctionPointer<FDestroySocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_DestroyListenSocket = Marshal.GetDelegateForFunctionPointer<FDestroyListenSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_SendDataOnSocket = Marshal.GetDelegateForFunctionPointer<FSendDataOnSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_IsDataAvailableOnSocket = Marshal.GetDelegateForFunctionPointer<FIsDataAvailableOnSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_RetrieveDataFromSocket = Marshal.GetDelegateForFunctionPointer<FRetrieveDataFromSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_IsDataAvailable = Marshal.GetDelegateForFunctionPointer<FIsDataAvailable>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_RetrieveData = Marshal.GetDelegateForFunctionPointer<FRetrieveData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetSocketInfo = Marshal.GetDelegateForFunctionPointer<FGetSocketInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_GetListenSocketInfo = Marshal.GetDelegateForFunctionPointer<FGetListenSocketInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetSocketConnectionType = Marshal.GetDelegateForFunctionPointer<FGetSocketConnectionType>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetMaxPacketSize = Marshal.GetDelegateForFunctionPointer<FGetMaxPacketSize>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_SendP2PPacket = null;
|
||||
_IsP2PPacketAvailable = null;
|
||||
_ReadP2PPacket = null;
|
||||
_AcceptP2PSessionWithUser = null;
|
||||
_CloseP2PSessionWithUser = null;
|
||||
_CloseP2PChannelWithUser = null;
|
||||
_GetP2PSessionState = null;
|
||||
_AllowP2PPacketRelay = null;
|
||||
_CreateListenSocket = null;
|
||||
_CreateP2PConnectionSocket = null;
|
||||
_CreateConnectionSocket = null;
|
||||
_DestroySocket = null;
|
||||
_DestroyListenSocket = null;
|
||||
_SendDataOnSocket = null;
|
||||
_IsDataAvailableOnSocket = null;
|
||||
_RetrieveDataFromSocket = null;
|
||||
_IsDataAvailable = null;
|
||||
_RetrieveData = null;
|
||||
_GetSocketInfo = null;
|
||||
_GetListenSocketInfo = null;
|
||||
_GetSocketConnectionType = null;
|
||||
_GetMaxPacketSize = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworking_v006", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamNetworking_v006();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamNetworking_v006();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerNetworking_v006", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerNetworking_v006();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerNetworking_v006();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_SendP2PPacket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSendP2PPacket( IntPtr self, SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel );
|
||||
private FSendP2PPacket _SendP2PPacket;
|
||||
private static extern bool _SendP2PPacket( IntPtr self, SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel );
|
||||
|
||||
#endregion
|
||||
internal bool SendP2PPacket( SteamId steamIDRemote, IntPtr pubData, uint cubData, P2PSend eP2PSendType, int nChannel )
|
||||
@@ -78,10 +36,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_IsP2PPacketAvailable", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsP2PPacketAvailable( IntPtr self, ref uint pcubMsgSize, int nChannel );
|
||||
private FIsP2PPacketAvailable _IsP2PPacketAvailable;
|
||||
private static extern bool _IsP2PPacketAvailable( IntPtr self, ref uint pcubMsgSize, int nChannel );
|
||||
|
||||
#endregion
|
||||
internal bool IsP2PPacketAvailable( ref uint pcubMsgSize, int nChannel )
|
||||
@@ -91,10 +48,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_ReadP2PPacket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FReadP2PPacket( IntPtr self, IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref SteamId psteamIDRemote, int nChannel );
|
||||
private FReadP2PPacket _ReadP2PPacket;
|
||||
private static extern bool _ReadP2PPacket( IntPtr self, IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref SteamId psteamIDRemote, int nChannel );
|
||||
|
||||
#endregion
|
||||
internal bool ReadP2PPacket( IntPtr pubDest, uint cubDest, ref uint pcubMsgSize, ref SteamId psteamIDRemote, int nChannel )
|
||||
@@ -104,10 +60,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_AcceptP2PSessionWithUser", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FAcceptP2PSessionWithUser( IntPtr self, SteamId steamIDRemote );
|
||||
private FAcceptP2PSessionWithUser _AcceptP2PSessionWithUser;
|
||||
private static extern bool _AcceptP2PSessionWithUser( IntPtr self, SteamId steamIDRemote );
|
||||
|
||||
#endregion
|
||||
internal bool AcceptP2PSessionWithUser( SteamId steamIDRemote )
|
||||
@@ -117,10 +72,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CloseP2PSessionWithUser", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCloseP2PSessionWithUser( IntPtr self, SteamId steamIDRemote );
|
||||
private FCloseP2PSessionWithUser _CloseP2PSessionWithUser;
|
||||
private static extern bool _CloseP2PSessionWithUser( IntPtr self, SteamId steamIDRemote );
|
||||
|
||||
#endregion
|
||||
internal bool CloseP2PSessionWithUser( SteamId steamIDRemote )
|
||||
@@ -130,10 +84,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_CloseP2PChannelWithUser", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCloseP2PChannelWithUser( IntPtr self, SteamId steamIDRemote, int nChannel );
|
||||
private FCloseP2PChannelWithUser _CloseP2PChannelWithUser;
|
||||
private static extern bool _CloseP2PChannelWithUser( IntPtr self, SteamId steamIDRemote, int nChannel );
|
||||
|
||||
#endregion
|
||||
internal bool CloseP2PChannelWithUser( SteamId steamIDRemote, int nChannel )
|
||||
@@ -143,10 +96,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_GetP2PSessionState", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetP2PSessionState( IntPtr self, SteamId steamIDRemote, ref P2PSessionState_t pConnectionState );
|
||||
private FGetP2PSessionState _GetP2PSessionState;
|
||||
private static extern bool _GetP2PSessionState( IntPtr self, SteamId steamIDRemote, ref P2PSessionState_t pConnectionState );
|
||||
|
||||
#endregion
|
||||
internal bool GetP2PSessionState( SteamId steamIDRemote, ref P2PSessionState_t pConnectionState )
|
||||
@@ -156,10 +108,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworking_AllowP2PPacketRelay", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FAllowP2PPacketRelay( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllow );
|
||||
private FAllowP2PPacketRelay _AllowP2PPacketRelay;
|
||||
private static extern bool _AllowP2PPacketRelay( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAllow );
|
||||
|
||||
#endregion
|
||||
internal bool AllowP2PPacketRelay( [MarshalAs( UnmanagedType.U1 )] bool bAllow )
|
||||
@@ -169,21 +120,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SNetListenSocket_t FCreateListenSocket( IntPtr self, int nVirtualP2PPort, uint nIP, ushort nPort, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay );
|
||||
private FCreateListenSocket _CreateListenSocket;
|
||||
|
||||
#endregion
|
||||
internal SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort, uint nIP, ushort nPort, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay )
|
||||
{
|
||||
var returnValue = _CreateListenSocket( Self, nVirtualP2PPort, nIP, nPort, bAllowUseOfPacketRelay );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SNetSocket_t FCreateP2PConnectionSocket( IntPtr self, SteamId steamIDTarget, int nVirtualPort, int nTimeoutSec, [MarshalAs( UnmanagedType.U1 )] bool bAllowUseOfPacketRelay );
|
||||
private FCreateP2PConnectionSocket _CreateP2PConnectionSocket;
|
||||
[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 )
|
||||
@@ -192,158 +130,5 @@ namespace Steamworks
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SNetSocket_t FCreateConnectionSocket( IntPtr self, uint nIP, ushort nPort, int nTimeoutSec );
|
||||
private FCreateConnectionSocket _CreateConnectionSocket;
|
||||
|
||||
#endregion
|
||||
internal SNetSocket_t CreateConnectionSocket( uint nIP, ushort nPort, int nTimeoutSec )
|
||||
{
|
||||
var returnValue = _CreateConnectionSocket( Self, nIP, nPort, nTimeoutSec );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDestroySocket( IntPtr self, SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd );
|
||||
private FDestroySocket _DestroySocket;
|
||||
|
||||
#endregion
|
||||
internal bool DestroySocket( SNetSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd )
|
||||
{
|
||||
var returnValue = _DestroySocket( Self, hSocket, bNotifyRemoteEnd );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDestroyListenSocket( IntPtr self, SNetListenSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd );
|
||||
private FDestroyListenSocket _DestroyListenSocket;
|
||||
|
||||
#endregion
|
||||
internal bool DestroyListenSocket( SNetListenSocket_t hSocket, [MarshalAs( UnmanagedType.U1 )] bool bNotifyRemoteEnd )
|
||||
{
|
||||
var returnValue = _DestroyListenSocket( Self, hSocket, bNotifyRemoteEnd );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSendDataOnSocket( IntPtr self, SNetSocket_t hSocket, [In,Out] IntPtr[] pubData, uint cubData, [MarshalAs( UnmanagedType.U1 )] bool bReliable );
|
||||
private FSendDataOnSocket _SendDataOnSocket;
|
||||
|
||||
#endregion
|
||||
internal bool SendDataOnSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] pubData, uint cubData, [MarshalAs( UnmanagedType.U1 )] bool bReliable )
|
||||
{
|
||||
var returnValue = _SendDataOnSocket( Self, hSocket, pubData, cubData, bReliable );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsDataAvailableOnSocket( IntPtr self, SNetSocket_t hSocket, ref uint pcubMsgSize );
|
||||
private FIsDataAvailableOnSocket _IsDataAvailableOnSocket;
|
||||
|
||||
#endregion
|
||||
internal bool IsDataAvailableOnSocket( SNetSocket_t hSocket, ref uint pcubMsgSize )
|
||||
{
|
||||
var returnValue = _IsDataAvailableOnSocket( Self, hSocket, ref pcubMsgSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FRetrieveDataFromSocket( IntPtr self, SNetSocket_t hSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize );
|
||||
private FRetrieveDataFromSocket _RetrieveDataFromSocket;
|
||||
|
||||
#endregion
|
||||
internal bool RetrieveDataFromSocket( SNetSocket_t hSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize )
|
||||
{
|
||||
var returnValue = _RetrieveDataFromSocket( Self, hSocket, pubDest, cubDest, ref pcubMsgSize );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsDataAvailable( IntPtr self, SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket );
|
||||
private FIsDataAvailable _IsDataAvailable;
|
||||
|
||||
#endregion
|
||||
internal bool IsDataAvailable( SNetListenSocket_t hListenSocket, ref uint pcubMsgSize, ref SNetSocket_t phSocket )
|
||||
{
|
||||
var returnValue = _IsDataAvailable( Self, hListenSocket, ref pcubMsgSize, ref phSocket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FRetrieveData( IntPtr self, SNetListenSocket_t hListenSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize, ref SNetSocket_t phSocket );
|
||||
private FRetrieveData _RetrieveData;
|
||||
|
||||
#endregion
|
||||
internal bool RetrieveData( SNetListenSocket_t hListenSocket, [In,Out] IntPtr[] pubDest, uint cubDest, ref uint pcubMsgSize, ref SNetSocket_t phSocket )
|
||||
{
|
||||
var returnValue = _RetrieveData( Self, hListenSocket, pubDest, cubDest, ref pcubMsgSize, ref phSocket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetSocketInfo( IntPtr self, SNetSocket_t hSocket, ref SteamId pSteamIDRemote, ref int peSocketStatus, ref uint punIPRemote, ref ushort punPortRemote );
|
||||
private FGetSocketInfo _GetSocketInfo;
|
||||
|
||||
#endregion
|
||||
internal bool GetSocketInfo( SNetSocket_t hSocket, ref SteamId pSteamIDRemote, ref int peSocketStatus, ref uint punIPRemote, ref ushort punPortRemote )
|
||||
{
|
||||
var returnValue = _GetSocketInfo( Self, hSocket, ref pSteamIDRemote, ref peSocketStatus, ref punIPRemote, ref punPortRemote );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetListenSocketInfo( IntPtr self, SNetListenSocket_t hListenSocket, ref uint pnIP, ref ushort pnPort );
|
||||
private FGetListenSocketInfo _GetListenSocketInfo;
|
||||
|
||||
#endregion
|
||||
internal bool GetListenSocketInfo( SNetListenSocket_t hListenSocket, ref uint pnIP, ref ushort pnPort )
|
||||
{
|
||||
var returnValue = _GetListenSocketInfo( Self, hListenSocket, ref pnIP, ref pnPort );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SNetSocketConnectionType FGetSocketConnectionType( IntPtr self, SNetSocket_t hSocket );
|
||||
private FGetSocketConnectionType _GetSocketConnectionType;
|
||||
|
||||
#endregion
|
||||
internal SNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket )
|
||||
{
|
||||
var returnValue = _GetSocketConnectionType( Self, hSocket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetMaxPacketSize( IntPtr self, SNetSocket_t hSocket );
|
||||
private FGetMaxPacketSize _GetMaxPacketSize;
|
||||
|
||||
#endregion
|
||||
internal int GetMaxPacketSize( SNetSocket_t hSocket )
|
||||
{
|
||||
var returnValue = _GetMaxPacketSize( Self, hSocket );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamNetworkingConnectionCustomSignaling : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworkingConnectionCustomSignaling( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingConnectionCustomSignaling_SendSignal", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SendSignal( IntPtr self, Connection hConn, ref ConnectionInfo info, IntPtr pMsg, int cbMsg );
|
||||
|
||||
#endregion
|
||||
internal bool SendSignal( Connection hConn, ref ConnectionInfo info, IntPtr pMsg, int cbMsg )
|
||||
{
|
||||
var returnValue = _SendSignal( Self, hConn, ref info, pMsg, cbMsg );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingConnectionCustomSignaling_Release", CallingConvention = Platform.CC)]
|
||||
private static extern void _Release( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void Release()
|
||||
{
|
||||
_Release( Self );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamNetworkingCustomSignalingRecvContext : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamNetworkingCustomSignalingRecvContext( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingCustomSignalingRecvContext_OnConnectRequest", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _OnConnectRequest( IntPtr self, Connection hConn, ref NetIdentity identityPeer );
|
||||
|
||||
#endregion
|
||||
internal IntPtr OnConnectRequest( Connection hConn, ref NetIdentity identityPeer )
|
||||
{
|
||||
var returnValue = _OnConnectRequest( Self, hConn, ref identityPeer );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingCustomSignalingRecvContext_SendRejectionSignal", CallingConvention = Platform.CC)]
|
||||
private static extern void _SendRejectionSignal( IntPtr self, ref NetIdentity identityPeer, IntPtr pMsg, int cbMsg );
|
||||
|
||||
#endregion
|
||||
internal void SendRejectionSignal( ref NetIdentity identityPeer, IntPtr pMsg, int cbMsg )
|
||||
{
|
||||
_SendRejectionSignal( Self, ref identityPeer, pMsg, cbMsg );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,127 +9,67 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamNetworkingSockets : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamNetworkingSockets002";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamNetworkingSockets( bool IsGameServer )
|
||||
{
|
||||
_CreateListenSocketIP = Marshal.GetDelegateForFunctionPointer<FCreateListenSocketIP>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_ConnectByIPAddress = Marshal.GetDelegateForFunctionPointer<FConnectByIPAddress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_CreateListenSocketP2P = Marshal.GetDelegateForFunctionPointer<FCreateListenSocketP2P>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_ConnectP2P = Marshal.GetDelegateForFunctionPointer<FConnectP2P>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_AcceptConnection = Marshal.GetDelegateForFunctionPointer<FAcceptConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_CloseConnection = Marshal.GetDelegateForFunctionPointer<FCloseConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_CloseListenSocket = Marshal.GetDelegateForFunctionPointer<FCloseListenSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_SetConnectionUserData = Marshal.GetDelegateForFunctionPointer<FSetConnectionUserData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_GetConnectionUserData = Marshal.GetDelegateForFunctionPointer<FGetConnectionUserData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_SetConnectionName = Marshal.GetDelegateForFunctionPointer<FSetConnectionName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetConnectionName = Marshal.GetDelegateForFunctionPointer<FGetConnectionName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_SendMessageToConnection = Marshal.GetDelegateForFunctionPointer<FSendMessageToConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_FlushMessagesOnConnection = Marshal.GetDelegateForFunctionPointer<FFlushMessagesOnConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_ReceiveMessagesOnConnection = Marshal.GetDelegateForFunctionPointer<FReceiveMessagesOnConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_ReceiveMessagesOnListenSocket = Marshal.GetDelegateForFunctionPointer<FReceiveMessagesOnListenSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetConnectionInfo = Marshal.GetDelegateForFunctionPointer<FGetConnectionInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_GetQuickConnectionStatus = Marshal.GetDelegateForFunctionPointer<FGetQuickConnectionStatus>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetDetailedConnectionStatus = Marshal.GetDelegateForFunctionPointer<FGetDetailedConnectionStatus>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetListenSocketAddress = Marshal.GetDelegateForFunctionPointer<FGetListenSocketAddress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_CreateSocketPair = Marshal.GetDelegateForFunctionPointer<FCreateSocketPair>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetIdentity = Marshal.GetDelegateForFunctionPointer<FGetIdentity>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_ReceivedRelayAuthTicket = Marshal.GetDelegateForFunctionPointer<FReceivedRelayAuthTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_FindRelayAuthTicketForServer = Marshal.GetDelegateForFunctionPointer<FFindRelayAuthTicketForServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_ConnectToHostedDedicatedServer = Marshal.GetDelegateForFunctionPointer<FConnectToHostedDedicatedServer>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_GetHostedDedicatedServerPort = Marshal.GetDelegateForFunctionPointer<FGetHostedDedicatedServerPort>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_GetHostedDedicatedServerPOPID = Marshal.GetDelegateForFunctionPointer<FGetHostedDedicatedServerPOPID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_GetHostedDedicatedServerAddress = Marshal.GetDelegateForFunctionPointer<FGetHostedDedicatedServerAddress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_CreateHostedDedicatedServerListenSocket = Marshal.GetDelegateForFunctionPointer<FCreateHostedDedicatedServerListenSocket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_RunCallbacks = Marshal.GetDelegateForFunctionPointer<FRunCallbacks>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_CreateListenSocketIP = null;
|
||||
_ConnectByIPAddress = null;
|
||||
_CreateListenSocketP2P = null;
|
||||
_ConnectP2P = null;
|
||||
_AcceptConnection = null;
|
||||
_CloseConnection = null;
|
||||
_CloseListenSocket = null;
|
||||
_SetConnectionUserData = null;
|
||||
_GetConnectionUserData = null;
|
||||
_SetConnectionName = null;
|
||||
_GetConnectionName = null;
|
||||
_SendMessageToConnection = null;
|
||||
_FlushMessagesOnConnection = null;
|
||||
_ReceiveMessagesOnConnection = null;
|
||||
_ReceiveMessagesOnListenSocket = null;
|
||||
_GetConnectionInfo = null;
|
||||
_GetQuickConnectionStatus = null;
|
||||
_GetDetailedConnectionStatus = null;
|
||||
_GetListenSocketAddress = null;
|
||||
_CreateSocketPair = null;
|
||||
_GetIdentity = null;
|
||||
_ReceivedRelayAuthTicket = null;
|
||||
_FindRelayAuthTicketForServer = null;
|
||||
_ConnectToHostedDedicatedServer = null;
|
||||
_GetHostedDedicatedServerPort = null;
|
||||
_GetHostedDedicatedServerPOPID = null;
|
||||
_GetHostedDedicatedServerAddress = null;
|
||||
_CreateHostedDedicatedServerListenSocket = null;
|
||||
_RunCallbacks = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingSockets_v008", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamNetworkingSockets_v008();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamNetworkingSockets_v008();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerNetworkingSockets_v008", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerNetworkingSockets_v008();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerNetworkingSockets_v008();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Socket FCreateListenSocketIP( IntPtr self, ref NetAddress localAddress );
|
||||
private FCreateListenSocketIP _CreateListenSocketIP;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateListenSocketIP", CallingConvention = Platform.CC)]
|
||||
private static extern Socket _CreateListenSocketIP( IntPtr self, ref NetAddress localAddress, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Socket CreateListenSocketIP( ref NetAddress localAddress )
|
||||
internal Socket CreateListenSocketIP( ref NetAddress localAddress, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _CreateListenSocketIP( Self, ref localAddress );
|
||||
var returnValue = _CreateListenSocketIP( Self, ref localAddress, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Connection FConnectByIPAddress( IntPtr self, ref NetAddress address );
|
||||
private FConnectByIPAddress _ConnectByIPAddress;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectByIPAddress", CallingConvention = Platform.CC)]
|
||||
private static extern Connection _ConnectByIPAddress( IntPtr self, ref NetAddress address, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Connection ConnectByIPAddress( ref NetAddress address )
|
||||
internal Connection ConnectByIPAddress( ref NetAddress address, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _ConnectByIPAddress( Self, ref address );
|
||||
var returnValue = _ConnectByIPAddress( Self, ref address, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Socket FCreateListenSocketP2P( IntPtr self, int nVirtualPort );
|
||||
private FCreateListenSocketP2P _CreateListenSocketP2P;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateListenSocketP2P", CallingConvention = Platform.CC)]
|
||||
private static extern Socket _CreateListenSocketP2P( IntPtr self, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Socket CreateListenSocketP2P( int nVirtualPort )
|
||||
internal Socket CreateListenSocketP2P( int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _CreateListenSocketP2P( Self, nVirtualPort );
|
||||
var returnValue = _CreateListenSocketP2P( Self, nVirtualPort, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Connection FConnectP2P( IntPtr self, ref NetIdentity identityRemote, int nVirtualPort );
|
||||
private FConnectP2P _ConnectP2P;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectP2P", CallingConvention = Platform.CC)]
|
||||
private static extern Connection _ConnectP2P( IntPtr self, ref NetIdentity identityRemote, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Connection ConnectP2P( ref NetIdentity identityRemote, int nVirtualPort )
|
||||
internal Connection ConnectP2P( ref NetIdentity identityRemote, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _ConnectP2P( Self, ref identityRemote, nVirtualPort );
|
||||
var returnValue = _ConnectP2P( Self, ref identityRemote, nVirtualPort, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Result FAcceptConnection( IntPtr self, Connection hConn );
|
||||
private FAcceptConnection _AcceptConnection;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_AcceptConnection", CallingConvention = Platform.CC)]
|
||||
private static extern Result _AcceptConnection( IntPtr self, Connection hConn );
|
||||
|
||||
#endregion
|
||||
internal Result AcceptConnection( Connection hConn )
|
||||
@@ -139,10 +79,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CloseConnection", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCloseConnection( IntPtr self, Connection hPeer, int nReason, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszDebug, [MarshalAs( UnmanagedType.U1 )] bool bEnableLinger );
|
||||
private FCloseConnection _CloseConnection;
|
||||
private static extern bool _CloseConnection( IntPtr self, Connection hPeer, int nReason, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszDebug, [MarshalAs( UnmanagedType.U1 )] bool bEnableLinger );
|
||||
|
||||
#endregion
|
||||
internal bool CloseConnection( Connection hPeer, int nReason, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszDebug, [MarshalAs( UnmanagedType.U1 )] bool bEnableLinger )
|
||||
@@ -152,10 +91,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CloseListenSocket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCloseListenSocket( IntPtr self, Socket hSocket );
|
||||
private FCloseListenSocket _CloseListenSocket;
|
||||
private static extern bool _CloseListenSocket( IntPtr self, Socket hSocket );
|
||||
|
||||
#endregion
|
||||
internal bool CloseListenSocket( Socket hSocket )
|
||||
@@ -165,10 +103,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionUserData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetConnectionUserData( IntPtr self, Connection hPeer, long nUserData );
|
||||
private FSetConnectionUserData _SetConnectionUserData;
|
||||
private static extern bool _SetConnectionUserData( IntPtr self, Connection hPeer, long nUserData );
|
||||
|
||||
#endregion
|
||||
internal bool SetConnectionUserData( Connection hPeer, long nUserData )
|
||||
@@ -178,9 +115,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate long FGetConnectionUserData( IntPtr self, Connection hPeer );
|
||||
private FGetConnectionUserData _GetConnectionUserData;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionUserData", CallingConvention = Platform.CC)]
|
||||
private static extern long _GetConnectionUserData( IntPtr self, Connection hPeer );
|
||||
|
||||
#endregion
|
||||
internal long GetConnectionUserData( Connection hPeer )
|
||||
@@ -190,9 +126,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetConnectionName( IntPtr self, Connection hPeer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszName );
|
||||
private FSetConnectionName _SetConnectionName;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionName", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetConnectionName( IntPtr self, Connection hPeer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszName );
|
||||
|
||||
#endregion
|
||||
internal void SetConnectionName( Connection hPeer, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszName )
|
||||
@@ -201,10 +136,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionName", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetConnectionName( IntPtr self, Connection hPeer, IntPtr pszName, int nMaxLen );
|
||||
private FGetConnectionName _GetConnectionName;
|
||||
private static extern bool _GetConnectionName( IntPtr self, Connection hPeer, IntPtr pszName, int nMaxLen );
|
||||
|
||||
#endregion
|
||||
internal bool GetConnectionName( Connection hPeer, out string pszName )
|
||||
@@ -216,21 +150,29 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Result FSendMessageToConnection( IntPtr self, Connection hConn, IntPtr pData, uint cbData, int nSendFlags );
|
||||
private FSendMessageToConnection _SendMessageToConnection;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SendMessageToConnection", CallingConvention = Platform.CC)]
|
||||
private static extern Result _SendMessageToConnection( IntPtr self, Connection hConn, IntPtr pData, uint cbData, int nSendFlags, ref long pOutMessageNumber );
|
||||
|
||||
#endregion
|
||||
internal Result SendMessageToConnection( Connection hConn, IntPtr pData, uint cbData, int nSendFlags )
|
||||
internal Result SendMessageToConnection( Connection hConn, IntPtr pData, uint cbData, int nSendFlags, ref long pOutMessageNumber )
|
||||
{
|
||||
var returnValue = _SendMessageToConnection( Self, hConn, pData, cbData, nSendFlags );
|
||||
var returnValue = _SendMessageToConnection( Self, hConn, pData, cbData, nSendFlags, ref pOutMessageNumber );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Result FFlushMessagesOnConnection( IntPtr self, Connection hConn );
|
||||
private FFlushMessagesOnConnection _FlushMessagesOnConnection;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SendMessages", CallingConvention = Platform.CC)]
|
||||
private static extern void _SendMessages( IntPtr self, int nMessages, ref NetMsg pMessages, [In,Out] long[] pOutMessageNumberOrResult );
|
||||
|
||||
#endregion
|
||||
internal void SendMessages( int nMessages, ref NetMsg pMessages, [In,Out] long[] pOutMessageNumberOrResult )
|
||||
{
|
||||
_SendMessages( Self, nMessages, ref pMessages, pOutMessageNumberOrResult );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_FlushMessagesOnConnection", CallingConvention = Platform.CC)]
|
||||
private static extern Result _FlushMessagesOnConnection( IntPtr self, Connection hConn );
|
||||
|
||||
#endregion
|
||||
internal Result FlushMessagesOnConnection( Connection hConn )
|
||||
@@ -240,9 +182,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FReceiveMessagesOnConnection( IntPtr self, Connection hConn, IntPtr ppOutMessages, int nMaxMessages );
|
||||
private FReceiveMessagesOnConnection _ReceiveMessagesOnConnection;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceiveMessagesOnConnection", CallingConvention = Platform.CC)]
|
||||
private static extern int _ReceiveMessagesOnConnection( IntPtr self, Connection hConn, IntPtr ppOutMessages, int nMaxMessages );
|
||||
|
||||
#endregion
|
||||
internal int ReceiveMessagesOnConnection( Connection hConn, IntPtr ppOutMessages, int nMaxMessages )
|
||||
@@ -252,22 +193,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FReceiveMessagesOnListenSocket( IntPtr self, Socket hSocket, IntPtr ppOutMessages, int nMaxMessages );
|
||||
private FReceiveMessagesOnListenSocket _ReceiveMessagesOnListenSocket;
|
||||
|
||||
#endregion
|
||||
internal int ReceiveMessagesOnListenSocket( Socket hSocket, IntPtr ppOutMessages, int nMaxMessages )
|
||||
{
|
||||
var returnValue = _ReceiveMessagesOnListenSocket( Self, hSocket, ppOutMessages, nMaxMessages );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetConnectionInfo", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetConnectionInfo( IntPtr self, Connection hConn, ref ConnectionInfo pInfo );
|
||||
private FGetConnectionInfo _GetConnectionInfo;
|
||||
private static extern bool _GetConnectionInfo( IntPtr self, Connection hConn, ref ConnectionInfo pInfo );
|
||||
|
||||
#endregion
|
||||
internal bool GetConnectionInfo( Connection hConn, ref ConnectionInfo pInfo )
|
||||
@@ -277,10 +205,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetQuickConnectionStatus", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetQuickConnectionStatus( IntPtr self, Connection hConn, ref SteamNetworkingQuickConnectionStatus pStats );
|
||||
private FGetQuickConnectionStatus _GetQuickConnectionStatus;
|
||||
private static extern bool _GetQuickConnectionStatus( IntPtr self, Connection hConn, ref SteamNetworkingQuickConnectionStatus pStats );
|
||||
|
||||
#endregion
|
||||
internal bool GetQuickConnectionStatus( Connection hConn, ref SteamNetworkingQuickConnectionStatus pStats )
|
||||
@@ -290,9 +217,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetDetailedConnectionStatus( IntPtr self, Connection hConn, IntPtr pszBuf, int cbBuf );
|
||||
private FGetDetailedConnectionStatus _GetDetailedConnectionStatus;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetDetailedConnectionStatus", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetDetailedConnectionStatus( IntPtr self, Connection hConn, IntPtr pszBuf, int cbBuf );
|
||||
|
||||
#endregion
|
||||
internal int GetDetailedConnectionStatus( Connection hConn, out string pszBuf )
|
||||
@@ -304,10 +230,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetListenSocketAddress", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetListenSocketAddress( IntPtr self, Socket hSocket, ref NetAddress address );
|
||||
private FGetListenSocketAddress _GetListenSocketAddress;
|
||||
private static extern bool _GetListenSocketAddress( IntPtr self, Socket hSocket, ref NetAddress address );
|
||||
|
||||
#endregion
|
||||
internal bool GetListenSocketAddress( Socket hSocket, ref NetAddress address )
|
||||
@@ -317,10 +242,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateSocketPair", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCreateSocketPair( IntPtr self, [In,Out] Connection[] pOutConnection1, [In,Out] Connection[] pOutConnection2, [MarshalAs( UnmanagedType.U1 )] bool bUseNetworkLoopback, ref NetIdentity pIdentity1, ref NetIdentity pIdentity2 );
|
||||
private FCreateSocketPair _CreateSocketPair;
|
||||
private static extern bool _CreateSocketPair( IntPtr self, [In,Out] Connection[] pOutConnection1, [In,Out] Connection[] pOutConnection2, [MarshalAs( UnmanagedType.U1 )] bool bUseNetworkLoopback, ref NetIdentity pIdentity1, ref NetIdentity pIdentity2 );
|
||||
|
||||
#endregion
|
||||
internal bool CreateSocketPair( [In,Out] Connection[] pOutConnection1, [In,Out] Connection[] pOutConnection2, [MarshalAs( UnmanagedType.U1 )] bool bUseNetworkLoopback, ref NetIdentity pIdentity1, ref NetIdentity pIdentity2 )
|
||||
@@ -330,10 +254,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetIdentity", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetIdentity( IntPtr self, ref NetIdentity pIdentity );
|
||||
private FGetIdentity _GetIdentity;
|
||||
private static extern bool _GetIdentity( IntPtr self, ref NetIdentity pIdentity );
|
||||
|
||||
#endregion
|
||||
internal bool GetIdentity( ref NetIdentity pIdentity )
|
||||
@@ -343,10 +266,77 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_InitAuthentication", CallingConvention = Platform.CC)]
|
||||
private static extern SteamNetworkingAvailability _InitAuthentication( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamNetworkingAvailability InitAuthentication()
|
||||
{
|
||||
var returnValue = _InitAuthentication( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetAuthenticationStatus", CallingConvention = Platform.CC)]
|
||||
private static extern SteamNetworkingAvailability _GetAuthenticationStatus( IntPtr self, ref SteamNetAuthenticationStatus_t pDetails );
|
||||
|
||||
#endregion
|
||||
internal SteamNetworkingAvailability GetAuthenticationStatus( ref SteamNetAuthenticationStatus_t pDetails )
|
||||
{
|
||||
var returnValue = _GetAuthenticationStatus( Self, ref pDetails );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreatePollGroup", CallingConvention = Platform.CC)]
|
||||
private static extern HSteamNetPollGroup _CreatePollGroup( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal HSteamNetPollGroup CreatePollGroup()
|
||||
{
|
||||
var returnValue = _CreatePollGroup( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_DestroyPollGroup", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FReceivedRelayAuthTicket( IntPtr self, IntPtr pvTicket, int cbTicket, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket );
|
||||
private FReceivedRelayAuthTicket _ReceivedRelayAuthTicket;
|
||||
private static extern bool _DestroyPollGroup( IntPtr self, HSteamNetPollGroup hPollGroup );
|
||||
|
||||
#endregion
|
||||
internal bool DestroyPollGroup( HSteamNetPollGroup hPollGroup )
|
||||
{
|
||||
var returnValue = _DestroyPollGroup( Self, hPollGroup );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_SetConnectionPollGroup", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConnectionPollGroup( IntPtr self, Connection hConn, HSteamNetPollGroup hPollGroup );
|
||||
|
||||
#endregion
|
||||
internal bool SetConnectionPollGroup( Connection hConn, HSteamNetPollGroup hPollGroup )
|
||||
{
|
||||
var returnValue = _SetConnectionPollGroup( Self, hConn, hPollGroup );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceiveMessagesOnPollGroup", CallingConvention = Platform.CC)]
|
||||
private static extern int _ReceiveMessagesOnPollGroup( IntPtr self, HSteamNetPollGroup hPollGroup, IntPtr ppOutMessages, int nMaxMessages );
|
||||
|
||||
#endregion
|
||||
internal int ReceiveMessagesOnPollGroup( HSteamNetPollGroup hPollGroup, IntPtr ppOutMessages, int nMaxMessages )
|
||||
{
|
||||
var returnValue = _ReceiveMessagesOnPollGroup( Self, hPollGroup, ppOutMessages, nMaxMessages );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceivedRelayAuthTicket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ReceivedRelayAuthTicket( IntPtr self, IntPtr pvTicket, int cbTicket, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket );
|
||||
|
||||
#endregion
|
||||
internal bool ReceivedRelayAuthTicket( IntPtr pvTicket, int cbTicket, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket )
|
||||
@@ -356,9 +346,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FFindRelayAuthTicketForServer( IntPtr self, ref NetIdentity identityGameServer, int nVirtualPort, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket );
|
||||
private FFindRelayAuthTicketForServer _FindRelayAuthTicketForServer;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_FindRelayAuthTicketForServer", CallingConvention = Platform.CC)]
|
||||
private static extern int _FindRelayAuthTicketForServer( IntPtr self, ref NetIdentity identityGameServer, int nVirtualPort, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket );
|
||||
|
||||
#endregion
|
||||
internal int FindRelayAuthTicketForServer( ref NetIdentity identityGameServer, int nVirtualPort, [In,Out] SteamDatagramRelayAuthTicket[] pOutParsedTicket )
|
||||
@@ -368,21 +357,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Connection FConnectToHostedDedicatedServer( IntPtr self, ref NetIdentity identityTarget, int nVirtualPort );
|
||||
private FConnectToHostedDedicatedServer _ConnectToHostedDedicatedServer;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectToHostedDedicatedServer", CallingConvention = Platform.CC)]
|
||||
private static extern Connection _ConnectToHostedDedicatedServer( IntPtr self, ref NetIdentity identityTarget, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Connection ConnectToHostedDedicatedServer( ref NetIdentity identityTarget, int nVirtualPort )
|
||||
internal Connection ConnectToHostedDedicatedServer( ref NetIdentity identityTarget, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _ConnectToHostedDedicatedServer( Self, ref identityTarget, nVirtualPort );
|
||||
var returnValue = _ConnectToHostedDedicatedServer( Self, ref identityTarget, nVirtualPort, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate ushort FGetHostedDedicatedServerPort( IntPtr self );
|
||||
private FGetHostedDedicatedServerPort _GetHostedDedicatedServerPort;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerPort", CallingConvention = Platform.CC)]
|
||||
private static extern ushort _GetHostedDedicatedServerPort( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal ushort GetHostedDedicatedServerPort()
|
||||
@@ -392,9 +379,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamNetworkingPOPID FGetHostedDedicatedServerPOPID( IntPtr self );
|
||||
private FGetHostedDedicatedServerPOPID _GetHostedDedicatedServerPOPID;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerPOPID", CallingConvention = Platform.CC)]
|
||||
private static extern SteamNetworkingPOPID _GetHostedDedicatedServerPOPID( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamNetworkingPOPID GetHostedDedicatedServerPOPID()
|
||||
@@ -404,39 +390,83 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetHostedDedicatedServerAddress( IntPtr self, ref SteamDatagramHostedAddress pRouting );
|
||||
private FGetHostedDedicatedServerAddress _GetHostedDedicatedServerAddress;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetHostedDedicatedServerAddress", CallingConvention = Platform.CC)]
|
||||
private static extern Result _GetHostedDedicatedServerAddress( IntPtr self, ref SteamDatagramHostedAddress pRouting );
|
||||
|
||||
#endregion
|
||||
internal bool GetHostedDedicatedServerAddress( ref SteamDatagramHostedAddress pRouting )
|
||||
internal Result GetHostedDedicatedServerAddress( ref SteamDatagramHostedAddress pRouting )
|
||||
{
|
||||
var returnValue = _GetHostedDedicatedServerAddress( Self, ref pRouting );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Socket FCreateHostedDedicatedServerListenSocket( IntPtr self, int nVirtualPort );
|
||||
private FCreateHostedDedicatedServerListenSocket _CreateHostedDedicatedServerListenSocket;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_CreateHostedDedicatedServerListenSocket", CallingConvention = Platform.CC)]
|
||||
private static extern Socket _CreateHostedDedicatedServerListenSocket( IntPtr self, int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Socket CreateHostedDedicatedServerListenSocket( int nVirtualPort )
|
||||
internal Socket CreateHostedDedicatedServerListenSocket( int nVirtualPort, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _CreateHostedDedicatedServerListenSocket( Self, nVirtualPort );
|
||||
var returnValue = _CreateHostedDedicatedServerListenSocket( Self, nVirtualPort, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRunCallbacks( IntPtr self, IntPtr pCallbacks );
|
||||
private FRunCallbacks _RunCallbacks;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetGameCoordinatorServerLogin", CallingConvention = Platform.CC)]
|
||||
private static extern Result _GetGameCoordinatorServerLogin( IntPtr self, ref SteamDatagramGameCoordinatorServerLogin pLoginInfo, ref int pcbSignedBlob, IntPtr pBlob );
|
||||
|
||||
#endregion
|
||||
internal void RunCallbacks( IntPtr pCallbacks )
|
||||
internal Result GetGameCoordinatorServerLogin( ref SteamDatagramGameCoordinatorServerLogin pLoginInfo, ref int pcbSignedBlob, IntPtr pBlob )
|
||||
{
|
||||
_RunCallbacks( Self, pCallbacks );
|
||||
var returnValue = _GetGameCoordinatorServerLogin( Self, ref pLoginInfo, ref pcbSignedBlob, pBlob );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ConnectP2PCustomSignaling", CallingConvention = Platform.CC)]
|
||||
private static extern Connection _ConnectP2PCustomSignaling( IntPtr self, IntPtr pSignaling, ref NetIdentity pPeerIdentity, int nOptions, [In,Out] NetKeyValue[] pOptions );
|
||||
|
||||
#endregion
|
||||
internal Connection ConnectP2PCustomSignaling( IntPtr pSignaling, ref NetIdentity pPeerIdentity, int nOptions, [In,Out] NetKeyValue[] pOptions )
|
||||
{
|
||||
var returnValue = _ConnectP2PCustomSignaling( Self, pSignaling, ref pPeerIdentity, nOptions, pOptions );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_ReceivedP2PCustomSignal", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _ReceivedP2PCustomSignal( IntPtr self, IntPtr pMsg, int cbMsg, IntPtr pContext );
|
||||
|
||||
#endregion
|
||||
internal bool ReceivedP2PCustomSignal( IntPtr pMsg, int cbMsg, IntPtr pContext )
|
||||
{
|
||||
var returnValue = _ReceivedP2PCustomSignal( Self, pMsg, cbMsg, pContext );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingSockets_GetCertificateRequest", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _GetCertificateRequest( IntPtr self, ref int pcbBlob, IntPtr pBlob, ref 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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,94 +9,88 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamNetworkingUtils : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamNetworkingUtils001";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamNetworkingUtils( bool IsGameServer )
|
||||
{
|
||||
_GetLocalPingLocation = Marshal.GetDelegateForFunctionPointer<FGetLocalPingLocation>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_EstimatePingTimeBetweenTwoLocations = Marshal.GetDelegateForFunctionPointer<FEstimatePingTimeBetweenTwoLocations>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_EstimatePingTimeFromLocalHost = Marshal.GetDelegateForFunctionPointer<FEstimatePingTimeFromLocalHost>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_ConvertPingLocationToString = Marshal.GetDelegateForFunctionPointer<FConvertPingLocationToString>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_ParsePingLocationString = Marshal.GetDelegateForFunctionPointer<FParsePingLocationString>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_CheckPingDataUpToDate = Marshal.GetDelegateForFunctionPointer<FCheckPingDataUpToDate>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_IsPingMeasurementInProgress = Marshal.GetDelegateForFunctionPointer<FIsPingMeasurementInProgress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_GetPingToDataCenter = Marshal.GetDelegateForFunctionPointer<FGetPingToDataCenter>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_GetDirectPingToPOP = Marshal.GetDelegateForFunctionPointer<FGetDirectPingToPOP>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_GetPOPCount = Marshal.GetDelegateForFunctionPointer<FGetPOPCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetPOPList = Marshal.GetDelegateForFunctionPointer<FGetPOPList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GetLocalTimestamp = Marshal.GetDelegateForFunctionPointer<FGetLocalTimestamp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_SetDebugOutputFunction = Marshal.GetDelegateForFunctionPointer<FSetDebugOutputFunction>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_SetConfigValue = Marshal.GetDelegateForFunctionPointer<FSetConfigValue>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_GetConfigValue = Marshal.GetDelegateForFunctionPointer<FGetConfigValue>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetConfigValueInfo = Marshal.GetDelegateForFunctionPointer<FGetConfigValueInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_GetFirstConfigValue = Marshal.GetDelegateForFunctionPointer<FGetFirstConfigValue>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingUtils_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamNetworkingUtils_v003();
|
||||
public override IntPtr GetGlobalInterfacePointer() => SteamAPI_SteamNetworkingUtils_v003();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_AllocateMessage", CallingConvention = Platform.CC)]
|
||||
private static extern IntPtr _AllocateMessage( IntPtr self, int cbAllocateBuffer );
|
||||
|
||||
#endregion
|
||||
internal NetMsg AllocateMessage( int cbAllocateBuffer )
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_GetLocalPingLocation = null;
|
||||
_EstimatePingTimeBetweenTwoLocations = null;
|
||||
_EstimatePingTimeFromLocalHost = null;
|
||||
_ConvertPingLocationToString = null;
|
||||
_ParsePingLocationString = null;
|
||||
_CheckPingDataUpToDate = null;
|
||||
_IsPingMeasurementInProgress = null;
|
||||
_GetPingToDataCenter = null;
|
||||
_GetDirectPingToPOP = null;
|
||||
_GetPOPCount = null;
|
||||
_GetPOPList = null;
|
||||
_GetLocalTimestamp = null;
|
||||
_SetDebugOutputFunction = null;
|
||||
_SetConfigValue = null;
|
||||
_GetConfigValue = null;
|
||||
_GetConfigValueInfo = null;
|
||||
_GetFirstConfigValue = null;
|
||||
var returnValue = _AllocateMessage( Self, cbAllocateBuffer );
|
||||
return returnValue.ToType<NetMsg>();
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate float FGetLocalPingLocation( IntPtr self, ref PingLocation result );
|
||||
private FGetLocalPingLocation _GetLocalPingLocation;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_InitRelayNetworkAccess", CallingConvention = Platform.CC)]
|
||||
private static extern void _InitRelayNetworkAccess( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal float GetLocalPingLocation( ref PingLocation result )
|
||||
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
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FEstimatePingTimeBetweenTwoLocations( IntPtr self, ref PingLocation location1, ref PingLocation location2 );
|
||||
private FEstimatePingTimeBetweenTwoLocations _EstimatePingTimeBetweenTwoLocations;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_EstimatePingTimeBetweenTwoLocations", CallingConvention = Platform.CC)]
|
||||
private static extern int _EstimatePingTimeBetweenTwoLocations( IntPtr self, ref NetPingLocation location1, ref NetPingLocation location2 );
|
||||
|
||||
#endregion
|
||||
internal int EstimatePingTimeBetweenTwoLocations( ref PingLocation location1, ref PingLocation location2 )
|
||||
internal int EstimatePingTimeBetweenTwoLocations( ref NetPingLocation location1, ref NetPingLocation location2 )
|
||||
{
|
||||
var returnValue = _EstimatePingTimeBetweenTwoLocations( Self, ref location1, ref location2 );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FEstimatePingTimeFromLocalHost( IntPtr self, ref PingLocation remoteLocation );
|
||||
private FEstimatePingTimeFromLocalHost _EstimatePingTimeFromLocalHost;
|
||||
[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 PingLocation remoteLocation )
|
||||
internal int EstimatePingTimeFromLocalHost( ref NetPingLocation remoteLocation )
|
||||
{
|
||||
var returnValue = _EstimatePingTimeFromLocalHost( Self, ref remoteLocation );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FConvertPingLocationToString( IntPtr self, ref PingLocation location, IntPtr pszBuf, int cchBufSize );
|
||||
private FConvertPingLocationToString _ConvertPingLocationToString;
|
||||
[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 PingLocation location, out string pszBuf )
|
||||
internal void ConvertPingLocationToString( ref NetPingLocation location, out string pszBuf )
|
||||
{
|
||||
IntPtr mempszBuf = Helpers.TakeMemory();
|
||||
_ConvertPingLocationToString( Self, ref location, mempszBuf, (1024 * 32) );
|
||||
@@ -104,23 +98,21 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_ParsePingLocationString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FParsePingLocationString( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString, ref PingLocation result );
|
||||
private FParsePingLocationString _ParsePingLocationString;
|
||||
private static extern bool _ParsePingLocationString( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString, ref NetPingLocation result );
|
||||
|
||||
#endregion
|
||||
internal bool ParsePingLocationString( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszString, ref PingLocation result )
|
||||
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
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_CheckPingDataUpToDate", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FCheckPingDataUpToDate( IntPtr self, float flMaxAgeSeconds );
|
||||
private FCheckPingDataUpToDate _CheckPingDataUpToDate;
|
||||
private static extern bool _CheckPingDataUpToDate( IntPtr self, float flMaxAgeSeconds );
|
||||
|
||||
#endregion
|
||||
internal bool CheckPingDataUpToDate( float flMaxAgeSeconds )
|
||||
@@ -130,22 +122,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsPingMeasurementInProgress( IntPtr self );
|
||||
private FIsPingMeasurementInProgress _IsPingMeasurementInProgress;
|
||||
|
||||
#endregion
|
||||
internal bool IsPingMeasurementInProgress()
|
||||
{
|
||||
var returnValue = _IsPingMeasurementInProgress( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetPingToDataCenter( IntPtr self, SteamNetworkingPOPID popID, ref SteamNetworkingPOPID pViaRelayPoP );
|
||||
private FGetPingToDataCenter _GetPingToDataCenter;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPingToDataCenter", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetPingToDataCenter( IntPtr self, SteamNetworkingPOPID popID, ref SteamNetworkingPOPID pViaRelayPoP );
|
||||
|
||||
#endregion
|
||||
internal int GetPingToDataCenter( SteamNetworkingPOPID popID, ref SteamNetworkingPOPID pViaRelayPoP )
|
||||
@@ -155,9 +133,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetDirectPingToPOP( IntPtr self, SteamNetworkingPOPID popID );
|
||||
private FGetDirectPingToPOP _GetDirectPingToPOP;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetDirectPingToPOP", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetDirectPingToPOP( IntPtr self, SteamNetworkingPOPID popID );
|
||||
|
||||
#endregion
|
||||
internal int GetDirectPingToPOP( SteamNetworkingPOPID popID )
|
||||
@@ -167,9 +144,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetPOPCount( IntPtr self );
|
||||
private FGetPOPCount _GetPOPCount;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPOPCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetPOPCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetPOPCount()
|
||||
@@ -179,9 +155,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetPOPList( IntPtr self, ref SteamNetworkingPOPID list, int nListSz );
|
||||
private FGetPOPList _GetPOPList;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetPOPList", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetPOPList( IntPtr self, ref SteamNetworkingPOPID list, int nListSz );
|
||||
|
||||
#endregion
|
||||
internal int GetPOPList( ref SteamNetworkingPOPID list, int nListSz )
|
||||
@@ -191,9 +166,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate long FGetLocalTimestamp( IntPtr self );
|
||||
private FGetLocalTimestamp _GetLocalTimestamp;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetLocalTimestamp", CallingConvention = Platform.CC)]
|
||||
private static extern long _GetLocalTimestamp( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal long GetLocalTimestamp()
|
||||
@@ -203,58 +177,137 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetDebugOutputFunction( IntPtr self, DebugOutputType eDetailLevel, IntPtr pfnFunc );
|
||||
private FSetDebugOutputFunction _SetDebugOutputFunction;
|
||||
[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( DebugOutputType eDetailLevel, IntPtr pfnFunc )
|
||||
internal void SetDebugOutputFunction( NetDebugOutput eDetailLevel, NetDebugFunc pfnFunc )
|
||||
{
|
||||
_SetDebugOutputFunction( Self, eDetailLevel, pfnFunc );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetConfigValue( IntPtr self, NetConfig eValue, NetScope eScopeType, long scopeObj, NetConfigType eDataType, IntPtr pArg );
|
||||
private FSetConfigValue _SetConfigValue;
|
||||
private static extern bool _SetGlobalConfigValueInt32( IntPtr self, NetConfig eValue, int val );
|
||||
|
||||
#endregion
|
||||
internal bool SetConfigValue( NetConfig eValue, NetScope eScopeType, long scopeObj, NetConfigType eDataType, IntPtr pArg )
|
||||
internal bool SetGlobalConfigValueInt32( NetConfig eValue, int val )
|
||||
{
|
||||
var returnValue = _SetGlobalConfigValueInt32( Self, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetGlobalConfigValueFloat( IntPtr self, NetConfig eValue, float val );
|
||||
|
||||
#endregion
|
||||
internal bool SetGlobalConfigValueFloat( NetConfig eValue, float val )
|
||||
{
|
||||
var returnValue = _SetGlobalConfigValueFloat( Self, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetGlobalConfigValueString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetGlobalConfigValueString( IntPtr self, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val );
|
||||
|
||||
#endregion
|
||||
internal bool SetGlobalConfigValueString( NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val )
|
||||
{
|
||||
var returnValue = _SetGlobalConfigValueString( Self, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConnectionConfigValueInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConnectionConfigValueInt32( IntPtr self, Connection hConn, NetConfig eValue, int val );
|
||||
|
||||
#endregion
|
||||
internal bool SetConnectionConfigValueInt32( Connection hConn, NetConfig eValue, int val )
|
||||
{
|
||||
var returnValue = _SetConnectionConfigValueInt32( Self, hConn, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConnectionConfigValueFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConnectionConfigValueFloat( IntPtr self, Connection hConn, NetConfig eValue, float val );
|
||||
|
||||
#endregion
|
||||
internal bool SetConnectionConfigValueFloat( Connection hConn, NetConfig eValue, float val )
|
||||
{
|
||||
var returnValue = _SetConnectionConfigValueFloat( Self, hConn, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConnectionConfigValueString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConnectionConfigValueString( IntPtr self, Connection hConn, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val );
|
||||
|
||||
#endregion
|
||||
internal bool SetConnectionConfigValueString( Connection hConn, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string val )
|
||||
{
|
||||
var returnValue = _SetConnectionConfigValueString( Self, hConn, eValue, val );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConfigValue", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConfigValue( IntPtr self, NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, NetConfigType eDataType, IntPtr pArg );
|
||||
|
||||
#endregion
|
||||
internal bool SetConfigValue( NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, NetConfigType eDataType, IntPtr pArg )
|
||||
{
|
||||
var returnValue = _SetConfigValue( Self, eValue, eScopeType, scopeObj, eDataType, pArg );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate NetConfigResult FGetConfigValue( IntPtr self, NetConfig eValue, NetScope eScopeType, long scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref ulong cbResult );
|
||||
private FGetConfigValue _GetConfigValue;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SetConfigValueStruct", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SetConfigValueStruct( IntPtr self, ref NetKeyValue opt, NetConfigScope eScopeType, IntPtr scopeObj );
|
||||
|
||||
#endregion
|
||||
internal NetConfigResult GetConfigValue( NetConfig eValue, NetScope eScopeType, long scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref ulong cbResult )
|
||||
internal bool SetConfigValueStruct( ref NetKeyValue opt, NetConfigScope eScopeType, IntPtr scopeObj )
|
||||
{
|
||||
var returnValue = _SetConfigValueStruct( Self, ref opt, eScopeType, scopeObj );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetConfigValue", CallingConvention = Platform.CC)]
|
||||
private static extern NetConfigResult _GetConfigValue( IntPtr self, NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref UIntPtr cbResult );
|
||||
|
||||
#endregion
|
||||
internal NetConfigResult GetConfigValue( NetConfig eValue, NetConfigScope eScopeType, IntPtr scopeObj, ref NetConfigType pOutDataType, IntPtr pResult, ref UIntPtr cbResult )
|
||||
{
|
||||
var returnValue = _GetConfigValue( Self, eValue, eScopeType, scopeObj, ref pOutDataType, pResult, ref cbResult );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetConfigValueInfo", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetConfigValueInfo( IntPtr self, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pOutName, ref NetConfigType pOutDataType, [In,Out] NetScope[] pOutScope, [In,Out] NetConfig[] pOutNextValue );
|
||||
private FGetConfigValueInfo _GetConfigValueInfo;
|
||||
private static extern bool _GetConfigValueInfo( IntPtr self, NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pOutName, ref NetConfigType pOutDataType, [In,Out] NetConfigScope[] pOutScope, [In,Out] NetConfig[] pOutNextValue );
|
||||
|
||||
#endregion
|
||||
internal bool GetConfigValueInfo( NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pOutName, ref NetConfigType pOutDataType, [In,Out] NetScope[] pOutScope, [In,Out] NetConfig[] pOutNextValue )
|
||||
internal bool GetConfigValueInfo( NetConfig eValue, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pOutName, ref NetConfigType pOutDataType, [In,Out] NetConfigScope[] pOutScope, [In,Out] NetConfig[] pOutNextValue )
|
||||
{
|
||||
var returnValue = _GetConfigValueInfo( Self, eValue, pOutName, ref pOutDataType, pOutScope, pOutNextValue );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate NetConfig FGetFirstConfigValue( IntPtr self );
|
||||
private FGetFirstConfigValue _GetFirstConfigValue;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_GetFirstConfigValue", CallingConvention = Platform.CC)]
|
||||
private static extern NetConfig _GetFirstConfigValue( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal NetConfig GetFirstConfigValue()
|
||||
@@ -263,5 +316,53 @@ namespace Steamworks
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ToString", CallingConvention = Platform.CC)]
|
||||
private static extern void _SteamNetworkingIPAddr_ToString( IntPtr self, ref NetAddress addr, IntPtr buf, uint cbBuf, [MarshalAs( UnmanagedType.U1 )] bool bWithPort );
|
||||
|
||||
#endregion
|
||||
internal void SteamNetworkingIPAddr_ToString( ref NetAddress addr, out string buf, [MarshalAs( UnmanagedType.U1 )] bool bWithPort )
|
||||
{
|
||||
IntPtr membuf = Helpers.TakeMemory();
|
||||
_SteamNetworkingIPAddr_ToString( Self, ref addr, membuf, (1024 * 32), bWithPort );
|
||||
buf = Helpers.MemoryToString( membuf );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIPAddr_ParseString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SteamNetworkingIPAddr_ParseString( IntPtr self, ref NetAddress pAddr, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr );
|
||||
|
||||
#endregion
|
||||
internal bool SteamNetworkingIPAddr_ParseString( ref NetAddress pAddr, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr )
|
||||
{
|
||||
var returnValue = _SteamNetworkingIPAddr_ParseString( Self, ref pAddr, pszStr );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ToString", CallingConvention = Platform.CC)]
|
||||
private static extern void _SteamNetworkingIdentity_ToString( IntPtr self, ref NetIdentity identity, IntPtr buf, uint cbBuf );
|
||||
|
||||
#endregion
|
||||
internal void SteamNetworkingIdentity_ToString( ref NetIdentity identity, out string buf )
|
||||
{
|
||||
IntPtr membuf = Helpers.TakeMemory();
|
||||
_SteamNetworkingIdentity_ToString( Self, ref identity, membuf, (1024 * 32) );
|
||||
buf = Helpers.MemoryToString( membuf );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamNetworkingUtils_SteamNetworkingIdentity_ParseString", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _SteamNetworkingIdentity_ParseString( IntPtr self, ref NetIdentity pIdentity, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr );
|
||||
|
||||
#endregion
|
||||
internal bool SteamNetworkingIdentity_ParseString( ref NetIdentity pIdentity, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pszStr )
|
||||
{
|
||||
var returnValue = _SteamNetworkingIdentity_ParseString( Self, ref pIdentity, pszStr );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,34 +9,21 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamParentalSettings : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMPARENTALSETTINGS_INTERFACE_VERSION001";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamParentalSettings( bool IsGameServer )
|
||||
{
|
||||
_BIsParentalLockEnabled = Marshal.GetDelegateForFunctionPointer<FBIsParentalLockEnabled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_BIsParentalLockLocked = Marshal.GetDelegateForFunctionPointer<FBIsParentalLockLocked>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_BIsAppBlocked = Marshal.GetDelegateForFunctionPointer<FBIsAppBlocked>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_BIsAppInBlockList = Marshal.GetDelegateForFunctionPointer<FBIsAppInBlockList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_BIsFeatureBlocked = Marshal.GetDelegateForFunctionPointer<FBIsFeatureBlocked>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_BIsFeatureInBlockList = Marshal.GetDelegateForFunctionPointer<FBIsFeatureInBlockList>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_BIsParentalLockEnabled = null;
|
||||
_BIsParentalLockLocked = null;
|
||||
_BIsAppBlocked = null;
|
||||
_BIsAppInBlockList = null;
|
||||
_BIsFeatureBlocked = null;
|
||||
_BIsFeatureInBlockList = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamParentalSettings_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamParentalSettings_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamParentalSettings_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsParentalLockEnabled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsParentalLockEnabled( IntPtr self );
|
||||
private FBIsParentalLockEnabled _BIsParentalLockEnabled;
|
||||
private static extern bool _BIsParentalLockEnabled( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsParentalLockEnabled()
|
||||
@@ -46,10 +33,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsParentalLockLocked", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsParentalLockLocked( IntPtr self );
|
||||
private FBIsParentalLockLocked _BIsParentalLockLocked;
|
||||
private static extern bool _BIsParentalLockLocked( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsParentalLockLocked()
|
||||
@@ -59,10 +45,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsAppBlocked", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsAppBlocked( IntPtr self, AppId nAppID );
|
||||
private FBIsAppBlocked _BIsAppBlocked;
|
||||
private static extern bool _BIsAppBlocked( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal bool BIsAppBlocked( AppId nAppID )
|
||||
@@ -72,10 +57,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsAppInBlockList", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsAppInBlockList( IntPtr self, AppId nAppID );
|
||||
private FBIsAppInBlockList _BIsAppInBlockList;
|
||||
private static extern bool _BIsAppInBlockList( IntPtr self, AppId nAppID );
|
||||
|
||||
#endregion
|
||||
internal bool BIsAppInBlockList( AppId nAppID )
|
||||
@@ -85,10 +69,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsFeatureBlocked", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsFeatureBlocked( IntPtr self, ParentalFeature eFeature );
|
||||
private FBIsFeatureBlocked _BIsFeatureBlocked;
|
||||
private static extern bool _BIsFeatureBlocked( IntPtr self, ParentalFeature eFeature );
|
||||
|
||||
#endregion
|
||||
internal bool BIsFeatureBlocked( ParentalFeature eFeature )
|
||||
@@ -98,10 +81,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParentalSettings_BIsFeatureInBlockList", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsFeatureInBlockList( IntPtr self, ParentalFeature eFeature );
|
||||
private FBIsFeatureInBlockList _BIsFeatureInBlockList;
|
||||
private static extern bool _BIsFeatureInBlockList( IntPtr self, ParentalFeature eFeature );
|
||||
|
||||
#endregion
|
||||
internal bool BIsFeatureInBlockList( ParentalFeature eFeature )
|
||||
|
||||
@@ -9,45 +9,20 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamParties : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamParties002";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamParties( bool IsGameServer )
|
||||
{
|
||||
_GetNumActiveBeacons = Marshal.GetDelegateForFunctionPointer<FGetNumActiveBeacons>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_GetBeaconByIndex = Marshal.GetDelegateForFunctionPointer<FGetBeaconByIndex>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetBeaconDetails = Marshal.GetDelegateForFunctionPointer<FGetBeaconDetails>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_JoinParty = Marshal.GetDelegateForFunctionPointer<FJoinParty>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_GetNumAvailableBeaconLocations = Marshal.GetDelegateForFunctionPointer<FGetNumAvailableBeaconLocations>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_GetAvailableBeaconLocations = Marshal.GetDelegateForFunctionPointer<FGetAvailableBeaconLocations>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_CreateBeacon = Marshal.GetDelegateForFunctionPointer<FCreateBeacon>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_OnReservationCompleted = Marshal.GetDelegateForFunctionPointer<FOnReservationCompleted>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_CancelReservation = Marshal.GetDelegateForFunctionPointer<FCancelReservation>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_ChangeNumOpenSlots = Marshal.GetDelegateForFunctionPointer<FChangeNumOpenSlots>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_DestroyBeacon = Marshal.GetDelegateForFunctionPointer<FDestroyBeacon>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GetBeaconLocationData = Marshal.GetDelegateForFunctionPointer<FGetBeaconLocationData>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_GetNumActiveBeacons = null;
|
||||
_GetBeaconByIndex = null;
|
||||
_GetBeaconDetails = null;
|
||||
_JoinParty = null;
|
||||
_GetNumAvailableBeaconLocations = null;
|
||||
_GetAvailableBeaconLocations = null;
|
||||
_CreateBeacon = null;
|
||||
_OnReservationCompleted = null;
|
||||
_CancelReservation = null;
|
||||
_ChangeNumOpenSlots = null;
|
||||
_DestroyBeacon = null;
|
||||
_GetBeaconLocationData = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamParties_v002", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamParties_v002();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamParties_v002();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetNumActiveBeacons( IntPtr self );
|
||||
private FGetNumActiveBeacons _GetNumActiveBeacons;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetNumActiveBeacons", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetNumActiveBeacons( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetNumActiveBeacons()
|
||||
@@ -57,9 +32,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate PartyBeaconID_t FGetBeaconByIndex( IntPtr self, uint unIndex );
|
||||
private FGetBeaconByIndex _GetBeaconByIndex;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconByIndex", CallingConvention = Platform.CC)]
|
||||
private static extern PartyBeaconID_t _GetBeaconByIndex( IntPtr self, uint unIndex );
|
||||
|
||||
#endregion
|
||||
internal PartyBeaconID_t GetBeaconByIndex( uint unIndex )
|
||||
@@ -69,10 +43,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconDetails", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetBeaconDetails( IntPtr self, PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, IntPtr pchMetadata, int cchMetadata );
|
||||
private FGetBeaconDetails _GetBeaconDetails;
|
||||
private static extern bool _GetBeaconDetails( IntPtr self, PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, IntPtr pchMetadata, int cchMetadata );
|
||||
|
||||
#endregion
|
||||
internal bool GetBeaconDetails( PartyBeaconID_t ulBeaconID, ref SteamId pSteamIDBeaconOwner, ref SteamPartyBeaconLocation_t pLocation, out string pchMetadata )
|
||||
@@ -84,22 +57,20 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FJoinParty( IntPtr self, PartyBeaconID_t ulBeaconID );
|
||||
private FJoinParty _JoinParty;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_JoinParty", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _JoinParty( IntPtr self, PartyBeaconID_t ulBeaconID );
|
||||
|
||||
#endregion
|
||||
internal async Task<JoinPartyCallback_t?> JoinParty( PartyBeaconID_t ulBeaconID )
|
||||
internal CallResult<JoinPartyCallback_t> JoinParty( PartyBeaconID_t ulBeaconID )
|
||||
{
|
||||
var returnValue = _JoinParty( Self, ulBeaconID );
|
||||
return await JoinPartyCallback_t.GetResultAsync( returnValue );
|
||||
return new CallResult<JoinPartyCallback_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetNumAvailableBeaconLocations", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetNumAvailableBeaconLocations( IntPtr self, ref uint puNumLocations );
|
||||
private FGetNumAvailableBeaconLocations _GetNumAvailableBeaconLocations;
|
||||
private static extern bool _GetNumAvailableBeaconLocations( IntPtr self, ref uint puNumLocations );
|
||||
|
||||
#endregion
|
||||
internal bool GetNumAvailableBeaconLocations( ref uint puNumLocations )
|
||||
@@ -109,10 +80,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetAvailableBeaconLocations", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetAvailableBeaconLocations( IntPtr self, ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations );
|
||||
private FGetAvailableBeaconLocations _GetAvailableBeaconLocations;
|
||||
private static extern bool _GetAvailableBeaconLocations( IntPtr self, ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations );
|
||||
|
||||
#endregion
|
||||
internal bool GetAvailableBeaconLocations( ref SteamPartyBeaconLocation_t pLocationList, uint uMaxNumLocations )
|
||||
@@ -122,21 +92,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FCreateBeacon( IntPtr self, uint unOpenSlots, ref SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetadata );
|
||||
private FCreateBeacon _CreateBeacon;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_CreateBeacon", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _CreateBeacon( IntPtr self, uint unOpenSlots, ref SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetadata );
|
||||
|
||||
#endregion
|
||||
internal async Task<CreateBeaconCallback_t?> CreateBeacon( uint unOpenSlots, /* ref */ SteamPartyBeaconLocation_t pBeaconLocation, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchConnectString, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchMetadata )
|
||||
internal 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 await CreateBeaconCallback_t.GetResultAsync( returnValue );
|
||||
return new CallResult<CreateBeaconCallback_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FOnReservationCompleted( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser );
|
||||
private FOnReservationCompleted _OnReservationCompleted;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_OnReservationCompleted", CallingConvention = Platform.CC)]
|
||||
private static extern void _OnReservationCompleted( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal void OnReservationCompleted( PartyBeaconID_t ulBeacon, SteamId steamIDUser )
|
||||
@@ -145,9 +113,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FCancelReservation( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser );
|
||||
private FCancelReservation _CancelReservation;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_CancelReservation", CallingConvention = Platform.CC)]
|
||||
private static extern void _CancelReservation( IntPtr self, PartyBeaconID_t ulBeacon, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal void CancelReservation( PartyBeaconID_t ulBeacon, SteamId steamIDUser )
|
||||
@@ -156,22 +123,20 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FChangeNumOpenSlots( IntPtr self, PartyBeaconID_t ulBeacon, uint unOpenSlots );
|
||||
private FChangeNumOpenSlots _ChangeNumOpenSlots;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_ChangeNumOpenSlots", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _ChangeNumOpenSlots( IntPtr self, PartyBeaconID_t ulBeacon, uint unOpenSlots );
|
||||
|
||||
#endregion
|
||||
internal async Task<ChangeNumOpenSlotsCallback_t?> ChangeNumOpenSlots( PartyBeaconID_t ulBeacon, uint unOpenSlots )
|
||||
internal CallResult<ChangeNumOpenSlotsCallback_t> ChangeNumOpenSlots( PartyBeaconID_t ulBeacon, uint unOpenSlots )
|
||||
{
|
||||
var returnValue = _ChangeNumOpenSlots( Self, ulBeacon, unOpenSlots );
|
||||
return await ChangeNumOpenSlotsCallback_t.GetResultAsync( returnValue );
|
||||
return new CallResult<ChangeNumOpenSlotsCallback_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_DestroyBeacon", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FDestroyBeacon( IntPtr self, PartyBeaconID_t ulBeacon );
|
||||
private FDestroyBeacon _DestroyBeacon;
|
||||
private static extern bool _DestroyBeacon( IntPtr self, PartyBeaconID_t ulBeacon );
|
||||
|
||||
#endregion
|
||||
internal bool DestroyBeacon( PartyBeaconID_t ulBeacon )
|
||||
@@ -181,10 +146,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamParties_GetBeaconLocationData", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetBeaconLocationData( IntPtr self, SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, IntPtr pchDataStringOut, int cchDataStringOut );
|
||||
private FGetBeaconLocationData _GetBeaconLocationData;
|
||||
private static extern bool _GetBeaconLocationData( IntPtr self, SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, IntPtr pchDataStringOut, int cchDataStringOut );
|
||||
|
||||
#endregion
|
||||
internal bool GetBeaconLocationData( SteamPartyBeaconLocation_t BeaconLocation, SteamPartyBeaconLocationData eData, out string pchDataStringOut )
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamRemotePlay : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamRemotePlay( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamRemotePlay_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamRemotePlay_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamRemotePlay_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionCount", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetSessionCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetSessionCount()
|
||||
{
|
||||
var returnValue = _GetSessionCount( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionID", CallingConvention = Platform.CC)]
|
||||
private static extern RemotePlaySessionID_t _GetSessionID( IntPtr self, int iSessionIndex );
|
||||
|
||||
#endregion
|
||||
internal RemotePlaySessionID_t GetSessionID( int iSessionIndex )
|
||||
{
|
||||
var returnValue = _GetSessionID( Self, iSessionIndex );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionSteamID", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetSessionSteamID( IntPtr self, RemotePlaySessionID_t unSessionID );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetSessionSteamID( RemotePlaySessionID_t unSessionID )
|
||||
{
|
||||
var returnValue = _GetSessionSteamID( Self, unSessionID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionClientName", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetSessionClientName( IntPtr self, RemotePlaySessionID_t unSessionID );
|
||||
|
||||
#endregion
|
||||
internal string GetSessionClientName( RemotePlaySessionID_t unSessionID )
|
||||
{
|
||||
var returnValue = _GetSessionClientName( Self, unSessionID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_GetSessionClientFormFactor", CallingConvention = Platform.CC)]
|
||||
private static extern SteamDeviceFormFactor _GetSessionClientFormFactor( IntPtr self, RemotePlaySessionID_t unSessionID );
|
||||
|
||||
#endregion
|
||||
internal SteamDeviceFormFactor GetSessionClientFormFactor( RemotePlaySessionID_t unSessionID )
|
||||
{
|
||||
var returnValue = _GetSessionClientFormFactor( Self, unSessionID );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_BGetSessionClientResolution", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BGetSessionClientResolution( IntPtr self, RemotePlaySessionID_t unSessionID, ref int pnResolutionX, ref int pnResolutionY );
|
||||
|
||||
#endregion
|
||||
internal bool BGetSessionClientResolution( RemotePlaySessionID_t unSessionID, ref int pnResolutionX, ref int pnResolutionY )
|
||||
{
|
||||
var returnValue = _BGetSessionClientResolution( Self, unSessionID, ref pnResolutionX, ref pnResolutionY );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemotePlay_BSendRemotePlayTogetherInvite", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _BSendRemotePlayTogetherInvite( IntPtr self, SteamId steamIDFriend );
|
||||
|
||||
#endregion
|
||||
internal bool BSendRemotePlayTogetherInvite( SteamId steamIDFriend )
|
||||
{
|
||||
var returnValue = _BSendRemotePlayTogetherInvite( Self, steamIDFriend );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -9,106 +9,21 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamRemoteStorage : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMREMOTESTORAGE_INTERFACE_VERSION014";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamRemoteStorage( bool IsGameServer )
|
||||
{
|
||||
_FileWrite = Marshal.GetDelegateForFunctionPointer<FFileWrite>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_FileRead = Marshal.GetDelegateForFunctionPointer<FFileRead>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_FileWriteAsync = Marshal.GetDelegateForFunctionPointer<FFileWriteAsync>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_FileReadAsync = Marshal.GetDelegateForFunctionPointer<FFileReadAsync>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_FileReadAsyncComplete = Marshal.GetDelegateForFunctionPointer<FFileReadAsyncComplete>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_FileForget = Marshal.GetDelegateForFunctionPointer<FFileForget>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_FileDelete = Marshal.GetDelegateForFunctionPointer<FFileDelete>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_FileShare = Marshal.GetDelegateForFunctionPointer<FFileShare>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_SetSyncPlatforms = Marshal.GetDelegateForFunctionPointer<FSetSyncPlatforms>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_FileWriteStreamOpen = Marshal.GetDelegateForFunctionPointer<FFileWriteStreamOpen>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_FileWriteStreamWriteChunk = Marshal.GetDelegateForFunctionPointer<FFileWriteStreamWriteChunk>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_FileWriteStreamClose = Marshal.GetDelegateForFunctionPointer<FFileWriteStreamClose>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_FileWriteStreamCancel = Marshal.GetDelegateForFunctionPointer<FFileWriteStreamCancel>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_FileExists = Marshal.GetDelegateForFunctionPointer<FFileExists>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_FilePersisted = Marshal.GetDelegateForFunctionPointer<FFilePersisted>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetFileSize = Marshal.GetDelegateForFunctionPointer<FGetFileSize>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_GetFileTimestamp = Marshal.GetDelegateForFunctionPointer<FGetFileTimestamp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetSyncPlatforms = Marshal.GetDelegateForFunctionPointer<FGetSyncPlatforms>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetFileCount = Marshal.GetDelegateForFunctionPointer<FGetFileCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_GetFileNameAndSize = Marshal.GetDelegateForFunctionPointer<FGetFileNameAndSize>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetQuota = Marshal.GetDelegateForFunctionPointer<FGetQuota>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_IsCloudEnabledForAccount = Marshal.GetDelegateForFunctionPointer<FIsCloudEnabledForAccount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_IsCloudEnabledForApp = Marshal.GetDelegateForFunctionPointer<FIsCloudEnabledForApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_SetCloudEnabledForApp = Marshal.GetDelegateForFunctionPointer<FSetCloudEnabledForApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_UGCDownload = Marshal.GetDelegateForFunctionPointer<FUGCDownload>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_GetUGCDownloadProgress = Marshal.GetDelegateForFunctionPointer<FGetUGCDownloadProgress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_GetUGCDetails = Marshal.GetDelegateForFunctionPointer<FGetUGCDetails>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_UGCRead = Marshal.GetDelegateForFunctionPointer<FUGCRead>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_GetCachedUGCCount = Marshal.GetDelegateForFunctionPointer<FGetCachedUGCCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
// PublishWorkshopFile is deprecated
|
||||
// CreatePublishedFileUpdateRequest is deprecated
|
||||
// UpdatePublishedFileFile is deprecated
|
||||
// UpdatePublishedFilePreviewFile is deprecated
|
||||
// UpdatePublishedFileTitle is deprecated
|
||||
// UpdatePublishedFileDescription is deprecated
|
||||
// UpdatePublishedFileVisibility is deprecated
|
||||
// UpdatePublishedFileTags is deprecated
|
||||
// CommitPublishedFileUpdate is deprecated
|
||||
// GetPublishedFileDetails is deprecated
|
||||
// DeletePublishedFile is deprecated
|
||||
// EnumerateUserPublishedFiles is deprecated
|
||||
// SubscribePublishedFile is deprecated
|
||||
// EnumerateUserSubscribedFiles is deprecated
|
||||
// UnsubscribePublishedFile is deprecated
|
||||
// UpdatePublishedFileSetChangeDescription is deprecated
|
||||
// GetPublishedItemVoteDetails is deprecated
|
||||
// UpdateUserPublishedItemVote is deprecated
|
||||
// GetUserPublishedItemVoteDetails is deprecated
|
||||
// EnumerateUserSharedWorkshopFiles is deprecated
|
||||
// PublishVideo is deprecated
|
||||
// SetUserPublishedFileAction is deprecated
|
||||
// EnumeratePublishedFilesByUserAction is deprecated
|
||||
// EnumeratePublishedWorkshopFiles is deprecated
|
||||
_UGCDownloadToLocation = Marshal.GetDelegateForFunctionPointer<FUGCDownloadToLocation>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 424 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_FileWrite = null;
|
||||
_FileRead = null;
|
||||
_FileWriteAsync = null;
|
||||
_FileReadAsync = null;
|
||||
_FileReadAsyncComplete = null;
|
||||
_FileForget = null;
|
||||
_FileDelete = null;
|
||||
_FileShare = null;
|
||||
_SetSyncPlatforms = null;
|
||||
_FileWriteStreamOpen = null;
|
||||
_FileWriteStreamWriteChunk = null;
|
||||
_FileWriteStreamClose = null;
|
||||
_FileWriteStreamCancel = null;
|
||||
_FileExists = null;
|
||||
_FilePersisted = null;
|
||||
_GetFileSize = null;
|
||||
_GetFileTimestamp = null;
|
||||
_GetSyncPlatforms = null;
|
||||
_GetFileCount = null;
|
||||
_GetFileNameAndSize = null;
|
||||
_GetQuota = null;
|
||||
_IsCloudEnabledForAccount = null;
|
||||
_IsCloudEnabledForApp = null;
|
||||
_SetCloudEnabledForApp = null;
|
||||
_UGCDownload = null;
|
||||
_GetUGCDownloadProgress = null;
|
||||
_GetUGCDetails = null;
|
||||
_UGCRead = null;
|
||||
_GetCachedUGCCount = null;
|
||||
_UGCDownloadToLocation = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamRemoteStorage_v014", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamRemoteStorage_v014();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamRemoteStorage_v014();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWrite", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileWrite( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData );
|
||||
private FFileWrite _FileWrite;
|
||||
private static extern bool _FileWrite( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData );
|
||||
|
||||
#endregion
|
||||
internal bool FileWrite( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubData )
|
||||
@@ -118,9 +33,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FFileRead( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead );
|
||||
private FFileRead _FileRead;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileRead", CallingConvention = Platform.CC)]
|
||||
private static extern int _FileRead( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead );
|
||||
|
||||
#endregion
|
||||
internal int FileRead( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, int cubDataToRead )
|
||||
@@ -130,34 +44,31 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FFileWriteAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData );
|
||||
private FFileWriteAsync _FileWriteAsync;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteAsync", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _FileWriteAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData );
|
||||
|
||||
#endregion
|
||||
internal async Task<RemoteStorageFileWriteAsyncComplete_t?> FileWriteAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, IntPtr pvData, uint cubData )
|
||||
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 await RemoteStorageFileWriteAsyncComplete_t.GetResultAsync( returnValue );
|
||||
return new CallResult<RemoteStorageFileWriteAsyncComplete_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FFileReadAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead );
|
||||
private FFileReadAsync _FileReadAsync;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsync", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _FileReadAsync( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead );
|
||||
|
||||
#endregion
|
||||
internal async Task<RemoteStorageFileReadAsyncComplete_t?> FileReadAsync( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, uint nOffset, uint cubToRead )
|
||||
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 await RemoteStorageFileReadAsyncComplete_t.GetResultAsync( returnValue );
|
||||
return new CallResult<RemoteStorageFileReadAsyncComplete_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileReadAsyncComplete", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileReadAsyncComplete( IntPtr self, SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead );
|
||||
private FFileReadAsyncComplete _FileReadAsyncComplete;
|
||||
private static extern bool _FileReadAsyncComplete( IntPtr self, SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead );
|
||||
|
||||
#endregion
|
||||
internal bool FileReadAsyncComplete( SteamAPICall_t hReadCall, IntPtr pvBuffer, uint cubToRead )
|
||||
@@ -167,10 +78,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileForget", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileForget( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFileForget _FileForget;
|
||||
private static extern bool _FileForget( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal bool FileForget( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
@@ -180,10 +90,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileDelete", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileDelete( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFileDelete _FileDelete;
|
||||
private static extern bool _FileDelete( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal bool FileDelete( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
@@ -193,22 +102,20 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FFileShare( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFileShare _FileShare;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileShare", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _FileShare( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal async Task<RemoteStorageFileShareResult_t?> FileShare( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
internal CallResult<RemoteStorageFileShareResult_t> FileShare( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
{
|
||||
var returnValue = _FileShare( Self, pchFile );
|
||||
return await RemoteStorageFileShareResult_t.GetResultAsync( returnValue );
|
||||
return new CallResult<RemoteStorageFileShareResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetSyncPlatforms", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform );
|
||||
private FSetSyncPlatforms _SetSyncPlatforms;
|
||||
private static extern bool _SetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform );
|
||||
|
||||
#endregion
|
||||
internal bool SetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile, RemoteStoragePlatform eRemoteStoragePlatform )
|
||||
@@ -218,9 +125,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate UGCFileWriteStreamHandle_t FFileWriteStreamOpen( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFileWriteStreamOpen _FileWriteStreamOpen;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamOpen", CallingConvention = Platform.CC)]
|
||||
private static extern UGCFileWriteStreamHandle_t _FileWriteStreamOpen( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal UGCFileWriteStreamHandle_t FileWriteStreamOpen( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
@@ -230,10 +136,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamWriteChunk", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileWriteStreamWriteChunk( IntPtr self, UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData );
|
||||
private FFileWriteStreamWriteChunk _FileWriteStreamWriteChunk;
|
||||
private static extern bool _FileWriteStreamWriteChunk( IntPtr self, UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData );
|
||||
|
||||
#endregion
|
||||
internal bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, IntPtr pvData, int cubData )
|
||||
@@ -243,10 +148,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamClose", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileWriteStreamClose( IntPtr self, UGCFileWriteStreamHandle_t writeHandle );
|
||||
private FFileWriteStreamClose _FileWriteStreamClose;
|
||||
private static extern bool _FileWriteStreamClose( IntPtr self, UGCFileWriteStreamHandle_t writeHandle );
|
||||
|
||||
#endregion
|
||||
internal bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle )
|
||||
@@ -256,10 +160,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileWriteStreamCancel", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileWriteStreamCancel( IntPtr self, UGCFileWriteStreamHandle_t writeHandle );
|
||||
private FFileWriteStreamCancel _FileWriteStreamCancel;
|
||||
private static extern bool _FileWriteStreamCancel( IntPtr self, UGCFileWriteStreamHandle_t writeHandle );
|
||||
|
||||
#endregion
|
||||
internal bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle )
|
||||
@@ -269,10 +172,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FileExists", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFileExists( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFileExists _FileExists;
|
||||
private static extern bool _FileExists( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal bool FileExists( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
@@ -282,10 +184,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_FilePersisted", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FFilePersisted( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FFilePersisted _FilePersisted;
|
||||
private static extern bool _FilePersisted( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal bool FilePersisted( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
@@ -295,9 +196,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetFileSize( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FGetFileSize _GetFileSize;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileSize", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFileSize( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal int GetFileSize( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
@@ -307,9 +207,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate long FGetFileTimestamp( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FGetFileTimestamp _GetFileTimestamp;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileTimestamp", CallingConvention = Platform.CC)]
|
||||
private static extern long _GetFileTimestamp( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal long GetFileTimestamp( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
@@ -319,9 +218,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate RemoteStoragePlatform FGetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
private FGetSyncPlatforms _GetSyncPlatforms;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetSyncPlatforms", CallingConvention = Platform.CC)]
|
||||
private static extern RemoteStoragePlatform _GetSyncPlatforms( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile );
|
||||
|
||||
#endregion
|
||||
internal RemoteStoragePlatform GetSyncPlatforms( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFile )
|
||||
@@ -331,9 +229,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetFileCount( IntPtr self );
|
||||
private FGetFileCount _GetFileCount;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetFileCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetFileCount()
|
||||
@@ -343,9 +240,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetFileNameAndSize( IntPtr self, int iFile, ref int pnFileSizeInBytes );
|
||||
private FGetFileNameAndSize _GetFileNameAndSize;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetFileNameAndSize", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetFileNameAndSize( IntPtr self, int iFile, ref int pnFileSizeInBytes );
|
||||
|
||||
#endregion
|
||||
internal string GetFileNameAndSize( int iFile, ref int pnFileSizeInBytes )
|
||||
@@ -355,10 +251,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetQuota", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetQuota( IntPtr self, ref ulong pnTotalBytes, ref ulong puAvailableBytes );
|
||||
private FGetQuota _GetQuota;
|
||||
private static extern bool _GetQuota( IntPtr self, ref ulong pnTotalBytes, ref ulong puAvailableBytes );
|
||||
|
||||
#endregion
|
||||
internal bool GetQuota( ref ulong pnTotalBytes, ref ulong puAvailableBytes )
|
||||
@@ -368,10 +263,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForAccount", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsCloudEnabledForAccount( IntPtr self );
|
||||
private FIsCloudEnabledForAccount _IsCloudEnabledForAccount;
|
||||
private static extern bool _IsCloudEnabledForAccount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsCloudEnabledForAccount()
|
||||
@@ -381,10 +275,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_IsCloudEnabledForApp", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsCloudEnabledForApp( IntPtr self );
|
||||
private FIsCloudEnabledForApp _IsCloudEnabledForApp;
|
||||
private static extern bool _IsCloudEnabledForApp( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsCloudEnabledForApp()
|
||||
@@ -394,9 +287,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetCloudEnabledForApp( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled );
|
||||
private FSetCloudEnabledForApp _SetCloudEnabledForApp;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_SetCloudEnabledForApp", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetCloudEnabledForApp( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled );
|
||||
|
||||
#endregion
|
||||
internal void SetCloudEnabledForApp( [MarshalAs( UnmanagedType.U1 )] bool bEnabled )
|
||||
@@ -405,22 +297,20 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FUGCDownload( IntPtr self, UGCHandle_t hContent, uint unPriority );
|
||||
private FUGCDownload _UGCDownload;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownload", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _UGCDownload( IntPtr self, UGCHandle_t hContent, uint unPriority );
|
||||
|
||||
#endregion
|
||||
internal async Task<RemoteStorageDownloadUGCResult_t?> UGCDownload( UGCHandle_t hContent, uint unPriority )
|
||||
internal CallResult<RemoteStorageDownloadUGCResult_t> UGCDownload( UGCHandle_t hContent, uint unPriority )
|
||||
{
|
||||
var returnValue = _UGCDownload( Self, hContent, unPriority );
|
||||
return await RemoteStorageDownloadUGCResult_t.GetResultAsync( returnValue );
|
||||
return new CallResult<RemoteStorageDownloadUGCResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDownloadProgress", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUGCDownloadProgress( IntPtr self, UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected );
|
||||
private FGetUGCDownloadProgress _GetUGCDownloadProgress;
|
||||
private static extern bool _GetUGCDownloadProgress( IntPtr self, UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected );
|
||||
|
||||
#endregion
|
||||
internal bool GetUGCDownloadProgress( UGCHandle_t hContent, ref int pnBytesDownloaded, ref int pnBytesExpected )
|
||||
@@ -430,10 +320,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetUGCDetails", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUGCDetails( IntPtr self, UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner );
|
||||
private FGetUGCDetails _GetUGCDetails;
|
||||
private static extern bool _GetUGCDetails( IntPtr self, UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner );
|
||||
|
||||
#endregion
|
||||
internal bool GetUGCDetails( UGCHandle_t hContent, ref AppId pnAppID, [In,Out] ref char[] ppchName, ref int pnFileSizeInBytes, ref SteamId pSteamIDOwner )
|
||||
@@ -443,9 +332,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FUGCRead( IntPtr self, UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction );
|
||||
private FUGCRead _UGCRead;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCRead", CallingConvention = Platform.CC)]
|
||||
private static extern int _UGCRead( IntPtr self, UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction );
|
||||
|
||||
#endregion
|
||||
internal int UGCRead( UGCHandle_t hContent, IntPtr pvData, int cubDataToRead, uint cOffset, UGCReadAction eAction )
|
||||
@@ -455,9 +343,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetCachedUGCCount( IntPtr self );
|
||||
private FGetCachedUGCCount _GetCachedUGCCount;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetCachedUGCCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetCachedUGCCount()
|
||||
@@ -467,15 +354,25 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FUGCDownloadToLocation( IntPtr self, UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority );
|
||||
private FUGCDownloadToLocation _UGCDownloadToLocation;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_GetCachedUGCHandle", CallingConvention = Platform.CC)]
|
||||
private static extern UGCHandle_t _GetCachedUGCHandle( IntPtr self, int iCachedContent );
|
||||
|
||||
#endregion
|
||||
internal async Task<RemoteStorageDownloadUGCResult_t?> UGCDownloadToLocation( UGCHandle_t hContent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation, uint unPriority )
|
||||
internal UGCHandle_t GetCachedUGCHandle( int iCachedContent )
|
||||
{
|
||||
var returnValue = _GetCachedUGCHandle( Self, iCachedContent );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamRemoteStorage_UGCDownloadToLocation", 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 await RemoteStorageDownloadUGCResult_t.GetResultAsync( returnValue );
|
||||
return new CallResult<RemoteStorageDownloadUGCResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,39 +9,20 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamScreenshots : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMSCREENSHOTS_INTERFACE_VERSION003";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamScreenshots( bool IsGameServer )
|
||||
{
|
||||
_WriteScreenshot = Marshal.GetDelegateForFunctionPointer<FWriteScreenshot>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_AddScreenshotToLibrary = Marshal.GetDelegateForFunctionPointer<FAddScreenshotToLibrary>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_TriggerScreenshot = Marshal.GetDelegateForFunctionPointer<FTriggerScreenshot>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_HookScreenshots = Marshal.GetDelegateForFunctionPointer<FHookScreenshots>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_SetLocation = Marshal.GetDelegateForFunctionPointer<FSetLocation>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_TagUser = Marshal.GetDelegateForFunctionPointer<FTagUser>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_TagPublishedFile = Marshal.GetDelegateForFunctionPointer<FTagPublishedFile>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_IsScreenshotsHooked = Marshal.GetDelegateForFunctionPointer<FIsScreenshotsHooked>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_AddVRScreenshotToLibrary = Marshal.GetDelegateForFunctionPointer<FAddVRScreenshotToLibrary>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_WriteScreenshot = null;
|
||||
_AddScreenshotToLibrary = null;
|
||||
_TriggerScreenshot = null;
|
||||
_HookScreenshots = null;
|
||||
_SetLocation = null;
|
||||
_TagUser = null;
|
||||
_TagPublishedFile = null;
|
||||
_IsScreenshotsHooked = null;
|
||||
_AddVRScreenshotToLibrary = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamScreenshots_v003", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamScreenshots_v003();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamScreenshots_v003();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate ScreenshotHandle FWriteScreenshot( IntPtr self, IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight );
|
||||
private FWriteScreenshot _WriteScreenshot;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_WriteScreenshot", CallingConvention = Platform.CC)]
|
||||
private static extern ScreenshotHandle _WriteScreenshot( IntPtr self, IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight );
|
||||
|
||||
#endregion
|
||||
internal ScreenshotHandle WriteScreenshot( IntPtr pubRGB, uint cubRGB, int nWidth, int nHeight )
|
||||
@@ -51,9 +32,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate ScreenshotHandle FAddScreenshotToLibrary( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight );
|
||||
private FAddScreenshotToLibrary _AddScreenshotToLibrary;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_AddScreenshotToLibrary", CallingConvention = Platform.CC)]
|
||||
private static extern ScreenshotHandle _AddScreenshotToLibrary( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight );
|
||||
|
||||
#endregion
|
||||
internal ScreenshotHandle AddScreenshotToLibrary( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchThumbnailFilename, int nWidth, int nHeight )
|
||||
@@ -63,9 +43,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FTriggerScreenshot( IntPtr self );
|
||||
private FTriggerScreenshot _TriggerScreenshot;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TriggerScreenshot", CallingConvention = Platform.CC)]
|
||||
private static extern void _TriggerScreenshot( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void TriggerScreenshot()
|
||||
@@ -74,9 +53,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FHookScreenshots( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bHook );
|
||||
private FHookScreenshots _HookScreenshots;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_HookScreenshots", CallingConvention = Platform.CC)]
|
||||
private static extern void _HookScreenshots( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bHook );
|
||||
|
||||
#endregion
|
||||
internal void HookScreenshots( [MarshalAs( UnmanagedType.U1 )] bool bHook )
|
||||
@@ -85,10 +63,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_SetLocation", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetLocation( IntPtr self, ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation );
|
||||
private FSetLocation _SetLocation;
|
||||
private static extern bool _SetLocation( IntPtr self, ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation );
|
||||
|
||||
#endregion
|
||||
internal bool SetLocation( ScreenshotHandle hScreenshot, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLocation )
|
||||
@@ -98,10 +75,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TagUser", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FTagUser( IntPtr self, ScreenshotHandle hScreenshot, SteamId steamID );
|
||||
private FTagUser _TagUser;
|
||||
private static extern bool _TagUser( IntPtr self, ScreenshotHandle hScreenshot, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal bool TagUser( ScreenshotHandle hScreenshot, SteamId steamID )
|
||||
@@ -111,10 +87,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_TagPublishedFile", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FTagPublishedFile( IntPtr self, ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID );
|
||||
private FTagPublishedFile _TagPublishedFile;
|
||||
private static extern bool _TagPublishedFile( IntPtr self, ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID );
|
||||
|
||||
#endregion
|
||||
internal bool TagPublishedFile( ScreenshotHandle hScreenshot, PublishedFileId unPublishedFileID )
|
||||
@@ -124,10 +99,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_IsScreenshotsHooked", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsScreenshotsHooked( IntPtr self );
|
||||
private FIsScreenshotsHooked _IsScreenshotsHooked;
|
||||
private static extern bool _IsScreenshotsHooked( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsScreenshotsHooked()
|
||||
@@ -137,9 +111,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate ScreenshotHandle FAddVRScreenshotToLibrary( IntPtr self, VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename );
|
||||
private FAddVRScreenshotToLibrary _AddVRScreenshotToLibrary;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamScreenshots_AddVRScreenshotToLibrary", CallingConvention = Platform.CC)]
|
||||
private static extern ScreenshotHandle _AddVRScreenshotToLibrary( IntPtr self, VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename );
|
||||
|
||||
#endregion
|
||||
internal ScreenshotHandle AddVRScreenshotToLibrary( VRScreenshotType eType, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchFilename, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVRFilename )
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal class ISteamTV : SteamInterface
|
||||
{
|
||||
|
||||
internal ISteamTV( bool IsGameServer )
|
||||
{
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamTV_v001", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamTV_v001();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamTV_v001();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_IsBroadcasting", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsBroadcasting( IntPtr self, ref int pnNumViewers );
|
||||
|
||||
#endregion
|
||||
internal bool IsBroadcasting( ref int pnNumViewers )
|
||||
{
|
||||
var returnValue = _IsBroadcasting( Self, ref pnNumViewers );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_AddBroadcastGameData", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddBroadcastGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue );
|
||||
|
||||
#endregion
|
||||
internal void AddBroadcastGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchValue )
|
||||
{
|
||||
_AddBroadcastGameData( Self, pchKey, pchValue );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_RemoveBroadcastGameData", CallingConvention = Platform.CC)]
|
||||
private static extern void _RemoveBroadcastGameData( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal void RemoveBroadcastGameData( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
{
|
||||
_RemoveBroadcastGameData( Self, pchKey );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_AddTimelineMarker", CallingConvention = Platform.CC)]
|
||||
private static extern void _AddTimelineMarker( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTemplateName, [MarshalAs( UnmanagedType.U1 )] bool bPersistent, byte nColorR, byte nColorG, byte nColorB );
|
||||
|
||||
#endregion
|
||||
internal void AddTimelineMarker( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTemplateName, [MarshalAs( UnmanagedType.U1 )] bool bPersistent, byte nColorR, byte nColorG, byte nColorB )
|
||||
{
|
||||
_AddTimelineMarker( Self, pchTemplateName, bPersistent, nColorR, nColorG, nColorB );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_RemoveTimelineMarker", CallingConvention = Platform.CC)]
|
||||
private static extern void _RemoveTimelineMarker( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void RemoveTimelineMarker()
|
||||
{
|
||||
_RemoveTimelineMarker( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_AddRegion", CallingConvention = Platform.CC)]
|
||||
private static extern uint _AddRegion( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchElementName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTimelineDataSection, ref SteamTVRegion_t pSteamTVRegion, SteamTVRegionBehavior eSteamTVRegionBehavior );
|
||||
|
||||
#endregion
|
||||
internal uint AddRegion( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchElementName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchTimelineDataSection, ref SteamTVRegion_t pSteamTVRegion, SteamTVRegionBehavior eSteamTVRegionBehavior )
|
||||
{
|
||||
var returnValue = _AddRegion( Self, pchElementName, pchTimelineDataSection, ref pSteamTVRegion, eSteamTVRegionBehavior );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamTV_RemoveRegion", CallingConvention = Platform.CC)]
|
||||
private static extern void _RemoveRegion( IntPtr self, uint unRegionHandle );
|
||||
|
||||
#endregion
|
||||
internal void RemoveRegion( uint unRegionHandle )
|
||||
{
|
||||
_RemoveRegion( Self, unRegionHandle );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -9,81 +9,20 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamUser : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamUser020";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamUser( bool IsGameServer )
|
||||
{
|
||||
_GetHSteamUser = Marshal.GetDelegateForFunctionPointer<FGetHSteamUser>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_BLoggedOn = Marshal.GetDelegateForFunctionPointer<FBLoggedOn>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetSteamID = Marshal.GetDelegateForFunctionPointer<FGetSteamID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_InitiateGameConnection = Marshal.GetDelegateForFunctionPointer<FInitiateGameConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_TerminateGameConnection = Marshal.GetDelegateForFunctionPointer<FTerminateGameConnection>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_TrackAppUsageEvent = Marshal.GetDelegateForFunctionPointer<FTrackAppUsageEvent>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetUserDataFolder = Marshal.GetDelegateForFunctionPointer<FGetUserDataFolder>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_StartVoiceRecording = Marshal.GetDelegateForFunctionPointer<FStartVoiceRecording>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_StopVoiceRecording = Marshal.GetDelegateForFunctionPointer<FStopVoiceRecording>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_GetAvailableVoice = Marshal.GetDelegateForFunctionPointer<FGetAvailableVoice>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_GetVoice = Marshal.GetDelegateForFunctionPointer<FGetVoice>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_DecompressVoice = Marshal.GetDelegateForFunctionPointer<FDecompressVoice>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_GetVoiceOptimalSampleRate = Marshal.GetDelegateForFunctionPointer<FGetVoiceOptimalSampleRate>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_GetAuthSessionTicket = Marshal.GetDelegateForFunctionPointer<FGetAuthSessionTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_BeginAuthSession = Marshal.GetDelegateForFunctionPointer<FBeginAuthSession>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_EndAuthSession = Marshal.GetDelegateForFunctionPointer<FEndAuthSession>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_CancelAuthTicket = Marshal.GetDelegateForFunctionPointer<FCancelAuthTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_UserHasLicenseForApp = Marshal.GetDelegateForFunctionPointer<FUserHasLicenseForApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_BIsBehindNAT = Marshal.GetDelegateForFunctionPointer<FBIsBehindNAT>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_AdvertiseGame = Marshal.GetDelegateForFunctionPointer<FAdvertiseGame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_RequestEncryptedAppTicket = Marshal.GetDelegateForFunctionPointer<FRequestEncryptedAppTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetEncryptedAppTicket = Marshal.GetDelegateForFunctionPointer<FGetEncryptedAppTicket>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_GetGameBadgeLevel = Marshal.GetDelegateForFunctionPointer<FGetGameBadgeLevel>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_GetPlayerSteamLevel = Marshal.GetDelegateForFunctionPointer<FGetPlayerSteamLevel>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_RequestStoreAuthURL = Marshal.GetDelegateForFunctionPointer<FRequestStoreAuthURL>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_BIsPhoneVerified = Marshal.GetDelegateForFunctionPointer<FBIsPhoneVerified>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_BIsTwoFactorEnabled = Marshal.GetDelegateForFunctionPointer<FBIsTwoFactorEnabled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_BIsPhoneIdentifying = Marshal.GetDelegateForFunctionPointer<FBIsPhoneIdentifying>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_BIsPhoneRequiringVerification = Marshal.GetDelegateForFunctionPointer<FBIsPhoneRequiringVerification>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_GetMarketEligibility = Marshal.GetDelegateForFunctionPointer<FGetMarketEligibility>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_GetHSteamUser = null;
|
||||
_BLoggedOn = null;
|
||||
_GetSteamID = null;
|
||||
_InitiateGameConnection = null;
|
||||
_TerminateGameConnection = null;
|
||||
_TrackAppUsageEvent = null;
|
||||
_GetUserDataFolder = null;
|
||||
_StartVoiceRecording = null;
|
||||
_StopVoiceRecording = null;
|
||||
_GetAvailableVoice = null;
|
||||
_GetVoice = null;
|
||||
_DecompressVoice = null;
|
||||
_GetVoiceOptimalSampleRate = null;
|
||||
_GetAuthSessionTicket = null;
|
||||
_BeginAuthSession = null;
|
||||
_EndAuthSession = null;
|
||||
_CancelAuthTicket = null;
|
||||
_UserHasLicenseForApp = null;
|
||||
_BIsBehindNAT = null;
|
||||
_AdvertiseGame = null;
|
||||
_RequestEncryptedAppTicket = null;
|
||||
_GetEncryptedAppTicket = null;
|
||||
_GetGameBadgeLevel = null;
|
||||
_GetPlayerSteamLevel = null;
|
||||
_RequestStoreAuthURL = null;
|
||||
_BIsPhoneVerified = null;
|
||||
_BIsTwoFactorEnabled = null;
|
||||
_BIsPhoneIdentifying = null;
|
||||
_BIsPhoneRequiringVerification = null;
|
||||
_GetMarketEligibility = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUser_v020", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamUser_v020();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUser_v020();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HSteamUser FGetHSteamUser( IntPtr self );
|
||||
private FGetHSteamUser _GetHSteamUser;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetHSteamUser", CallingConvention = Platform.CC)]
|
||||
private static extern HSteamUser _GetHSteamUser( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal HSteamUser GetHSteamUser()
|
||||
@@ -93,10 +32,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BLoggedOn", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBLoggedOn( IntPtr self );
|
||||
private FBLoggedOn _BLoggedOn;
|
||||
private static extern bool _BLoggedOn( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BLoggedOn()
|
||||
@@ -106,31 +44,19 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
#if PLATFORM_WIN
|
||||
private delegate void FGetSteamID( IntPtr self, ref SteamId retVal );
|
||||
#else
|
||||
private delegate SteamId FGetSteamID( IntPtr self );
|
||||
#endif
|
||||
private FGetSteamID _GetSteamID;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetSteamID", CallingConvention = Platform.CC)]
|
||||
private static extern SteamId _GetSteamID( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal SteamId GetSteamID()
|
||||
{
|
||||
#if PLATFORM_WIN
|
||||
var retVal = default( SteamId );
|
||||
_GetSteamID( Self, ref retVal );
|
||||
return retVal;
|
||||
#else
|
||||
var returnValue = _GetSteamID( Self );
|
||||
return returnValue;
|
||||
#endif
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FInitiateGameConnection( IntPtr self, IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure );
|
||||
private FInitiateGameConnection _InitiateGameConnection;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_InitiateGameConnection", CallingConvention = Platform.CC)]
|
||||
private static extern int _InitiateGameConnection( IntPtr self, IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure );
|
||||
|
||||
#endregion
|
||||
internal int InitiateGameConnection( IntPtr pAuthBlob, int cbMaxAuthBlob, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer, [MarshalAs( UnmanagedType.U1 )] bool bSecure )
|
||||
@@ -140,9 +66,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FTerminateGameConnection( IntPtr self, uint unIPServer, ushort usPortServer );
|
||||
private FTerminateGameConnection _TerminateGameConnection;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_TerminateGameConnection", CallingConvention = Platform.CC)]
|
||||
private static extern void _TerminateGameConnection( IntPtr self, uint unIPServer, ushort usPortServer );
|
||||
|
||||
#endregion
|
||||
internal void TerminateGameConnection( uint unIPServer, ushort usPortServer )
|
||||
@@ -151,9 +76,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FTrackAppUsageEvent( IntPtr self, GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo );
|
||||
private FTrackAppUsageEvent _TrackAppUsageEvent;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_TrackAppUsageEvent", CallingConvention = Platform.CC)]
|
||||
private static extern void _TrackAppUsageEvent( IntPtr self, GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo );
|
||||
|
||||
#endregion
|
||||
internal void TrackAppUsageEvent( GameId gameID, int eAppUsageEvent, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExtraInfo )
|
||||
@@ -162,10 +86,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetUserDataFolder", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUserDataFolder( IntPtr self, IntPtr pchBuffer, int cubBuffer );
|
||||
private FGetUserDataFolder _GetUserDataFolder;
|
||||
private static extern bool _GetUserDataFolder( IntPtr self, IntPtr pchBuffer, int cubBuffer );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserDataFolder( out string pchBuffer )
|
||||
@@ -177,9 +100,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FStartVoiceRecording( IntPtr self );
|
||||
private FStartVoiceRecording _StartVoiceRecording;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_StartVoiceRecording", CallingConvention = Platform.CC)]
|
||||
private static extern void _StartVoiceRecording( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void StartVoiceRecording()
|
||||
@@ -188,9 +110,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FStopVoiceRecording( IntPtr self );
|
||||
private FStopVoiceRecording _StopVoiceRecording;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_StopVoiceRecording", CallingConvention = Platform.CC)]
|
||||
private static extern void _StopVoiceRecording( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void StopVoiceRecording()
|
||||
@@ -199,9 +120,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate VoiceResult FGetAvailableVoice( IntPtr self, ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
|
||||
private FGetAvailableVoice _GetAvailableVoice;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetAvailableVoice", CallingConvention = Platform.CC)]
|
||||
private static extern VoiceResult _GetAvailableVoice( IntPtr self, ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
|
||||
|
||||
#endregion
|
||||
internal VoiceResult GetAvailableVoice( ref uint pcbCompressed, ref uint pcbUncompressed_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated )
|
||||
@@ -211,9 +131,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate VoiceResult FGetVoice( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
|
||||
private FGetVoice _GetVoice;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetVoice", CallingConvention = Platform.CC)]
|
||||
private static extern VoiceResult _GetVoice( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated );
|
||||
|
||||
#endregion
|
||||
internal VoiceResult GetVoice( [MarshalAs( UnmanagedType.U1 )] bool bWantCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, [MarshalAs( UnmanagedType.U1 )] bool bWantUncompressed_Deprecated, IntPtr pUncompressedDestBuffer_Deprecated, uint cbUncompressedDestBufferSize_Deprecated, ref uint nUncompressBytesWritten_Deprecated, uint nUncompressedVoiceDesiredSampleRate_Deprecated )
|
||||
@@ -223,9 +142,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate VoiceResult FDecompressVoice( IntPtr self, IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate );
|
||||
private FDecompressVoice _DecompressVoice;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_DecompressVoice", CallingConvention = Platform.CC)]
|
||||
private static extern VoiceResult _DecompressVoice( IntPtr self, IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate );
|
||||
|
||||
#endregion
|
||||
internal VoiceResult DecompressVoice( IntPtr pCompressed, uint cbCompressed, IntPtr pDestBuffer, uint cbDestBufferSize, ref uint nBytesWritten, uint nDesiredSampleRate )
|
||||
@@ -235,9 +153,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetVoiceOptimalSampleRate( IntPtr self );
|
||||
private FGetVoiceOptimalSampleRate _GetVoiceOptimalSampleRate;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetVoiceOptimalSampleRate", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetVoiceOptimalSampleRate( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetVoiceOptimalSampleRate()
|
||||
@@ -247,9 +164,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate HAuthTicket FGetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
|
||||
private FGetAuthSessionTicket _GetAuthSessionTicket;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetAuthSessionTicket", CallingConvention = Platform.CC)]
|
||||
private static extern HAuthTicket _GetAuthSessionTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
|
||||
|
||||
#endregion
|
||||
internal HAuthTicket GetAuthSessionTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
|
||||
@@ -259,9 +175,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate BeginAuthResult FBeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
|
||||
private FBeginAuthSession _BeginAuthSession;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BeginAuthSession", CallingConvention = Platform.CC)]
|
||||
private static extern BeginAuthResult _BeginAuthSession( IntPtr self, IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal BeginAuthResult BeginAuthSession( IntPtr pAuthTicket, int cbAuthTicket, SteamId steamID )
|
||||
@@ -271,9 +186,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FEndAuthSession( IntPtr self, SteamId steamID );
|
||||
private FEndAuthSession _EndAuthSession;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_EndAuthSession", CallingConvention = Platform.CC)]
|
||||
private static extern void _EndAuthSession( IntPtr self, SteamId steamID );
|
||||
|
||||
#endregion
|
||||
internal void EndAuthSession( SteamId steamID )
|
||||
@@ -282,9 +196,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FCancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
|
||||
private FCancelAuthTicket _CancelAuthTicket;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_CancelAuthTicket", CallingConvention = Platform.CC)]
|
||||
private static extern void _CancelAuthTicket( IntPtr self, HAuthTicket hAuthTicket );
|
||||
|
||||
#endregion
|
||||
internal void CancelAuthTicket( HAuthTicket hAuthTicket )
|
||||
@@ -293,9 +206,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate UserHasLicenseForAppResult FUserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
|
||||
private FUserHasLicenseForApp _UserHasLicenseForApp;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_UserHasLicenseForApp", CallingConvention = Platform.CC)]
|
||||
private static extern UserHasLicenseForAppResult _UserHasLicenseForApp( IntPtr self, SteamId steamID, AppId appID );
|
||||
|
||||
#endregion
|
||||
internal UserHasLicenseForAppResult UserHasLicenseForApp( SteamId steamID, AppId appID )
|
||||
@@ -305,10 +217,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsBehindNAT", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsBehindNAT( IntPtr self );
|
||||
private FBIsBehindNAT _BIsBehindNAT;
|
||||
private static extern bool _BIsBehindNAT( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsBehindNAT()
|
||||
@@ -318,9 +229,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FAdvertiseGame( IntPtr self, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer );
|
||||
private FAdvertiseGame _AdvertiseGame;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_AdvertiseGame", CallingConvention = Platform.CC)]
|
||||
private static extern void _AdvertiseGame( IntPtr self, SteamId steamIDGameServer, uint unIPServer, ushort usPortServer );
|
||||
|
||||
#endregion
|
||||
internal void AdvertiseGame( SteamId steamIDGameServer, uint unIPServer, ushort usPortServer )
|
||||
@@ -329,22 +239,20 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestEncryptedAppTicket( IntPtr self, IntPtr pDataToInclude, int cbDataToInclude );
|
||||
private FRequestEncryptedAppTicket _RequestEncryptedAppTicket;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_RequestEncryptedAppTicket", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestEncryptedAppTicket( IntPtr self, IntPtr pDataToInclude, int cbDataToInclude );
|
||||
|
||||
#endregion
|
||||
internal async Task<EncryptedAppTicketResponse_t?> RequestEncryptedAppTicket( IntPtr pDataToInclude, int cbDataToInclude )
|
||||
internal CallResult<EncryptedAppTicketResponse_t> RequestEncryptedAppTicket( IntPtr pDataToInclude, int cbDataToInclude )
|
||||
{
|
||||
var returnValue = _RequestEncryptedAppTicket( Self, pDataToInclude, cbDataToInclude );
|
||||
return await EncryptedAppTicketResponse_t.GetResultAsync( returnValue );
|
||||
return new CallResult<EncryptedAppTicketResponse_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetEncryptedAppTicket", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetEncryptedAppTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
|
||||
private FGetEncryptedAppTicket _GetEncryptedAppTicket;
|
||||
private static extern bool _GetEncryptedAppTicket( IntPtr self, IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket );
|
||||
|
||||
#endregion
|
||||
internal bool GetEncryptedAppTicket( IntPtr pTicket, int cbMaxTicket, ref uint pcbTicket )
|
||||
@@ -354,9 +262,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetGameBadgeLevel( IntPtr self, int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil );
|
||||
private FGetGameBadgeLevel _GetGameBadgeLevel;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetGameBadgeLevel", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetGameBadgeLevel( IntPtr self, int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil );
|
||||
|
||||
#endregion
|
||||
internal int GetGameBadgeLevel( int nSeries, [MarshalAs( UnmanagedType.U1 )] bool bFoil )
|
||||
@@ -366,9 +273,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetPlayerSteamLevel( IntPtr self );
|
||||
private FGetPlayerSteamLevel _GetPlayerSteamLevel;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetPlayerSteamLevel", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetPlayerSteamLevel( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal int GetPlayerSteamLevel()
|
||||
@@ -378,22 +284,20 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestStoreAuthURL( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL );
|
||||
private FRequestStoreAuthURL _RequestStoreAuthURL;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_RequestStoreAuthURL", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestStoreAuthURL( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL );
|
||||
|
||||
#endregion
|
||||
internal async Task<StoreAuthURLResponse_t?> RequestStoreAuthURL( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL )
|
||||
internal CallResult<StoreAuthURLResponse_t> RequestStoreAuthURL( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchRedirectURL )
|
||||
{
|
||||
var returnValue = _RequestStoreAuthURL( Self, pchRedirectURL );
|
||||
return await StoreAuthURLResponse_t.GetResultAsync( returnValue );
|
||||
return new CallResult<StoreAuthURLResponse_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneVerified", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsPhoneVerified( IntPtr self );
|
||||
private FBIsPhoneVerified _BIsPhoneVerified;
|
||||
private static extern bool _BIsPhoneVerified( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsPhoneVerified()
|
||||
@@ -403,10 +307,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsTwoFactorEnabled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsTwoFactorEnabled( IntPtr self );
|
||||
private FBIsTwoFactorEnabled _BIsTwoFactorEnabled;
|
||||
private static extern bool _BIsTwoFactorEnabled( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsTwoFactorEnabled()
|
||||
@@ -416,10 +319,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneIdentifying", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsPhoneIdentifying( IntPtr self );
|
||||
private FBIsPhoneIdentifying _BIsPhoneIdentifying;
|
||||
private static extern bool _BIsPhoneIdentifying( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsPhoneIdentifying()
|
||||
@@ -429,10 +331,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BIsPhoneRequiringVerification", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBIsPhoneRequiringVerification( IntPtr self );
|
||||
private FBIsPhoneRequiringVerification _BIsPhoneRequiringVerification;
|
||||
private static extern bool _BIsPhoneRequiringVerification( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BIsPhoneRequiringVerification()
|
||||
@@ -442,15 +343,25 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FGetMarketEligibility( IntPtr self );
|
||||
private FGetMarketEligibility _GetMarketEligibility;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_GetMarketEligibility", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetMarketEligibility( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal async Task<MarketEligibilityResponse_t?> GetMarketEligibility()
|
||||
internal CallResult<MarketEligibilityResponse_t> GetMarketEligibility()
|
||||
{
|
||||
var returnValue = _GetMarketEligibility( Self );
|
||||
return await MarketEligibilityResponse_t.GetResultAsync( returnValue );
|
||||
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 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -9,122 +9,21 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamUserStats : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMUSERSTATS_INTERFACE_VERSION011";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamUserStats( bool IsGameServer )
|
||||
{
|
||||
_RequestCurrentStats = Marshal.GetDelegateForFunctionPointer<FRequestCurrentStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_UpdateAvgRateStat = Marshal.GetDelegateForFunctionPointer<FUpdateAvgRateStat>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetAchievement = Marshal.GetDelegateForFunctionPointer<FGetAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_SetAchievement = Marshal.GetDelegateForFunctionPointer<FSetAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_ClearAchievement = Marshal.GetDelegateForFunctionPointer<FClearAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_GetAchievementAndUnlockTime = Marshal.GetDelegateForFunctionPointer<FGetAchievementAndUnlockTime>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_StoreStats = Marshal.GetDelegateForFunctionPointer<FStoreStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_GetAchievementIcon = Marshal.GetDelegateForFunctionPointer<FGetAchievementIcon>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_GetAchievementDisplayAttribute = Marshal.GetDelegateForFunctionPointer<FGetAchievementDisplayAttribute>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_IndicateAchievementProgress = Marshal.GetDelegateForFunctionPointer<FIndicateAchievementProgress>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_GetNumAchievements = Marshal.GetDelegateForFunctionPointer<FGetNumAchievements>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetAchievementName = Marshal.GetDelegateForFunctionPointer<FGetAchievementName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_RequestUserStats = Marshal.GetDelegateForFunctionPointer<FRequestUserStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_GetUserAchievement = Marshal.GetDelegateForFunctionPointer<FGetUserAchievement>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_GetUserAchievementAndUnlockTime = Marshal.GetDelegateForFunctionPointer<FGetUserAchievementAndUnlockTime>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_ResetAllStats = Marshal.GetDelegateForFunctionPointer<FResetAllStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_FindOrCreateLeaderboard = Marshal.GetDelegateForFunctionPointer<FFindOrCreateLeaderboard>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_FindLeaderboard = Marshal.GetDelegateForFunctionPointer<FFindLeaderboard>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_GetLeaderboardName = Marshal.GetDelegateForFunctionPointer<FGetLeaderboardName>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_GetLeaderboardEntryCount = Marshal.GetDelegateForFunctionPointer<FGetLeaderboardEntryCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_GetLeaderboardSortMethod = Marshal.GetDelegateForFunctionPointer<FGetLeaderboardSortMethod>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_GetLeaderboardDisplayType = Marshal.GetDelegateForFunctionPointer<FGetLeaderboardDisplayType>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_DownloadLeaderboardEntries = Marshal.GetDelegateForFunctionPointer<FDownloadLeaderboardEntries>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_DownloadLeaderboardEntriesForUsers = Marshal.GetDelegateForFunctionPointer<FDownloadLeaderboardEntriesForUsers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
_GetDownloadedLeaderboardEntry = Marshal.GetDelegateForFunctionPointer<FGetDownloadedLeaderboardEntry>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 240 ) ) );
|
||||
_UploadLeaderboardScore = Marshal.GetDelegateForFunctionPointer<FUploadLeaderboardScore>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 248 ) ) );
|
||||
_AttachLeaderboardUGC = Marshal.GetDelegateForFunctionPointer<FAttachLeaderboardUGC>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 256 ) ) );
|
||||
_GetNumberOfCurrentPlayers = Marshal.GetDelegateForFunctionPointer<FGetNumberOfCurrentPlayers>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 264 ) ) );
|
||||
_RequestGlobalAchievementPercentages = Marshal.GetDelegateForFunctionPointer<FRequestGlobalAchievementPercentages>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 272 ) ) );
|
||||
_GetMostAchievedAchievementInfo = Marshal.GetDelegateForFunctionPointer<FGetMostAchievedAchievementInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 280 ) ) );
|
||||
_GetNextMostAchievedAchievementInfo = Marshal.GetDelegateForFunctionPointer<FGetNextMostAchievedAchievementInfo>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 288 ) ) );
|
||||
_GetAchievementAchievedPercent = Marshal.GetDelegateForFunctionPointer<FGetAchievementAchievedPercent>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 296 ) ) );
|
||||
_RequestGlobalStats = Marshal.GetDelegateForFunctionPointer<FRequestGlobalStats>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 304 ) ) );
|
||||
|
||||
#if PLATFORM_WIN
|
||||
_GetStat1 = Marshal.GetDelegateForFunctionPointer<FGetStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetStat2 = Marshal.GetDelegateForFunctionPointer<FGetStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_SetStat1 = Marshal.GetDelegateForFunctionPointer<FSetStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_SetStat2 = Marshal.GetDelegateForFunctionPointer<FSetStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_GetUserStat1 = Marshal.GetDelegateForFunctionPointer<FGetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_GetUserStat2 = Marshal.GetDelegateForFunctionPointer<FGetUserStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetGlobalStat1 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) );
|
||||
_GetGlobalStat2 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) );
|
||||
_GetGlobalStatHistory1 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStatHistory1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) );
|
||||
_GetGlobalStatHistory2 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStatHistory2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) );
|
||||
#else
|
||||
_GetStat1 = Marshal.GetDelegateForFunctionPointer<FGetStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetStat2 = Marshal.GetDelegateForFunctionPointer<FGetStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_SetStat1 = Marshal.GetDelegateForFunctionPointer<FSetStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_SetStat2 = Marshal.GetDelegateForFunctionPointer<FSetStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_GetUserStat1 = Marshal.GetDelegateForFunctionPointer<FGetUserStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_GetUserStat2 = Marshal.GetDelegateForFunctionPointer<FGetUserStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_GetGlobalStat1 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStat1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 312 ) ) );
|
||||
_GetGlobalStat2 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStat2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 320 ) ) );
|
||||
_GetGlobalStatHistory1 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStatHistory1>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 328 ) ) );
|
||||
_GetGlobalStatHistory2 = Marshal.GetDelegateForFunctionPointer<FGetGlobalStatHistory2>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 336 ) ) );
|
||||
#endif
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_RequestCurrentStats = null;
|
||||
_GetStat1 = null;
|
||||
_GetStat2 = null;
|
||||
_SetStat1 = null;
|
||||
_SetStat2 = null;
|
||||
_UpdateAvgRateStat = null;
|
||||
_GetAchievement = null;
|
||||
_SetAchievement = null;
|
||||
_ClearAchievement = null;
|
||||
_GetAchievementAndUnlockTime = null;
|
||||
_StoreStats = null;
|
||||
_GetAchievementIcon = null;
|
||||
_GetAchievementDisplayAttribute = null;
|
||||
_IndicateAchievementProgress = null;
|
||||
_GetNumAchievements = null;
|
||||
_GetAchievementName = null;
|
||||
_RequestUserStats = null;
|
||||
_GetUserStat1 = null;
|
||||
_GetUserStat2 = null;
|
||||
_GetUserAchievement = null;
|
||||
_GetUserAchievementAndUnlockTime = null;
|
||||
_ResetAllStats = null;
|
||||
_FindOrCreateLeaderboard = null;
|
||||
_FindLeaderboard = null;
|
||||
_GetLeaderboardName = null;
|
||||
_GetLeaderboardEntryCount = null;
|
||||
_GetLeaderboardSortMethod = null;
|
||||
_GetLeaderboardDisplayType = null;
|
||||
_DownloadLeaderboardEntries = null;
|
||||
_DownloadLeaderboardEntriesForUsers = null;
|
||||
_GetDownloadedLeaderboardEntry = null;
|
||||
_UploadLeaderboardScore = null;
|
||||
_AttachLeaderboardUGC = null;
|
||||
_GetNumberOfCurrentPlayers = null;
|
||||
_RequestGlobalAchievementPercentages = null;
|
||||
_GetMostAchievedAchievementInfo = null;
|
||||
_GetNextMostAchievedAchievementInfo = null;
|
||||
_GetAchievementAchievedPercent = null;
|
||||
_RequestGlobalStats = null;
|
||||
_GetGlobalStat1 = null;
|
||||
_GetGlobalStat2 = null;
|
||||
_GetGlobalStatHistory1 = null;
|
||||
_GetGlobalStatHistory2 = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUserStats_v011", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamUserStats_v011();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUserStats_v011();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestCurrentStats", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FRequestCurrentStats( IntPtr self );
|
||||
private FRequestCurrentStats _RequestCurrentStats;
|
||||
private static extern bool _RequestCurrentStats( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool RequestCurrentStats()
|
||||
@@ -134,62 +33,57 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetStatInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
|
||||
private FGetStat1 _GetStat1;
|
||||
private static extern bool _GetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
internal bool GetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
{
|
||||
var returnValue = _GetStat1( Self, pchName, ref pData );
|
||||
var returnValue = _GetStat( Self, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetStatFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
|
||||
private FGetStat2 _GetStat2;
|
||||
private static extern bool _GetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
internal bool GetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
{
|
||||
var returnValue = _GetStat2( Self, pchName, ref pData );
|
||||
var returnValue = _GetStat( Self, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetStatInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
|
||||
private FSetStat1 _SetStat1;
|
||||
private static extern bool _SetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData );
|
||||
|
||||
#endregion
|
||||
internal bool SetStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
|
||||
internal bool SetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, int nData )
|
||||
{
|
||||
var returnValue = _SetStat1( Self, pchName, nData );
|
||||
var returnValue = _SetStat( Self, pchName, nData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetStatFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
|
||||
private FSetStat2 _SetStat2;
|
||||
private static extern bool _SetStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData );
|
||||
|
||||
#endregion
|
||||
internal bool SetStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
|
||||
internal bool SetStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float fData )
|
||||
{
|
||||
var returnValue = _SetStat2( Self, pchName, fData );
|
||||
var returnValue = _SetStat( Self, pchName, fData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_UpdateAvgRateStat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FUpdateAvgRateStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
|
||||
private FUpdateAvgRateStat _UpdateAvgRateStat;
|
||||
private static extern bool _UpdateAvgRateStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength );
|
||||
|
||||
#endregion
|
||||
internal bool UpdateAvgRateStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, float flCountThisSession, double dSessionLength )
|
||||
@@ -199,10 +93,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
private FGetAchievement _GetAchievement;
|
||||
private static extern bool _GetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
|
||||
#endregion
|
||||
internal bool GetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
@@ -212,10 +105,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_SetAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FSetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
private FSetAchievement _SetAchievement;
|
||||
private static extern bool _SetAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
|
||||
#endregion
|
||||
internal bool SetAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
@@ -225,10 +117,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_ClearAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FClearAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
private FClearAchievement _ClearAchievement;
|
||||
private static extern bool _ClearAchievement( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
|
||||
#endregion
|
||||
internal bool ClearAchievement( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
@@ -238,10 +129,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAndUnlockTime", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetAchievementAndUnlockTime( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime );
|
||||
private FGetAchievementAndUnlockTime _GetAchievementAndUnlockTime;
|
||||
private static extern bool _GetAchievementAndUnlockTime( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime );
|
||||
|
||||
#endregion
|
||||
internal bool GetAchievementAndUnlockTime( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime )
|
||||
@@ -251,10 +141,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_StoreStats", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FStoreStats( IntPtr self );
|
||||
private FStoreStats _StoreStats;
|
||||
private static extern bool _StoreStats( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool StoreStats()
|
||||
@@ -264,9 +153,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetAchievementIcon( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
private FGetAchievementIcon _GetAchievementIcon;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementIcon", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetAchievementIcon( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName );
|
||||
|
||||
#endregion
|
||||
internal int GetAchievementIcon( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName )
|
||||
@@ -276,9 +164,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetAchievementDisplayAttribute( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
private FGetAchievementDisplayAttribute _GetAchievementDisplayAttribute;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementDisplayAttribute", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetAchievementDisplayAttribute( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey );
|
||||
|
||||
#endregion
|
||||
internal string GetAchievementDisplayAttribute( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchKey )
|
||||
@@ -288,10 +175,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_IndicateAchievementProgress", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIndicateAchievementProgress( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress );
|
||||
private FIndicateAchievementProgress _IndicateAchievementProgress;
|
||||
private static extern bool _IndicateAchievementProgress( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress );
|
||||
|
||||
#endregion
|
||||
internal bool IndicateAchievementProgress( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, uint nCurProgress, uint nMaxProgress )
|
||||
@@ -301,9 +187,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetNumAchievements( IntPtr self );
|
||||
private FGetNumAchievements _GetNumAchievements;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNumAchievements", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetNumAchievements( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetNumAchievements()
|
||||
@@ -313,9 +198,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetAchievementName( IntPtr self, uint iAchievement );
|
||||
private FGetAchievementName _GetAchievementName;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementName", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetAchievementName( IntPtr self, uint iAchievement );
|
||||
|
||||
#endregion
|
||||
internal string GetAchievementName( uint iAchievement )
|
||||
@@ -325,48 +209,44 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestUserStats( IntPtr self, SteamId steamIDUser );
|
||||
private FRequestUserStats _RequestUserStats;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestUserStats", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestUserStats( IntPtr self, SteamId steamIDUser );
|
||||
|
||||
#endregion
|
||||
internal async Task<UserStatsReceived_t?> RequestUserStats( SteamId steamIDUser )
|
||||
internal CallResult<UserStatsReceived_t> RequestUserStats( SteamId steamIDUser )
|
||||
{
|
||||
var returnValue = _RequestUserStats( Self, steamIDUser );
|
||||
return await UserStatsReceived_t.GetResultAsync( returnValue );
|
||||
return new CallResult<UserStatsReceived_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStatInt32", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUserStat1( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
|
||||
private FGetUserStat1 _GetUserStat1;
|
||||
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat1( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pData )
|
||||
{
|
||||
var returnValue = _GetUserStat1( Self, steamIDUser, pchName, ref pData );
|
||||
var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserStatFloat", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUserStat2( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
|
||||
private FGetUserStat2 _GetUserStat2;
|
||||
private static extern bool _GetUserStat( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserStat2( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
internal bool GetUserStat( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pData )
|
||||
{
|
||||
var returnValue = _GetUserStat2( Self, steamIDUser, pchName, ref pData );
|
||||
var returnValue = _GetUserStat( Self, steamIDUser, pchName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievement", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
private FGetUserAchievement _GetUserAchievement;
|
||||
private static extern bool _GetUserAchievement( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserAchievement( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
@@ -376,10 +256,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetUserAchievementAndUnlockTime", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetUserAchievementAndUnlockTime( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime );
|
||||
private FGetUserAchievementAndUnlockTime _GetUserAchievementAndUnlockTime;
|
||||
private static extern bool _GetUserAchievementAndUnlockTime( IntPtr self, SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime );
|
||||
|
||||
#endregion
|
||||
internal bool GetUserAchievementAndUnlockTime( SteamId steamIDUser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved, ref uint punUnlockTime )
|
||||
@@ -389,10 +268,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_ResetAllStats", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FResetAllStats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo );
|
||||
private FResetAllStats _ResetAllStats;
|
||||
private static extern bool _ResetAllStats( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo );
|
||||
|
||||
#endregion
|
||||
internal bool ResetAllStats( [MarshalAs( UnmanagedType.U1 )] bool bAchievementsToo )
|
||||
@@ -402,33 +280,30 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FFindOrCreateLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType );
|
||||
private FFindOrCreateLeaderboard _FindOrCreateLeaderboard;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_FindOrCreateLeaderboard", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _FindOrCreateLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType );
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardFindResult_t?> FindOrCreateLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName, LeaderboardSort eLeaderboardSortMethod, LeaderboardDisplay eLeaderboardDisplayType )
|
||||
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 await LeaderboardFindResult_t.GetResultAsync( returnValue );
|
||||
return new CallResult<LeaderboardFindResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FFindLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName );
|
||||
private FFindLeaderboard _FindLeaderboard;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_FindLeaderboard", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _FindLeaderboard( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName );
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardFindResult_t?> FindLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName )
|
||||
internal CallResult<LeaderboardFindResult_t> FindLeaderboard( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchLeaderboardName )
|
||||
{
|
||||
var returnValue = _FindLeaderboard( Self, pchLeaderboardName );
|
||||
return await LeaderboardFindResult_t.GetResultAsync( returnValue );
|
||||
return new CallResult<LeaderboardFindResult_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetLeaderboardName( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
private FGetLeaderboardName _GetLeaderboardName;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardName", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetLeaderboardName( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
|
||||
#endregion
|
||||
internal string GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard )
|
||||
@@ -438,9 +313,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetLeaderboardEntryCount( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
private FGetLeaderboardEntryCount _GetLeaderboardEntryCount;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardEntryCount", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetLeaderboardEntryCount( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
|
||||
#endregion
|
||||
internal int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard )
|
||||
@@ -450,9 +324,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate LeaderboardSort FGetLeaderboardSortMethod( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
private FGetLeaderboardSortMethod _GetLeaderboardSortMethod;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardSortMethod", CallingConvention = Platform.CC)]
|
||||
private static extern LeaderboardSort _GetLeaderboardSortMethod( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
|
||||
#endregion
|
||||
internal LeaderboardSort GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard )
|
||||
@@ -462,9 +335,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate LeaderboardDisplay FGetLeaderboardDisplayType( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
private FGetLeaderboardDisplayType _GetLeaderboardDisplayType;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetLeaderboardDisplayType", CallingConvention = Platform.CC)]
|
||||
private static extern LeaderboardDisplay _GetLeaderboardDisplayType( IntPtr self, SteamLeaderboard_t hSteamLeaderboard );
|
||||
|
||||
#endregion
|
||||
internal LeaderboardDisplay GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard )
|
||||
@@ -474,34 +346,34 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FDownloadLeaderboardEntries( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd );
|
||||
private FDownloadLeaderboardEntries _DownloadLeaderboardEntries;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntries", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _DownloadLeaderboardEntries( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd );
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardScoresDownloaded_t?> DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd )
|
||||
internal CallResult<LeaderboardScoresDownloaded_t> DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard, LeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd )
|
||||
{
|
||||
var returnValue = _DownloadLeaderboardEntries( Self, hSteamLeaderboard, eLeaderboardDataRequest, nRangeStart, nRangeEnd );
|
||||
return await LeaderboardScoresDownloaded_t.GetResultAsync( returnValue );
|
||||
return new CallResult<LeaderboardScoresDownloaded_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FDownloadLeaderboardEntriesForUsers( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers );
|
||||
private FDownloadLeaderboardEntriesForUsers _DownloadLeaderboardEntriesForUsers;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_DownloadLeaderboardEntriesForUsers", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _DownloadLeaderboardEntriesForUsers( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers );
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardScoresDownloaded_t?> DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard, [In,Out] SteamId[] prgUsers, int cUsers )
|
||||
/// <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 await LeaderboardScoresDownloaded_t.GetResultAsync( returnValue );
|
||||
return new CallResult<LeaderboardScoresDownloaded_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetDownloadedLeaderboardEntry", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetDownloadedLeaderboardEntry( IntPtr self, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax );
|
||||
private FGetDownloadedLeaderboardEntry _GetDownloadedLeaderboardEntry;
|
||||
private static extern bool _GetDownloadedLeaderboardEntry( IntPtr self, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax );
|
||||
|
||||
#endregion
|
||||
internal bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In,Out] int[] pDetails, int cDetailsMax )
|
||||
@@ -511,57 +383,52 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FUploadLeaderboardScore( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount );
|
||||
private FUploadLeaderboardScore _UploadLeaderboardScore;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_UploadLeaderboardScore", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _UploadLeaderboardScore( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount );
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardScoreUploaded_t?> UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, [In,Out] int[] pScoreDetails, int cScoreDetailsCount )
|
||||
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 await LeaderboardScoreUploaded_t.GetResultAsync( returnValue );
|
||||
return new CallResult<LeaderboardScoreUploaded_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FAttachLeaderboardUGC( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC );
|
||||
private FAttachLeaderboardUGC _AttachLeaderboardUGC;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_AttachLeaderboardUGC", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _AttachLeaderboardUGC( IntPtr self, SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC );
|
||||
|
||||
#endregion
|
||||
internal async Task<LeaderboardUGCSet_t?> AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC )
|
||||
internal CallResult<LeaderboardUGCSet_t> AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC )
|
||||
{
|
||||
var returnValue = _AttachLeaderboardUGC( Self, hSteamLeaderboard, hUGC );
|
||||
return await LeaderboardUGCSet_t.GetResultAsync( returnValue );
|
||||
return new CallResult<LeaderboardUGCSet_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FGetNumberOfCurrentPlayers( IntPtr self );
|
||||
private FGetNumberOfCurrentPlayers _GetNumberOfCurrentPlayers;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNumberOfCurrentPlayers", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _GetNumberOfCurrentPlayers( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal async Task<NumberOfCurrentPlayers_t?> GetNumberOfCurrentPlayers()
|
||||
internal CallResult<NumberOfCurrentPlayers_t> GetNumberOfCurrentPlayers()
|
||||
{
|
||||
var returnValue = _GetNumberOfCurrentPlayers( Self );
|
||||
return await NumberOfCurrentPlayers_t.GetResultAsync( returnValue );
|
||||
return new CallResult<NumberOfCurrentPlayers_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestGlobalAchievementPercentages( IntPtr self );
|
||||
private FRequestGlobalAchievementPercentages _RequestGlobalAchievementPercentages;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalAchievementPercentages", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestGlobalAchievementPercentages( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal async Task<GlobalAchievementPercentagesReady_t?> RequestGlobalAchievementPercentages()
|
||||
internal CallResult<GlobalAchievementPercentagesReady_t> RequestGlobalAchievementPercentages()
|
||||
{
|
||||
var returnValue = _RequestGlobalAchievementPercentages( Self );
|
||||
return await GlobalAchievementPercentagesReady_t.GetResultAsync( returnValue );
|
||||
return new CallResult<GlobalAchievementPercentagesReady_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetMostAchievedAchievementInfo( IntPtr self, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
private FGetMostAchievedAchievementInfo _GetMostAchievedAchievementInfo;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetMostAchievedAchievementInfo", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetMostAchievedAchievementInfo( IntPtr self, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
|
||||
#endregion
|
||||
internal int GetMostAchievedAchievementInfo( out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
@@ -573,9 +440,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetNextMostAchievedAchievementInfo( IntPtr self, int iIteratorPrevious, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
private FGetNextMostAchievedAchievementInfo _GetNextMostAchievedAchievementInfo;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetNextMostAchievedAchievementInfo", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetNextMostAchievedAchievementInfo( IntPtr self, int iIteratorPrevious, IntPtr pchName, uint unNameBufLen, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved );
|
||||
|
||||
#endregion
|
||||
internal int GetNextMostAchievedAchievementInfo( int iIteratorPrevious, out string pchName, ref float pflPercent, [MarshalAs( UnmanagedType.U1 )] ref bool pbAchieved )
|
||||
@@ -587,10 +453,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementAchievedPercent", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetAchievementAchievedPercent( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent );
|
||||
private FGetAchievementAchievedPercent _GetAchievementAchievedPercent;
|
||||
private static extern bool _GetAchievementAchievedPercent( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent );
|
||||
|
||||
#endregion
|
||||
internal bool GetAchievementAchievedPercent( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pflPercent )
|
||||
@@ -600,64 +465,59 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FRequestGlobalStats( IntPtr self, int nHistoryDays );
|
||||
private FRequestGlobalStats _RequestGlobalStats;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_RequestGlobalStats", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _RequestGlobalStats( IntPtr self, int nHistoryDays );
|
||||
|
||||
#endregion
|
||||
internal async Task<GlobalStatsReceived_t?> RequestGlobalStats( int nHistoryDays )
|
||||
internal CallResult<GlobalStatsReceived_t> RequestGlobalStats( int nHistoryDays )
|
||||
{
|
||||
var returnValue = _RequestGlobalStats( Self, nHistoryDays );
|
||||
return await GlobalStatsReceived_t.GetResultAsync( returnValue );
|
||||
return new CallResult<GlobalStatsReceived_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatInt64", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetGlobalStat1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData );
|
||||
private FGetGlobalStat1 _GetGlobalStat1;
|
||||
private static extern bool _GetGlobalStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetGlobalStat1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData )
|
||||
internal bool GetGlobalStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref long pData )
|
||||
{
|
||||
var returnValue = _GetGlobalStat1( Self, pchStatName, ref pData );
|
||||
var returnValue = _GetGlobalStat( Self, pchStatName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatDouble", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetGlobalStat2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData );
|
||||
private FGetGlobalStat2 _GetGlobalStat2;
|
||||
private static extern bool _GetGlobalStat( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData );
|
||||
|
||||
#endregion
|
||||
internal bool GetGlobalStat2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData )
|
||||
internal bool GetGlobalStat( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, ref double pData )
|
||||
{
|
||||
var returnValue = _GetGlobalStat2( Self, pchStatName, ref pData );
|
||||
var returnValue = _GetGlobalStat( Self, pchStatName, ref pData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetGlobalStatHistory1( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData );
|
||||
private FGetGlobalStatHistory1 _GetGlobalStatHistory1;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistoryInt64", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetGlobalStatHistory( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData );
|
||||
|
||||
#endregion
|
||||
internal int GetGlobalStatHistory1( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData )
|
||||
internal int GetGlobalStatHistory( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] long[] pData, uint cubData )
|
||||
{
|
||||
var returnValue = _GetGlobalStatHistory1( Self, pchStatName, pData, cubData );
|
||||
var returnValue = _GetGlobalStatHistory( Self, pchStatName, pData, cubData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate int FGetGlobalStatHistory2( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData );
|
||||
private FGetGlobalStatHistory2 _GetGlobalStatHistory2;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetGlobalStatHistoryDouble", CallingConvention = Platform.CC)]
|
||||
private static extern int _GetGlobalStatHistory( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData );
|
||||
|
||||
#endregion
|
||||
internal int GetGlobalStatHistory2( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData )
|
||||
internal int GetGlobalStatHistory( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchStatName, [In,Out] double[] pData, uint cubData )
|
||||
{
|
||||
var returnValue = _GetGlobalStatHistory2( Self, pchStatName, pData, cubData );
|
||||
var returnValue = _GetGlobalStatHistory( Self, pchStatName, pData, cubData );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,81 +9,23 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamUtils : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "SteamUtils009";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamUtils( bool IsGameServer )
|
||||
{
|
||||
_GetSecondsSinceAppActive = Marshal.GetDelegateForFunctionPointer<FGetSecondsSinceAppActive>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_GetSecondsSinceComputerActive = Marshal.GetDelegateForFunctionPointer<FGetSecondsSinceComputerActive>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetConnectedUniverse = Marshal.GetDelegateForFunctionPointer<FGetConnectedUniverse>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetServerRealTime = Marshal.GetDelegateForFunctionPointer<FGetServerRealTime>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
_GetIPCountry = Marshal.GetDelegateForFunctionPointer<FGetIPCountry>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 32 ) ) );
|
||||
_GetImageSize = Marshal.GetDelegateForFunctionPointer<FGetImageSize>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 40 ) ) );
|
||||
_GetImageRGBA = Marshal.GetDelegateForFunctionPointer<FGetImageRGBA>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 48 ) ) );
|
||||
_GetCSERIPPort = Marshal.GetDelegateForFunctionPointer<FGetCSERIPPort>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 56 ) ) );
|
||||
_GetCurrentBatteryPower = Marshal.GetDelegateForFunctionPointer<FGetCurrentBatteryPower>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 64 ) ) );
|
||||
_GetAppID = Marshal.GetDelegateForFunctionPointer<FGetAppID>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 72 ) ) );
|
||||
_SetOverlayNotificationPosition = Marshal.GetDelegateForFunctionPointer<FSetOverlayNotificationPosition>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 80 ) ) );
|
||||
_IsAPICallCompleted = Marshal.GetDelegateForFunctionPointer<FIsAPICallCompleted>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 88 ) ) );
|
||||
_GetAPICallFailureReason = Marshal.GetDelegateForFunctionPointer<FGetAPICallFailureReason>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 96 ) ) );
|
||||
_GetAPICallResult = Marshal.GetDelegateForFunctionPointer<FGetAPICallResult>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 104 ) ) );
|
||||
_RunFrame = Marshal.GetDelegateForFunctionPointer<FRunFrame>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 112 ) ) );
|
||||
_GetIPCCallCount = Marshal.GetDelegateForFunctionPointer<FGetIPCCallCount>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 120 ) ) );
|
||||
_SetWarningMessageHook = Marshal.GetDelegateForFunctionPointer<FSetWarningMessageHook>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 128 ) ) );
|
||||
_IsOverlayEnabled = Marshal.GetDelegateForFunctionPointer<FIsOverlayEnabled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 136 ) ) );
|
||||
_BOverlayNeedsPresent = Marshal.GetDelegateForFunctionPointer<FBOverlayNeedsPresent>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 144 ) ) );
|
||||
_CheckFileSignature = Marshal.GetDelegateForFunctionPointer<FCheckFileSignature>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 152 ) ) );
|
||||
_ShowGamepadTextInput = Marshal.GetDelegateForFunctionPointer<FShowGamepadTextInput>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 160 ) ) );
|
||||
_GetEnteredGamepadTextLength = Marshal.GetDelegateForFunctionPointer<FGetEnteredGamepadTextLength>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 168 ) ) );
|
||||
_GetEnteredGamepadTextInput = Marshal.GetDelegateForFunctionPointer<FGetEnteredGamepadTextInput>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 176 ) ) );
|
||||
_GetSteamUILanguage = Marshal.GetDelegateForFunctionPointer<FGetSteamUILanguage>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 184 ) ) );
|
||||
_IsSteamRunningInVR = Marshal.GetDelegateForFunctionPointer<FIsSteamRunningInVR>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 192 ) ) );
|
||||
_SetOverlayNotificationInset = Marshal.GetDelegateForFunctionPointer<FSetOverlayNotificationInset>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 200 ) ) );
|
||||
_IsSteamInBigPictureMode = Marshal.GetDelegateForFunctionPointer<FIsSteamInBigPictureMode>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 208 ) ) );
|
||||
_StartVRDashboard = Marshal.GetDelegateForFunctionPointer<FStartVRDashboard>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 216 ) ) );
|
||||
_IsVRHeadsetStreamingEnabled = Marshal.GetDelegateForFunctionPointer<FIsVRHeadsetStreamingEnabled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 224 ) ) );
|
||||
_SetVRHeadsetStreamingEnabled = Marshal.GetDelegateForFunctionPointer<FSetVRHeadsetStreamingEnabled>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 232 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_GetSecondsSinceAppActive = null;
|
||||
_GetSecondsSinceComputerActive = null;
|
||||
_GetConnectedUniverse = null;
|
||||
_GetServerRealTime = null;
|
||||
_GetIPCountry = null;
|
||||
_GetImageSize = null;
|
||||
_GetImageRGBA = null;
|
||||
_GetCSERIPPort = null;
|
||||
_GetCurrentBatteryPower = null;
|
||||
_GetAppID = null;
|
||||
_SetOverlayNotificationPosition = null;
|
||||
_IsAPICallCompleted = null;
|
||||
_GetAPICallFailureReason = null;
|
||||
_GetAPICallResult = null;
|
||||
_RunFrame = null;
|
||||
_GetIPCCallCount = null;
|
||||
_SetWarningMessageHook = null;
|
||||
_IsOverlayEnabled = null;
|
||||
_BOverlayNeedsPresent = null;
|
||||
_CheckFileSignature = null;
|
||||
_ShowGamepadTextInput = null;
|
||||
_GetEnteredGamepadTextLength = null;
|
||||
_GetEnteredGamepadTextInput = null;
|
||||
_GetSteamUILanguage = null;
|
||||
_IsSteamRunningInVR = null;
|
||||
_SetOverlayNotificationInset = null;
|
||||
_IsSteamInBigPictureMode = null;
|
||||
_StartVRDashboard = null;
|
||||
_IsVRHeadsetStreamingEnabled = null;
|
||||
_SetVRHeadsetStreamingEnabled = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUtils_v009", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamUtils_v009();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUtils_v009();
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamGameServerUtils_v009", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamGameServerUtils_v009();
|
||||
public override IntPtr GetServerInterfacePointer() => SteamAPI_SteamGameServerUtils_v009();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetSecondsSinceAppActive( IntPtr self );
|
||||
private FGetSecondsSinceAppActive _GetSecondsSinceAppActive;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceAppActive", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetSecondsSinceAppActive( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetSecondsSinceAppActive()
|
||||
@@ -93,9 +35,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetSecondsSinceComputerActive( IntPtr self );
|
||||
private FGetSecondsSinceComputerActive _GetSecondsSinceComputerActive;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSecondsSinceComputerActive", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetSecondsSinceComputerActive( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetSecondsSinceComputerActive()
|
||||
@@ -105,9 +46,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Universe FGetConnectedUniverse( IntPtr self );
|
||||
private FGetConnectedUniverse _GetConnectedUniverse;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetConnectedUniverse", CallingConvention = Platform.CC)]
|
||||
private static extern Universe _GetConnectedUniverse( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal Universe GetConnectedUniverse()
|
||||
@@ -117,9 +57,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetServerRealTime( IntPtr self );
|
||||
private FGetServerRealTime _GetServerRealTime;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetServerRealTime", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetServerRealTime( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetServerRealTime()
|
||||
@@ -129,9 +68,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetIPCountry( IntPtr self );
|
||||
private FGetIPCountry _GetIPCountry;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetIPCountry", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetIPCountry( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal string GetIPCountry()
|
||||
@@ -141,10 +79,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetImageSize", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetImageSize( IntPtr self, int iImage, ref uint pnWidth, ref uint pnHeight );
|
||||
private FGetImageSize _GetImageSize;
|
||||
private static extern bool _GetImageSize( IntPtr self, int iImage, ref uint pnWidth, ref uint pnHeight );
|
||||
|
||||
#endregion
|
||||
internal bool GetImageSize( int iImage, ref uint pnWidth, ref uint pnHeight )
|
||||
@@ -154,10 +91,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetImageRGBA", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetImageRGBA( IntPtr self, int iImage, [In,Out] byte[] pubDest, int nDestBufferSize );
|
||||
private FGetImageRGBA _GetImageRGBA;
|
||||
private static extern bool _GetImageRGBA( IntPtr self, int iImage, [In,Out] byte[] pubDest, int nDestBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetImageRGBA( int iImage, [In,Out] byte[] pubDest, int nDestBufferSize )
|
||||
@@ -167,10 +103,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetCSERIPPort", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetCSERIPPort( IntPtr self, ref uint unIP, ref ushort usPort );
|
||||
private FGetCSERIPPort _GetCSERIPPort;
|
||||
private static extern bool _GetCSERIPPort( IntPtr self, ref uint unIP, ref ushort usPort );
|
||||
|
||||
#endregion
|
||||
internal bool GetCSERIPPort( ref uint unIP, ref ushort usPort )
|
||||
@@ -180,9 +115,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate byte FGetCurrentBatteryPower( IntPtr self );
|
||||
private FGetCurrentBatteryPower _GetCurrentBatteryPower;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetCurrentBatteryPower", CallingConvention = Platform.CC)]
|
||||
private static extern byte _GetCurrentBatteryPower( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal byte GetCurrentBatteryPower()
|
||||
@@ -192,9 +126,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetAppID( IntPtr self );
|
||||
private FGetAppID _GetAppID;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAppID", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetAppID( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetAppID()
|
||||
@@ -204,9 +137,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetOverlayNotificationPosition( IntPtr self, NotificationPosition eNotificationPosition );
|
||||
private FSetOverlayNotificationPosition _SetOverlayNotificationPosition;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetOverlayNotificationPosition", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetOverlayNotificationPosition( IntPtr self, NotificationPosition eNotificationPosition );
|
||||
|
||||
#endregion
|
||||
internal void SetOverlayNotificationPosition( NotificationPosition eNotificationPosition )
|
||||
@@ -215,10 +147,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsAPICallCompleted", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsAPICallCompleted( IntPtr self, SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed );
|
||||
private FIsAPICallCompleted _IsAPICallCompleted;
|
||||
private static extern bool _IsAPICallCompleted( IntPtr self, SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed );
|
||||
|
||||
#endregion
|
||||
internal bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed )
|
||||
@@ -228,9 +159,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICallFailure FGetAPICallFailureReason( IntPtr self, SteamAPICall_t hSteamAPICall );
|
||||
private FGetAPICallFailureReason _GetAPICallFailureReason;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAPICallFailureReason", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICallFailure _GetAPICallFailureReason( IntPtr self, SteamAPICall_t hSteamAPICall );
|
||||
|
||||
#endregion
|
||||
internal SteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall )
|
||||
@@ -240,10 +170,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetAPICallResult", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetAPICallResult( IntPtr self, SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed );
|
||||
private FGetAPICallResult _GetAPICallResult;
|
||||
private static extern bool _GetAPICallResult( IntPtr self, SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed );
|
||||
|
||||
#endregion
|
||||
internal bool GetAPICallResult( SteamAPICall_t hSteamAPICall, IntPtr pCallback, int cubCallback, int iCallbackExpected, [MarshalAs( UnmanagedType.U1 )] ref bool pbFailed )
|
||||
@@ -253,20 +182,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FRunFrame( IntPtr self );
|
||||
private FRunFrame _RunFrame;
|
||||
|
||||
#endregion
|
||||
internal void RunFrame()
|
||||
{
|
||||
_RunFrame( Self );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetIPCCallCount( IntPtr self );
|
||||
private FGetIPCCallCount _GetIPCCallCount;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetIPCCallCount", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetIPCCallCount( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetIPCCallCount()
|
||||
@@ -276,9 +193,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetWarningMessageHook( IntPtr self, IntPtr pFunction );
|
||||
private FSetWarningMessageHook _SetWarningMessageHook;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetWarningMessageHook", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetWarningMessageHook( IntPtr self, IntPtr pFunction );
|
||||
|
||||
#endregion
|
||||
internal void SetWarningMessageHook( IntPtr pFunction )
|
||||
@@ -287,10 +203,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsOverlayEnabled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsOverlayEnabled( IntPtr self );
|
||||
private FIsOverlayEnabled _IsOverlayEnabled;
|
||||
private static extern bool _IsOverlayEnabled( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsOverlayEnabled()
|
||||
@@ -300,10 +215,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_BOverlayNeedsPresent", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FBOverlayNeedsPresent( IntPtr self );
|
||||
private FBOverlayNeedsPresent _BOverlayNeedsPresent;
|
||||
private static extern bool _BOverlayNeedsPresent( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool BOverlayNeedsPresent()
|
||||
@@ -313,22 +227,20 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate SteamAPICall_t FCheckFileSignature( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName );
|
||||
private FCheckFileSignature _CheckFileSignature;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_CheckFileSignature", CallingConvention = Platform.CC)]
|
||||
private static extern SteamAPICall_t _CheckFileSignature( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName );
|
||||
|
||||
#endregion
|
||||
internal async Task<CheckFileSignature_t?> CheckFileSignature( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName )
|
||||
internal CallResult<CheckFileSignature_t> CheckFileSignature( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string szFileName )
|
||||
{
|
||||
var returnValue = _CheckFileSignature( Self, szFileName );
|
||||
return await CheckFileSignature_t.GetResultAsync( returnValue );
|
||||
return new CallResult<CheckFileSignature_t>( returnValue, IsServer );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_ShowGamepadTextInput", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FShowGamepadTextInput( IntPtr self, GamepadTextInputMode eInputMode, GamepadTextInputLineMode eLineInputMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription, uint unCharMax, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExistingText );
|
||||
private FShowGamepadTextInput _ShowGamepadTextInput;
|
||||
private static extern bool _ShowGamepadTextInput( IntPtr self, GamepadTextInputMode eInputMode, GamepadTextInputLineMode eLineInputMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription, uint unCharMax, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExistingText );
|
||||
|
||||
#endregion
|
||||
internal bool ShowGamepadTextInput( GamepadTextInputMode eInputMode, GamepadTextInputLineMode eLineInputMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchDescription, uint unCharMax, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchExistingText )
|
||||
@@ -338,9 +250,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate uint FGetEnteredGamepadTextLength( IntPtr self );
|
||||
private FGetEnteredGamepadTextLength _GetEnteredGamepadTextLength;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetEnteredGamepadTextLength", CallingConvention = Platform.CC)]
|
||||
private static extern uint _GetEnteredGamepadTextLength( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal uint GetEnteredGamepadTextLength()
|
||||
@@ -350,10 +261,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetEnteredGamepadTextInput", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetEnteredGamepadTextInput( IntPtr self, IntPtr pchText, uint cchText );
|
||||
private FGetEnteredGamepadTextInput _GetEnteredGamepadTextInput;
|
||||
private static extern bool _GetEnteredGamepadTextInput( IntPtr self, IntPtr pchText, uint cchText );
|
||||
|
||||
#endregion
|
||||
internal bool GetEnteredGamepadTextInput( out string pchText )
|
||||
@@ -365,9 +275,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate Utf8StringPointer FGetSteamUILanguage( IntPtr self );
|
||||
private FGetSteamUILanguage _GetSteamUILanguage;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetSteamUILanguage", CallingConvention = Platform.CC)]
|
||||
private static extern Utf8StringPointer _GetSteamUILanguage( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal string GetSteamUILanguage()
|
||||
@@ -377,10 +286,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamRunningInVR", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsSteamRunningInVR( IntPtr self );
|
||||
private FIsSteamRunningInVR _IsSteamRunningInVR;
|
||||
private static extern bool _IsSteamRunningInVR( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsSteamRunningInVR()
|
||||
@@ -390,9 +298,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetOverlayNotificationInset( IntPtr self, int nHorizontalInset, int nVerticalInset );
|
||||
private FSetOverlayNotificationInset _SetOverlayNotificationInset;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetOverlayNotificationInset", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetOverlayNotificationInset( IntPtr self, int nHorizontalInset, int nVerticalInset );
|
||||
|
||||
#endregion
|
||||
internal void SetOverlayNotificationInset( int nHorizontalInset, int nVerticalInset )
|
||||
@@ -401,10 +308,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamInBigPictureMode", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsSteamInBigPictureMode( IntPtr self );
|
||||
private FIsSteamInBigPictureMode _IsSteamInBigPictureMode;
|
||||
private static extern bool _IsSteamInBigPictureMode( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsSteamInBigPictureMode()
|
||||
@@ -414,9 +320,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FStartVRDashboard( IntPtr self );
|
||||
private FStartVRDashboard _StartVRDashboard;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_StartVRDashboard", CallingConvention = Platform.CC)]
|
||||
private static extern void _StartVRDashboard( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal void StartVRDashboard()
|
||||
@@ -425,10 +330,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsVRHeadsetStreamingEnabled", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsVRHeadsetStreamingEnabled( IntPtr self );
|
||||
private FIsVRHeadsetStreamingEnabled _IsVRHeadsetStreamingEnabled;
|
||||
private static extern bool _IsVRHeadsetStreamingEnabled( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsVRHeadsetStreamingEnabled()
|
||||
@@ -438,9 +342,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FSetVRHeadsetStreamingEnabled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled );
|
||||
private FSetVRHeadsetStreamingEnabled _SetVRHeadsetStreamingEnabled;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_SetVRHeadsetStreamingEnabled", CallingConvention = Platform.CC)]
|
||||
private static extern void _SetVRHeadsetStreamingEnabled( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bEnabled );
|
||||
|
||||
#endregion
|
||||
internal void SetVRHeadsetStreamingEnabled( [MarshalAs( UnmanagedType.U1 )] bool bEnabled )
|
||||
@@ -448,5 +351,53 @@ namespace Steamworks
|
||||
_SetVRHeadsetStreamingEnabled( Self, bEnabled );
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_IsSteamChinaLauncher", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _IsSteamChinaLauncher( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool IsSteamChinaLauncher()
|
||||
{
|
||||
var returnValue = _IsSteamChinaLauncher( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_InitFilterText", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private static extern bool _InitFilterText( IntPtr self );
|
||||
|
||||
#endregion
|
||||
internal bool InitFilterText()
|
||||
{
|
||||
var returnValue = _InitFilterText( Self );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_FilterText", CallingConvention = Platform.CC)]
|
||||
private static extern int _FilterText( IntPtr self, IntPtr pchOutFilteredText, uint nByteSizeOutFilteredText, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchInputMessage, [MarshalAs( UnmanagedType.U1 )] bool bLegalOnly );
|
||||
|
||||
#endregion
|
||||
internal int FilterText( out string pchOutFilteredText, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchInputMessage, [MarshalAs( UnmanagedType.U1 )] bool bLegalOnly )
|
||||
{
|
||||
IntPtr mempchOutFilteredText = Helpers.TakeMemory();
|
||||
var returnValue = _FilterText( Self, mempchOutFilteredText, (1024 * 32), pchInputMessage, bLegalOnly );
|
||||
pchOutFilteredText = Helpers.MemoryToString( mempchOutFilteredText );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUtils_GetIPv6ConnectivityState", CallingConvention = Platform.CC)]
|
||||
private static extern SteamIPv6ConnectivityState _GetIPv6ConnectivityState( IntPtr self, SteamIPv6ConnectivityProtocol eProtocol );
|
||||
|
||||
#endregion
|
||||
internal SteamIPv6ConnectivityState GetIPv6ConnectivityState( SteamIPv6ConnectivityProtocol eProtocol )
|
||||
{
|
||||
var returnValue = _GetIPv6ConnectivityState( Self, eProtocol );
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,29 +9,20 @@ namespace Steamworks
|
||||
{
|
||||
internal class ISteamVideo : SteamInterface
|
||||
{
|
||||
public override string InterfaceName => "STEAMVIDEO_INTERFACE_V002";
|
||||
|
||||
public override void InitInternals()
|
||||
internal ISteamVideo( bool IsGameServer )
|
||||
{
|
||||
_GetVideoURL = Marshal.GetDelegateForFunctionPointer<FGetVideoURL>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 0 ) ) );
|
||||
_IsBroadcasting = Marshal.GetDelegateForFunctionPointer<FIsBroadcasting>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 8 ) ) );
|
||||
_GetOPFSettings = Marshal.GetDelegateForFunctionPointer<FGetOPFSettings>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 16 ) ) );
|
||||
_GetOPFStringForApp = Marshal.GetDelegateForFunctionPointer<FGetOPFStringForApp>( Marshal.ReadIntPtr( VTable, Platform.MemoryOffset( 24 ) ) );
|
||||
}
|
||||
internal override void Shutdown()
|
||||
{
|
||||
base.Shutdown();
|
||||
|
||||
_GetVideoURL = null;
|
||||
_IsBroadcasting = null;
|
||||
_GetOPFSettings = null;
|
||||
_GetOPFStringForApp = null;
|
||||
SetupInterface( IsGameServer );
|
||||
}
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamVideo_v002", CallingConvention = Platform.CC)]
|
||||
internal static extern IntPtr SteamAPI_SteamVideo_v002();
|
||||
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamVideo_v002();
|
||||
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FGetVideoURL( IntPtr self, AppId unVideoAppID );
|
||||
private FGetVideoURL _GetVideoURL;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetVideoURL", CallingConvention = Platform.CC)]
|
||||
private static extern void _GetVideoURL( IntPtr self, AppId unVideoAppID );
|
||||
|
||||
#endregion
|
||||
internal void GetVideoURL( AppId unVideoAppID )
|
||||
@@ -40,10 +31,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_IsBroadcasting", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FIsBroadcasting( IntPtr self, ref int pnNumViewers );
|
||||
private FIsBroadcasting _IsBroadcasting;
|
||||
private static extern bool _IsBroadcasting( IntPtr self, ref int pnNumViewers );
|
||||
|
||||
#endregion
|
||||
internal bool IsBroadcasting( ref int pnNumViewers )
|
||||
@@ -53,9 +43,8 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
private delegate void FGetOPFSettings( IntPtr self, AppId unVideoAppID );
|
||||
private FGetOPFSettings _GetOPFSettings;
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetOPFSettings", CallingConvention = Platform.CC)]
|
||||
private static extern void _GetOPFSettings( IntPtr self, AppId unVideoAppID );
|
||||
|
||||
#endregion
|
||||
internal void GetOPFSettings( AppId unVideoAppID )
|
||||
@@ -64,10 +53,9 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
#region FunctionMeta
|
||||
[UnmanagedFunctionPointer( Platform.MemberConvention )]
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamVideo_GetOPFStringForApp", CallingConvention = Platform.CC)]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
private delegate bool FGetOPFStringForApp( IntPtr self, AppId unVideoAppID, IntPtr pchBuffer, ref int pnBufferSize );
|
||||
private FGetOPFStringForApp _GetOPFStringForApp;
|
||||
private static extern bool _GetOPFStringForApp( IntPtr self, AppId unVideoAppID, IntPtr pchBuffer, ref int pnBufferSize );
|
||||
|
||||
#endregion
|
||||
internal bool GetOPFStringForApp( AppId unVideoAppID, out string pchBuffer, ref int pnBufferSize )
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal static class SteamAPI
|
||||
{
|
||||
internal static class Native
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_Init", CallingConvention = CallingConvention.Cdecl )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
public static extern bool SteamAPI_Init();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_RunCallbacks", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern void SteamAPI_RunCallbacks();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_RegisterCallback", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern void SteamAPI_RegisterCallback( IntPtr pCallback, int callback );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_UnregisterCallback", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern void SteamAPI_UnregisterCallback( IntPtr pCallback );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_RegisterCallResult", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern void SteamAPI_RegisterCallResult( IntPtr pCallback, SteamAPICall_t callback );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_UnregisterCallResult", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern void SteamAPI_UnregisterCallResult( IntPtr pCallback, SteamAPICall_t callback );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_Shutdown", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern void SteamAPI_Shutdown();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_GetHSteamUser", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern HSteamUser SteamAPI_GetHSteamUser();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_GetHSteamPipe", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern HSteamPipe SteamAPI_GetHSteamPipe();
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_RestartAppIfNecessary", CallingConvention = CallingConvention.Cdecl )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
public static extern bool SteamAPI_RestartAppIfNecessary( uint unOwnAppID );
|
||||
|
||||
}
|
||||
static internal bool Init()
|
||||
{
|
||||
return Native.SteamAPI_Init();
|
||||
}
|
||||
|
||||
static internal void RunCallbacks()
|
||||
{
|
||||
Native.SteamAPI_RunCallbacks();
|
||||
}
|
||||
|
||||
static internal void RegisterCallback( IntPtr pCallback, int callback )
|
||||
{
|
||||
Native.SteamAPI_RegisterCallback( pCallback, callback );
|
||||
}
|
||||
|
||||
static internal void UnregisterCallback( IntPtr pCallback )
|
||||
{
|
||||
Native.SteamAPI_UnregisterCallback( pCallback );
|
||||
}
|
||||
|
||||
static internal void RegisterCallResult( IntPtr pCallback, SteamAPICall_t callback )
|
||||
{
|
||||
Native.SteamAPI_RegisterCallResult( pCallback, callback );
|
||||
}
|
||||
|
||||
static internal void UnregisterCallResult( IntPtr pCallback, SteamAPICall_t callback )
|
||||
{
|
||||
Native.SteamAPI_UnregisterCallResult( pCallback, callback );
|
||||
}
|
||||
|
||||
static internal void Shutdown()
|
||||
{
|
||||
Native.SteamAPI_Shutdown();
|
||||
}
|
||||
|
||||
static internal HSteamUser GetHSteamUser()
|
||||
{
|
||||
return Native.SteamAPI_GetHSteamUser();
|
||||
}
|
||||
|
||||
static internal HSteamPipe GetHSteamPipe()
|
||||
{
|
||||
return Native.SteamAPI_GetHSteamPipe();
|
||||
}
|
||||
|
||||
static internal bool RestartAppIfNecessary( uint unOwnAppID )
|
||||
{
|
||||
return Native.SteamAPI_RestartAppIfNecessary( unOwnAppID );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,95 +6,99 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
internal static class CallbackIdentifiers
|
||||
{
|
||||
public const int SteamUser = 100;
|
||||
public const int SteamGameServer = 200;
|
||||
public const int SteamFriends = 300;
|
||||
public const int SteamBilling = 400;
|
||||
public const int SteamMatchmaking = 500;
|
||||
public const int SteamContentServer = 600;
|
||||
public const int SteamUtils = 700;
|
||||
public const int ClientFriends = 800;
|
||||
public const int ClientUser = 900;
|
||||
public const int SteamApps = 1000;
|
||||
public const int SteamUserStats = 1100;
|
||||
public const int SteamNetworking = 1200;
|
||||
public const int SteamNetworkingSockets = 1220;
|
||||
public const int SteamNetworkingMessages = 1250;
|
||||
public const int ClientRemoteStorage = 1300;
|
||||
public const int ClientDepotBuilder = 1400;
|
||||
public const int SteamGameServerItems = 1500;
|
||||
public const int ClientUtils = 1600;
|
||||
public const int SteamGameCoordinator = 1700;
|
||||
public const int SteamGameServerStats = 1800;
|
||||
public const int Steam2Async = 1900;
|
||||
public const int SteamGameStats = 2000;
|
||||
public const int ClientHTTP = 2100;
|
||||
public const int ClientScreenshots = 2200;
|
||||
public const int SteamScreenshots = 2300;
|
||||
public const int ClientAudio = 2400;
|
||||
public const int ClientUnifiedMessages = 2500;
|
||||
public const int SteamStreamLauncher = 2600;
|
||||
public const int ClientController = 2700;
|
||||
public const int SteamController = 2800;
|
||||
public const int ClientParentalSettings = 2900;
|
||||
public const int ClientDeviceAuth = 3000;
|
||||
public const int ClientNetworkDeviceManager = 3100;
|
||||
public const int ClientMusic = 3200;
|
||||
public const int ClientRemoteClientManager = 3300;
|
||||
public const int ClientUGC = 3400;
|
||||
public const int SteamStreamClient = 3500;
|
||||
public const int ClientProductBuilder = 3600;
|
||||
public const int ClientShortcuts = 3700;
|
||||
public const int ClientRemoteControlManager = 3800;
|
||||
public const int SteamAppList = 3900;
|
||||
public const int SteamMusic = 4000;
|
||||
public const int SteamMusicRemote = 4100;
|
||||
public const int ClientVR = 4200;
|
||||
public const int ClientGameNotification = 4300;
|
||||
public const int SteamGameNotification = 4400;
|
||||
public const int SteamHTMLSurface = 4500;
|
||||
public const int ClientVideo = 4600;
|
||||
public const int ClientInventory = 4700;
|
||||
public const int ClientBluetoothManager = 4800;
|
||||
public const int ClientSharedConnection = 4900;
|
||||
public const int SteamParentalSettings = 5000;
|
||||
public const int ClientShader = 5100;
|
||||
public const int SteamGameSearch = 5200;
|
||||
public const int SteamParties = 5300;
|
||||
public const int ClientParties = 5400;
|
||||
}
|
||||
internal static class Defines
|
||||
{
|
||||
internal const string STEAMAPPLIST_INTERFACE_VERSION = "STEAMAPPLIST_INTERFACE_VERSION001";
|
||||
internal const string STEAMAPPS_INTERFACE_VERSION = "STEAMAPPS_INTERFACE_VERSION008";
|
||||
internal const string STEAMAPPTICKET_INTERFACE_VERSION = "STEAMAPPTICKET_INTERFACE_VERSION001";
|
||||
internal const string STEAMCONTROLLER_INTERFACE_VERSION = "SteamController007";
|
||||
internal const string STEAMFRIENDS_INTERFACE_VERSION = "SteamFriends017";
|
||||
internal const string STEAMGAMECOORDINATOR_INTERFACE_VERSION = "SteamGameCoordinator001";
|
||||
internal const string STEAMGAMESERVER_INTERFACE_VERSION = "SteamGameServer012";
|
||||
internal const string STEAMGAMESERVERSTATS_INTERFACE_VERSION = "SteamGameServerStats001";
|
||||
internal const string STEAMHTMLSURFACE_INTERFACE_VERSION = "STEAMHTMLSURFACE_INTERFACE_VERSION_005";
|
||||
internal const string STEAMHTTP_INTERFACE_VERSION = "STEAMHTTP_INTERFACE_VERSION003";
|
||||
internal const string STEAMINPUT_INTERFACE_VERSION = "SteamInput001";
|
||||
internal const string STEAMINVENTORY_INTERFACE_VERSION = "STEAMINVENTORY_INTERFACE_V003";
|
||||
internal const string STEAMMATCHMAKING_INTERFACE_VERSION = "SteamMatchMaking009";
|
||||
internal const string STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION = "SteamMatchMakingServers002";
|
||||
internal const string STEAMGAMESEARCH_INTERFACE_VERSION = "SteamMatchGameSearch001";
|
||||
internal const string STEAMPARTIES_INTERFACE_VERSION = "SteamParties002";
|
||||
internal const string STEAMMUSIC_INTERFACE_VERSION = "STEAMMUSIC_INTERFACE_VERSION001";
|
||||
internal const string STEAMMUSICREMOTE_INTERFACE_VERSION = "STEAMMUSICREMOTE_INTERFACE_VERSION001";
|
||||
internal const string STEAMNETWORKING_INTERFACE_VERSION = "SteamNetworking005";
|
||||
internal const string STEAMNETWORKINGSOCKETS_INTERFACE_VERSION = "SteamNetworkingSockets002";
|
||||
internal const string STEAMNETWORKINGUTILS_INTERFACE_VERSION = "SteamNetworkingUtils001";
|
||||
internal const string STEAMPARENTALSETTINGS_INTERFACE_VERSION = "STEAMPARENTALSETTINGS_INTERFACE_VERSION001";
|
||||
internal const string STEAMREMOTESTORAGE_INTERFACE_VERSION = "STEAMREMOTESTORAGE_INTERFACE_VERSION014";
|
||||
internal const string STEAMSCREENSHOTS_INTERFACE_VERSION = "STEAMSCREENSHOTS_INTERFACE_VERSION003";
|
||||
internal const string STEAMUGC_INTERFACE_VERSION = "STEAMUGC_INTERFACE_VERSION012";
|
||||
internal const string STEAMUSER_INTERFACE_VERSION = "SteamUser020";
|
||||
internal const string STEAMUSERSTATS_INTERFACE_VERSION = "STEAMUSERSTATS_INTERFACE_VERSION011";
|
||||
internal const string STEAMUTILS_INTERFACE_VERSION = "SteamUtils009";
|
||||
internal const string STEAMVIDEO_INTERFACE_VERSION = "STEAMVIDEO_INTERFACE_V002";
|
||||
internal static readonly int k_cubSaltSize = 8;
|
||||
internal static readonly GID_t k_GIDNil = 0xffffffffffffffff;
|
||||
internal static readonly GID_t k_TxnIDNil = k_GIDNil;
|
||||
internal static readonly GID_t k_TxnIDUnknown = 0;
|
||||
internal static readonly JobID_t k_JobIDNil = 0xffffffffffffffff;
|
||||
internal static readonly PackageId_t k_uPackageIdInvalid = 0xFFFFFFFF;
|
||||
internal static readonly BundleId_t k_uBundleIdInvalid = 0;
|
||||
internal static readonly AppId k_uAppIdInvalid = 0x0;
|
||||
internal static readonly AssetClassId_t k_ulAssetClassIdInvalid = 0x0;
|
||||
internal static readonly PhysicalItemId_t k_uPhysicalItemIdInvalid = 0x0;
|
||||
internal static readonly DepotId_t k_uDepotIdInvalid = 0x0;
|
||||
internal static readonly CellID_t k_uCellIDInvalid = 0xFFFFFFFF;
|
||||
internal static readonly SteamAPICall_t k_uAPICallInvalid = 0x0;
|
||||
internal static readonly PartnerId_t k_uPartnerIdInvalid = 0;
|
||||
internal static readonly ManifestId_t k_uManifestIdInvalid = 0;
|
||||
internal static readonly SiteId_t k_ulSiteIdInvalid = 0;
|
||||
internal static readonly PartyBeaconID_t k_ulPartyBeaconIdInvalid = 0;
|
||||
internal static readonly HAuthTicket k_HAuthTicketInvalid = 0;
|
||||
internal static readonly uint k_unSteamAccountIDMask = 0xFFFFFFFF;
|
||||
internal static readonly uint k_unSteamAccountInstanceMask = 0x000FFFFF;
|
||||
internal static readonly uint k_unSteamUserDefaultInstance = 1;
|
||||
internal static readonly int k_cchGameExtraInfoMax = 64;
|
||||
internal static readonly int k_cchMaxFriendsGroupName = 64;
|
||||
internal static readonly int k_cFriendsGroupLimit = 100;
|
||||
internal static readonly FriendsGroupID_t k_FriendsGroupID_Invalid = - 1;
|
||||
internal static readonly int k_cEnumerateFollowersMax = 50;
|
||||
internal static readonly uint k_cubChatMetadataMax = 8192;
|
||||
internal static readonly int k_cbMaxGameServerGameDir = 32;
|
||||
internal static readonly int k_cbMaxGameServerMapName = 32;
|
||||
internal static readonly int k_cbMaxGameServerGameDescription = 64;
|
||||
internal static readonly int k_cbMaxGameServerName = 64;
|
||||
internal static readonly int k_cbMaxGameServerTags = 128;
|
||||
internal static readonly int k_cbMaxGameServerGameData = 2048;
|
||||
internal static readonly int HSERVERQUERY_INVALID = -1;
|
||||
internal static readonly uint k_unFavoriteFlagNone = 0x00;
|
||||
internal static readonly uint k_unFavoriteFlagFavorite = 0x01;
|
||||
internal static readonly uint k_unFavoriteFlagHistory = 0x02;
|
||||
internal static readonly uint k_unMaxCloudFileChunkSize = 100 * 1024 * 1024;
|
||||
internal static readonly PublishedFileId k_PublishedFileIdInvalid = 0;
|
||||
internal static readonly UGCHandle_t k_UGCHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly PublishedFileUpdateHandle_t k_PublishedFileUpdateHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly UGCFileWriteStreamHandle_t k_UGCFileStreamHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly uint k_cchPublishedDocumentTitleMax = 128 + 1;
|
||||
internal static readonly uint k_cchPublishedDocumentDescriptionMax = 8000;
|
||||
internal static readonly uint k_cchPublishedDocumentChangeDescriptionMax = 8000;
|
||||
internal static readonly uint k_unEnumeratePublishedFilesMaxResults = 50;
|
||||
internal static readonly uint k_cchTagListMax = 1024 + 1;
|
||||
internal static readonly uint k_cchFilenameMax = 260;
|
||||
internal static readonly uint k_cchPublishedFileURLMax = 256;
|
||||
internal static readonly int k_cubAppProofOfPurchaseKeyMax = 240;
|
||||
internal static readonly uint k_nScreenshotMaxTaggedUsers = 32;
|
||||
internal static readonly uint k_nScreenshotMaxTaggedPublishedFiles = 32;
|
||||
internal static readonly int k_cubUFSTagTypeMax = 255;
|
||||
internal static readonly int k_cubUFSTagValueMax = 255;
|
||||
internal static readonly int k_ScreenshotThumbWidth = 200;
|
||||
internal static readonly UGCQueryHandle_t k_UGCQueryHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly UGCUpdateHandle_t k_UGCUpdateHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly uint kNumUGCResultsPerPage = 50;
|
||||
internal static readonly uint k_cchDeveloperMetadataMax = 5000;
|
||||
internal static readonly uint INVALID_HTMLBROWSER = 0;
|
||||
internal static readonly InventoryItemId k_SteamItemInstanceIDInvalid = ~default(ulong);
|
||||
internal static readonly SteamInventoryResult_t k_SteamInventoryResultInvalid = - 1;
|
||||
internal static readonly SteamInventoryUpdateHandle_t k_SteamInventoryUpdateHandleInvalid = 0xffffffffffffffff;
|
||||
internal static readonly Connection k_HSteamNetConnection_Invalid = 0;
|
||||
internal static readonly Socket k_HSteamListenSocket_Invalid = 0;
|
||||
internal static readonly HSteamNetPollGroup k_HSteamNetPollGroup_Invalid = 0;
|
||||
internal static readonly int k_cchMaxSteamNetworkingErrMsg = 1024;
|
||||
internal static readonly int k_cchSteamNetworkingMaxConnectionCloseReason = 128;
|
||||
internal static readonly int k_cchSteamNetworkingMaxConnectionDescription = 128;
|
||||
internal static readonly int k_cbMaxSteamNetworkingSocketsMessageSizeSend = 512 * 1024;
|
||||
internal static readonly int k_nSteamNetworkingSend_Unreliable = 0;
|
||||
internal static readonly int k_nSteamNetworkingSend_NoNagle = 1;
|
||||
internal static readonly int k_nSteamNetworkingSend_UnreliableNoNagle = k_nSteamNetworkingSend_Unreliable | k_nSteamNetworkingSend_NoNagle;
|
||||
internal static readonly int k_nSteamNetworkingSend_NoDelay = 4;
|
||||
internal static readonly int k_nSteamNetworkingSend_UnreliableNoDelay = k_nSteamNetworkingSend_Unreliable | k_nSteamNetworkingSend_NoDelay | k_nSteamNetworkingSend_NoNagle;
|
||||
internal static readonly int k_nSteamNetworkingSend_Reliable = 8;
|
||||
internal static readonly int k_nSteamNetworkingSend_ReliableNoNagle = k_nSteamNetworkingSend_Reliable | k_nSteamNetworkingSend_NoNagle;
|
||||
internal static readonly int k_nSteamNetworkingSend_UseCurrentThread = 16;
|
||||
internal static readonly int k_cchMaxSteamNetworkingPingLocationString = 1024;
|
||||
internal static readonly int k_nSteamNetworkingPing_Failed = - 1;
|
||||
internal static readonly int k_nSteamNetworkingPing_Unknown = - 2;
|
||||
internal static readonly SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ( ( uint ) 'd' << 16 ) | ( ( uint ) 'e' << 8 ) | ( uint ) 'v';
|
||||
internal static readonly uint k_unServerFlagNone = 0x00;
|
||||
internal static readonly uint k_unServerFlagActive = 0x01;
|
||||
internal static readonly uint k_unServerFlagSecure = 0x02;
|
||||
internal static readonly uint k_unServerFlagDedicated = 0x04;
|
||||
internal static readonly uint k_unServerFlagLinux = 0x08;
|
||||
internal static readonly uint k_unServerFlagPassworded = 0x10;
|
||||
internal static readonly uint k_unServerFlagPrivate = 0x20;
|
||||
internal static readonly uint k_cbSteamDatagramMaxSerializedTicket = 512;
|
||||
internal static readonly uint k_cbMaxSteamDatagramGameCoordinatorServerLoginAppData = 2048;
|
||||
internal static readonly uint k_cbMaxSteamDatagramGameCoordinatorServerLoginSerialized = 4096;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,15 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
//
|
||||
// ESteamIPType
|
||||
//
|
||||
internal enum SteamIPType : int
|
||||
{
|
||||
Type4 = 0,
|
||||
Type6 = 1,
|
||||
}
|
||||
|
||||
//
|
||||
// EUniverse
|
||||
//
|
||||
@@ -24,6 +33,7 @@ namespace Steamworks
|
||||
//
|
||||
public enum Result : int
|
||||
{
|
||||
None = 0,
|
||||
OK = 1,
|
||||
Fail = 2,
|
||||
NoConnection = 3,
|
||||
@@ -136,6 +146,8 @@ namespace Steamworks
|
||||
AccountNotFriends = 111,
|
||||
LimitedUserAccount = 112,
|
||||
CantRemoveItem = 113,
|
||||
AccountDeleted = 114,
|
||||
ExistingUserCancelledLicense = 115,
|
||||
}
|
||||
|
||||
//
|
||||
@@ -215,7 +227,7 @@ namespace Steamworks
|
||||
//
|
||||
// EUserHasLicenseForAppResult
|
||||
//
|
||||
internal enum UserHasLicenseForAppResult : int
|
||||
public enum UserHasLicenseForAppResult : int
|
||||
{
|
||||
HasLicense = 0,
|
||||
DoesNotHaveLicense = 1,
|
||||
@@ -278,6 +290,8 @@ namespace Steamworks
|
||||
RentalNotActivated = 65536,
|
||||
Rental = 131072,
|
||||
SiteLicense = 262144,
|
||||
LegacyFreeSub = 524288,
|
||||
InvalidOSType = 1048576,
|
||||
}
|
||||
|
||||
//
|
||||
@@ -299,9 +313,10 @@ namespace Steamworks
|
||||
Franchise = 1024,
|
||||
Video = 2048,
|
||||
Plugin = 4096,
|
||||
Music = 8192,
|
||||
MusicAlbum = 8192,
|
||||
Series = 16384,
|
||||
Comic = 32768,
|
||||
Comic_UNUSED = 32768,
|
||||
Beta = 65536,
|
||||
Shortcut = 1073741824,
|
||||
DepotOnly = -2147483648,
|
||||
}
|
||||
@@ -453,33 +468,39 @@ namespace Steamworks
|
||||
//
|
||||
internal enum VRHMDType : int
|
||||
{
|
||||
None = -1,
|
||||
Unknown = 0,
|
||||
HTC_Dev = 1,
|
||||
HTC_VivePre = 2,
|
||||
HTC_Vive = 3,
|
||||
HTC_VivePro = 4,
|
||||
HTC_Unknown = 20,
|
||||
Oculus_DK1 = 21,
|
||||
Oculus_DK2 = 22,
|
||||
Oculus_Rift = 23,
|
||||
Oculus_Unknown = 40,
|
||||
Acer_Unknown = 50,
|
||||
Acer_WindowsMR = 51,
|
||||
Dell_Unknown = 60,
|
||||
Dell_Visor = 61,
|
||||
Lenovo_Unknown = 70,
|
||||
Lenovo_Explorer = 71,
|
||||
HP_Unknown = 80,
|
||||
HP_WindowsMR = 81,
|
||||
Samsung_Unknown = 90,
|
||||
Samsung_Odyssey = 91,
|
||||
Unannounced_Unknown = 100,
|
||||
Unannounced_WindowsMR = 101,
|
||||
vridge = 110,
|
||||
Huawei_Unknown = 120,
|
||||
Huawei_VR2 = 121,
|
||||
Huawei_Unannounced = 129,
|
||||
MDType_None = -1,
|
||||
MDType_Unknown = 0,
|
||||
MDType_HTC_Dev = 1,
|
||||
MDType_HTC_VivePre = 2,
|
||||
MDType_HTC_Vive = 3,
|
||||
MDType_HTC_VivePro = 4,
|
||||
MDType_HTC_ViveCosmos = 5,
|
||||
MDType_HTC_Unknown = 20,
|
||||
MDType_Oculus_DK1 = 21,
|
||||
MDType_Oculus_DK2 = 22,
|
||||
MDType_Oculus_Rift = 23,
|
||||
MDType_Oculus_RiftS = 24,
|
||||
MDType_Oculus_Quest = 25,
|
||||
MDType_Oculus_Unknown = 40,
|
||||
MDType_Acer_Unknown = 50,
|
||||
MDType_Acer_WindowsMR = 51,
|
||||
MDType_Dell_Unknown = 60,
|
||||
MDType_Dell_Visor = 61,
|
||||
MDType_Lenovo_Unknown = 70,
|
||||
MDType_Lenovo_Explorer = 71,
|
||||
MDType_HP_Unknown = 80,
|
||||
MDType_HP_WindowsMR = 81,
|
||||
MDType_HP_Reverb = 82,
|
||||
MDType_Samsung_Unknown = 90,
|
||||
MDType_Samsung_Odyssey = 91,
|
||||
MDType_Unannounced_Unknown = 100,
|
||||
MDType_Unannounced_WindowsMR = 101,
|
||||
MDType_vridge = 110,
|
||||
MDType_Huawei_Unknown = 120,
|
||||
MDType_Huawei_VR2 = 121,
|
||||
MDType_Huawei_EndOfRange = 129,
|
||||
mdType_Valve_Unknown = 130,
|
||||
mdType_Valve_Index = 131,
|
||||
}
|
||||
|
||||
//
|
||||
@@ -507,14 +528,31 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
//
|
||||
// CGameID::EGameIDType
|
||||
// EDurationControlProgress
|
||||
//
|
||||
internal enum GameIDType : int
|
||||
public enum DurationControlProgress : int
|
||||
{
|
||||
App = 0,
|
||||
GameMod = 1,
|
||||
Shortcut = 2,
|
||||
P2P = 3,
|
||||
Progress_Full = 0,
|
||||
Progress_Half = 1,
|
||||
Progress_None = 2,
|
||||
ExitSoon_3h = 3,
|
||||
ExitSoon_5h = 4,
|
||||
ExitSoon_Night = 5,
|
||||
}
|
||||
|
||||
//
|
||||
// EDurationControlNotification
|
||||
//
|
||||
internal enum DurationControlNotification : int
|
||||
{
|
||||
None = 0,
|
||||
DurationControlNotification1Hour = 1,
|
||||
DurationControlNotification3Hours = 2,
|
||||
HalfProgress = 3,
|
||||
NoProgress = 4,
|
||||
ExitSoon_3h = 5,
|
||||
ExitSoon_5h = 6,
|
||||
ExitSoon_Night = 7,
|
||||
}
|
||||
|
||||
//
|
||||
@@ -546,12 +584,23 @@ namespace Steamworks
|
||||
}
|
||||
|
||||
//
|
||||
// IPCFailure_t::EFailureType
|
||||
// ESteamIPv6ConnectivityProtocol
|
||||
//
|
||||
internal enum FailureType : int
|
||||
internal enum SteamIPv6ConnectivityProtocol : int
|
||||
{
|
||||
FlushedCallbackQueue = 0,
|
||||
PipeFail = 1,
|
||||
Invalid = 0,
|
||||
HTTP = 1,
|
||||
UDP = 2,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamIPv6ConnectivityState
|
||||
//
|
||||
internal enum SteamIPv6ConnectivityState : int
|
||||
{
|
||||
Unknown = 0,
|
||||
Good = 1,
|
||||
Bad = 2,
|
||||
}
|
||||
|
||||
//
|
||||
@@ -722,6 +771,7 @@ namespace Steamworks
|
||||
FriendsOnly = 1,
|
||||
Public = 2,
|
||||
Invisible = 3,
|
||||
PrivateUnique = 4,
|
||||
}
|
||||
|
||||
//
|
||||
@@ -782,16 +832,6 @@ namespace Steamworks
|
||||
IconURLLarge = 4,
|
||||
}
|
||||
|
||||
//
|
||||
// RequestPlayersForGameResultCallback_t::PlayerAcceptState_t
|
||||
//
|
||||
internal enum PlayerAcceptState_t : int
|
||||
{
|
||||
Unknown = 0,
|
||||
PlayerAccepted = 1,
|
||||
PlayerDeclined = 2,
|
||||
}
|
||||
|
||||
//
|
||||
// ERemoteStoragePlatform
|
||||
//
|
||||
@@ -802,8 +842,9 @@ namespace Steamworks
|
||||
OSX = 2,
|
||||
PS3 = 4,
|
||||
Linux = 8,
|
||||
Reserved2 = 16,
|
||||
Switch = 16,
|
||||
Android = 32,
|
||||
IOS = 64,
|
||||
All = -1,
|
||||
}
|
||||
|
||||
@@ -815,6 +856,7 @@ namespace Steamworks
|
||||
Public = 0,
|
||||
FriendsOnly = 1,
|
||||
Private = 2,
|
||||
Unlisted = 3,
|
||||
}
|
||||
|
||||
//
|
||||
@@ -961,31 +1003,9 @@ namespace Steamworks
|
||||
//
|
||||
// ESNetSocketState
|
||||
//
|
||||
internal enum SNetSocketState : int
|
||||
{
|
||||
Invalid = 0,
|
||||
Connected = 1,
|
||||
Initiated = 10,
|
||||
LocalCandidatesFound = 11,
|
||||
ReceivedRemoteCandidates = 12,
|
||||
ChallengeHandshake = 15,
|
||||
Disconnecting = 21,
|
||||
LocalDisconnect = 22,
|
||||
TimeoutDuringConnect = 23,
|
||||
RemoteEndDisconnected = 24,
|
||||
ConnectionBroken = 25,
|
||||
}
|
||||
|
||||
//
|
||||
// ESNetSocketConnectionType
|
||||
//
|
||||
internal enum SNetSocketConnectionType : int
|
||||
{
|
||||
NotConnected = 0,
|
||||
UDP = 1,
|
||||
UDPRelay = 2,
|
||||
}
|
||||
|
||||
//
|
||||
// EVRScreenshotType
|
||||
//
|
||||
@@ -1031,74 +1051,49 @@ namespace Steamworks
|
||||
internal enum HTTPStatusCode : int
|
||||
{
|
||||
Invalid = 0,
|
||||
HTTPStatusCode100Continue = 100,
|
||||
HTTPStatusCode101SwitchingProtocols = 101,
|
||||
HTTPStatusCode200OK = 200,
|
||||
HTTPStatusCode201Created = 201,
|
||||
HTTPStatusCode202Accepted = 202,
|
||||
HTTPStatusCode203NonAuthoritative = 203,
|
||||
HTTPStatusCode204NoContent = 204,
|
||||
HTTPStatusCode205ResetContent = 205,
|
||||
HTTPStatusCode206PartialContent = 206,
|
||||
HTTPStatusCode300MultipleChoices = 300,
|
||||
HTTPStatusCode301MovedPermanently = 301,
|
||||
HTTPStatusCode302Found = 302,
|
||||
HTTPStatusCode303SeeOther = 303,
|
||||
HTTPStatusCode304NotModified = 304,
|
||||
HTTPStatusCode305UseProxy = 305,
|
||||
HTTPStatusCode307TemporaryRedirect = 307,
|
||||
HTTPStatusCode400BadRequest = 400,
|
||||
HTTPStatusCode401Unauthorized = 401,
|
||||
HTTPStatusCode402PaymentRequired = 402,
|
||||
HTTPStatusCode403Forbidden = 403,
|
||||
HTTPStatusCode404NotFound = 404,
|
||||
HTTPStatusCode405MethodNotAllowed = 405,
|
||||
HTTPStatusCode406NotAcceptable = 406,
|
||||
HTTPStatusCode407ProxyAuthRequired = 407,
|
||||
HTTPStatusCode408RequestTimeout = 408,
|
||||
HTTPStatusCode409Conflict = 409,
|
||||
HTTPStatusCode410Gone = 410,
|
||||
HTTPStatusCode411LengthRequired = 411,
|
||||
HTTPStatusCode412PreconditionFailed = 412,
|
||||
HTTPStatusCode413RequestEntityTooLarge = 413,
|
||||
HTTPStatusCode414RequestURITooLong = 414,
|
||||
HTTPStatusCode415UnsupportedMediaType = 415,
|
||||
HTTPStatusCode416RequestedRangeNotSatisfiable = 416,
|
||||
HTTPStatusCode417ExpectationFailed = 417,
|
||||
HTTPStatusCode4xxUnknown = 418,
|
||||
HTTPStatusCode429TooManyRequests = 429,
|
||||
HTTPStatusCode500InternalServerError = 500,
|
||||
HTTPStatusCode501NotImplemented = 501,
|
||||
HTTPStatusCode502BadGateway = 502,
|
||||
HTTPStatusCode503ServiceUnavailable = 503,
|
||||
HTTPStatusCode504GatewayTimeout = 504,
|
||||
HTTPStatusCode505HTTPVersionNotSupported = 505,
|
||||
HTTPStatusCode5xxUnknown = 599,
|
||||
}
|
||||
|
||||
//
|
||||
// EInputSource
|
||||
//
|
||||
internal enum InputSource : int
|
||||
{
|
||||
None = 0,
|
||||
LeftTrackpad = 1,
|
||||
RightTrackpad = 2,
|
||||
Joystick = 3,
|
||||
ABXY = 4,
|
||||
Switch = 5,
|
||||
LeftTrigger = 6,
|
||||
RightTrigger = 7,
|
||||
LeftBumper = 8,
|
||||
RightBumper = 9,
|
||||
Gyro = 10,
|
||||
CenterTrackpad = 11,
|
||||
RightJoystick = 12,
|
||||
DPad = 13,
|
||||
Key = 14,
|
||||
Mouse = 15,
|
||||
LeftGyro = 16,
|
||||
Count = 17,
|
||||
Code100Continue = 100,
|
||||
Code101SwitchingProtocols = 101,
|
||||
Code200OK = 200,
|
||||
Code201Created = 201,
|
||||
Code202Accepted = 202,
|
||||
Code203NonAuthoritative = 203,
|
||||
Code204NoContent = 204,
|
||||
Code205ResetContent = 205,
|
||||
Code206PartialContent = 206,
|
||||
Code300MultipleChoices = 300,
|
||||
Code301MovedPermanently = 301,
|
||||
Code302Found = 302,
|
||||
Code303SeeOther = 303,
|
||||
Code304NotModified = 304,
|
||||
Code305UseProxy = 305,
|
||||
Code307TemporaryRedirect = 307,
|
||||
Code400BadRequest = 400,
|
||||
Code401Unauthorized = 401,
|
||||
Code402PaymentRequired = 402,
|
||||
Code403Forbidden = 403,
|
||||
Code404NotFound = 404,
|
||||
Code405MethodNotAllowed = 405,
|
||||
Code406NotAcceptable = 406,
|
||||
Code407ProxyAuthRequired = 407,
|
||||
Code408RequestTimeout = 408,
|
||||
Code409Conflict = 409,
|
||||
Code410Gone = 410,
|
||||
Code411LengthRequired = 411,
|
||||
Code412PreconditionFailed = 412,
|
||||
Code413RequestEntityTooLarge = 413,
|
||||
Code414RequestURITooLong = 414,
|
||||
Code415UnsupportedMediaType = 415,
|
||||
Code416RequestedRangeNotSatisfiable = 416,
|
||||
Code417ExpectationFailed = 417,
|
||||
Code4xxUnknown = 418,
|
||||
Code429TooManyRequests = 429,
|
||||
Code500InternalServerError = 500,
|
||||
Code501NotImplemented = 501,
|
||||
Code502BadGateway = 502,
|
||||
Code503ServiceUnavailable = 503,
|
||||
Code504GatewayTimeout = 504,
|
||||
Code505HTTPVersionNotSupported = 505,
|
||||
Code5xxUnknown = 599,
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1233,7 +1228,7 @@ namespace Steamworks
|
||||
PS4_Gyro_Pitch = 100,
|
||||
PS4_Gyro_Yaw = 101,
|
||||
PS4_Gyro_Roll = 102,
|
||||
PS4_Reserved0 = 103,
|
||||
PS4_DPad_Move = 103,
|
||||
PS4_Reserved1 = 104,
|
||||
PS4_Reserved2 = 105,
|
||||
PS4_Reserved3 = 106,
|
||||
@@ -1272,7 +1267,7 @@ namespace Steamworks
|
||||
XBoxOne_DPad_South = 139,
|
||||
XBoxOne_DPad_West = 140,
|
||||
XBoxOne_DPad_East = 141,
|
||||
XBoxOne_Reserved0 = 142,
|
||||
XBoxOne_DPad_Move = 142,
|
||||
XBoxOne_Reserved1 = 143,
|
||||
XBoxOne_Reserved2 = 144,
|
||||
XBoxOne_Reserved3 = 145,
|
||||
@@ -1311,7 +1306,7 @@ namespace Steamworks
|
||||
XBox360_DPad_South = 178,
|
||||
XBox360_DPad_West = 179,
|
||||
XBox360_DPad_East = 180,
|
||||
XBox360_Reserved0 = 181,
|
||||
XBox360_DPad_Move = 181,
|
||||
XBox360_Reserved1 = 182,
|
||||
XBox360_Reserved2 = 183,
|
||||
XBox360_Reserved3 = 184,
|
||||
@@ -1355,7 +1350,7 @@ namespace Steamworks
|
||||
Switch_ProGyro_Pitch = 222,
|
||||
Switch_ProGyro_Yaw = 223,
|
||||
Switch_ProGyro_Roll = 224,
|
||||
Switch_Reserved0 = 225,
|
||||
Switch_DPad_Move = 225,
|
||||
Switch_Reserved1 = 226,
|
||||
Switch_Reserved2 = 227,
|
||||
Switch_Reserved3 = 228,
|
||||
@@ -1468,55 +1463,6 @@ namespace Steamworks
|
||||
RestoreUserDefault = 1,
|
||||
}
|
||||
|
||||
//
|
||||
// EControllerSource
|
||||
//
|
||||
internal enum ControllerSource : int
|
||||
{
|
||||
None = 0,
|
||||
LeftTrackpad = 1,
|
||||
RightTrackpad = 2,
|
||||
Joystick = 3,
|
||||
ABXY = 4,
|
||||
Switch = 5,
|
||||
LeftTrigger = 6,
|
||||
RightTrigger = 7,
|
||||
LeftBumper = 8,
|
||||
RightBumper = 9,
|
||||
Gyro = 10,
|
||||
CenterTrackpad = 11,
|
||||
RightJoystick = 12,
|
||||
DPad = 13,
|
||||
Key = 14,
|
||||
Mouse = 15,
|
||||
LeftGyro = 16,
|
||||
Count = 17,
|
||||
}
|
||||
|
||||
//
|
||||
// EControllerSourceMode
|
||||
//
|
||||
internal enum ControllerSourceMode : int
|
||||
{
|
||||
None = 0,
|
||||
Dpad = 1,
|
||||
Buttons = 2,
|
||||
FourButtons = 3,
|
||||
AbsoluteMouse = 4,
|
||||
RelativeMouse = 5,
|
||||
JoystickMove = 6,
|
||||
JoystickMouse = 7,
|
||||
JoystickCamera = 8,
|
||||
ScrollWheel = 9,
|
||||
Trigger = 10,
|
||||
TouchMenu = 11,
|
||||
MouseJoystick = 12,
|
||||
MouseRegion = 13,
|
||||
RadialMenu = 14,
|
||||
SingleButton = 15,
|
||||
Switches = 16,
|
||||
}
|
||||
|
||||
//
|
||||
// EControllerActionOrigin
|
||||
//
|
||||
@@ -1763,7 +1709,11 @@ namespace Steamworks
|
||||
Switch_LeftGrip_Upper = 238,
|
||||
Switch_RightGrip_Lower = 239,
|
||||
Switch_RightGrip_Upper = 240,
|
||||
Count = 241,
|
||||
PS4_DPad_Move = 241,
|
||||
XBoxOne_DPad_Move = 242,
|
||||
XBox360_DPad_Move = 243,
|
||||
Switch_DPad_Move = 244,
|
||||
Count = 245,
|
||||
MaximumPossibleValue = 32767,
|
||||
}
|
||||
|
||||
@@ -1913,76 +1863,6 @@ namespace Steamworks
|
||||
ReservedMax = 255,
|
||||
}
|
||||
|
||||
//
|
||||
// ISteamHTMLSurface::EHTMLMouseButton
|
||||
//
|
||||
internal enum HTMLMouseButton : int
|
||||
{
|
||||
Left = 0,
|
||||
Right = 1,
|
||||
Middle = 2,
|
||||
}
|
||||
|
||||
//
|
||||
// ISteamHTMLSurface::EMouseCursor
|
||||
//
|
||||
internal enum MouseCursor : int
|
||||
{
|
||||
user = 0,
|
||||
none = 1,
|
||||
arrow = 2,
|
||||
ibeam = 3,
|
||||
hourglass = 4,
|
||||
waitarrow = 5,
|
||||
crosshair = 6,
|
||||
up = 7,
|
||||
sizenw = 8,
|
||||
sizese = 9,
|
||||
sizene = 10,
|
||||
sizesw = 11,
|
||||
sizew = 12,
|
||||
sizee = 13,
|
||||
sizen = 14,
|
||||
sizes = 15,
|
||||
sizewe = 16,
|
||||
sizens = 17,
|
||||
sizeall = 18,
|
||||
no = 19,
|
||||
hand = 20,
|
||||
blank = 21,
|
||||
middle_pan = 22,
|
||||
north_pan = 23,
|
||||
north_east_pan = 24,
|
||||
east_pan = 25,
|
||||
south_east_pan = 26,
|
||||
south_pan = 27,
|
||||
south_west_pan = 28,
|
||||
west_pan = 29,
|
||||
north_west_pan = 30,
|
||||
alias = 31,
|
||||
cell = 32,
|
||||
colresize = 33,
|
||||
copycur = 34,
|
||||
verticaltext = 35,
|
||||
rowresize = 36,
|
||||
zoomin = 37,
|
||||
zoomout = 38,
|
||||
help = 39,
|
||||
custom = 40,
|
||||
last = 41,
|
||||
}
|
||||
|
||||
//
|
||||
// ISteamHTMLSurface::EHTMLKeyModifiers
|
||||
//
|
||||
internal enum HTMLKeyModifiers : int
|
||||
{
|
||||
None = 0,
|
||||
AltDown = 1,
|
||||
CtrlDown = 2,
|
||||
ShiftDown = 4,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamItemFlags
|
||||
//
|
||||
@@ -1993,6 +1873,17 @@ namespace Steamworks
|
||||
Consumed = 512,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamTVRegionBehavior
|
||||
//
|
||||
internal enum SteamTVRegionBehavior : int
|
||||
{
|
||||
Invalid = -1,
|
||||
Hover = 0,
|
||||
ClickPopup = 1,
|
||||
ClickSurroundingRegion = 2,
|
||||
}
|
||||
|
||||
//
|
||||
// EParentalFeature
|
||||
//
|
||||
@@ -2011,7 +1902,210 @@ namespace Steamworks
|
||||
ParentalSetup = 10,
|
||||
Library = 11,
|
||||
Test = 12,
|
||||
Max = 13,
|
||||
SiteLicense = 13,
|
||||
Max = 14,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamDeviceFormFactor
|
||||
//
|
||||
public enum SteamDeviceFormFactor : int
|
||||
{
|
||||
Unknown = 0,
|
||||
Phone = 1,
|
||||
Tablet = 2,
|
||||
Computer = 3,
|
||||
TV = 4,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamNetworkingAvailability
|
||||
//
|
||||
public enum SteamNetworkingAvailability : int
|
||||
{
|
||||
CannotTry = -102,
|
||||
Failed = -101,
|
||||
Previously = -100,
|
||||
Retrying = -10,
|
||||
NeverTried = 1,
|
||||
Waiting = 2,
|
||||
Attempting = 3,
|
||||
Current = 100,
|
||||
Unknown = 0,
|
||||
Force32bit = 2147483647,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamNetworkingIdentityType
|
||||
//
|
||||
internal enum NetIdentityType : int
|
||||
{
|
||||
Invalid = 0,
|
||||
SteamID = 16,
|
||||
XboxPairwiseID = 17,
|
||||
IPAddress = 1,
|
||||
GenericString = 2,
|
||||
GenericBytes = 3,
|
||||
UnknownType = 4,
|
||||
Force32bit = 2147483647,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamNetworkingConnectionState
|
||||
//
|
||||
public enum ConnectionState : int
|
||||
{
|
||||
None = 0,
|
||||
Connecting = 1,
|
||||
FindingRoute = 2,
|
||||
Connected = 3,
|
||||
ClosedByPeer = 4,
|
||||
ProblemDetectedLocally = 5,
|
||||
FinWait = -1,
|
||||
Linger = -2,
|
||||
Dead = -3,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamNetConnectionEnd
|
||||
//
|
||||
public enum NetConnectionEnd : int
|
||||
{
|
||||
Invalid = 0,
|
||||
App_Min = 1000,
|
||||
App_Generic = 1000,
|
||||
App_Max = 1999,
|
||||
AppException_Min = 2000,
|
||||
AppException_Generic = 2000,
|
||||
AppException_Max = 2999,
|
||||
Local_Min = 3000,
|
||||
Local_OfflineMode = 3001,
|
||||
Local_ManyRelayConnectivity = 3002,
|
||||
Local_HostedServerPrimaryRelay = 3003,
|
||||
Local_NetworkConfig = 3004,
|
||||
Local_Rights = 3005,
|
||||
Local_Max = 3999,
|
||||
Remote_Min = 4000,
|
||||
Remote_Timeout = 4001,
|
||||
Remote_BadCrypt = 4002,
|
||||
Remote_BadCert = 4003,
|
||||
Remote_NotLoggedIn = 4004,
|
||||
Remote_NotRunningApp = 4005,
|
||||
Remote_BadProtocolVersion = 4006,
|
||||
Remote_Max = 4999,
|
||||
Misc_Min = 5000,
|
||||
Misc_Generic = 5001,
|
||||
Misc_InternalError = 5002,
|
||||
Misc_Timeout = 5003,
|
||||
Misc_RelayConnectivity = 5004,
|
||||
Misc_SteamConnectivity = 5005,
|
||||
Misc_NoRelaySessionsToClient = 5006,
|
||||
Misc_Max = 5999,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamNetworkingConfigScope
|
||||
//
|
||||
internal enum NetConfigScope : int
|
||||
{
|
||||
Global = 1,
|
||||
SocketsInterface = 2,
|
||||
ListenSocket = 3,
|
||||
Connection = 4,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamNetworkingConfigDataType
|
||||
//
|
||||
internal enum NetConfigType : int
|
||||
{
|
||||
Int32 = 1,
|
||||
Int64 = 2,
|
||||
Float = 3,
|
||||
String = 4,
|
||||
FunctionPtr = 5,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamNetworkingConfigValue
|
||||
//
|
||||
internal enum NetConfig : int
|
||||
{
|
||||
Invalid = 0,
|
||||
FakePacketLoss_Send = 2,
|
||||
FakePacketLoss_Recv = 3,
|
||||
FakePacketLag_Send = 4,
|
||||
FakePacketLag_Recv = 5,
|
||||
FakePacketReorder_Send = 6,
|
||||
FakePacketReorder_Recv = 7,
|
||||
FakePacketReorder_Time = 8,
|
||||
FakePacketDup_Send = 26,
|
||||
FakePacketDup_Recv = 27,
|
||||
FakePacketDup_TimeMax = 28,
|
||||
TimeoutInitial = 24,
|
||||
TimeoutConnected = 25,
|
||||
SendBufferSize = 9,
|
||||
SendRateMin = 10,
|
||||
SendRateMax = 11,
|
||||
NagleTime = 12,
|
||||
IP_AllowWithoutAuth = 23,
|
||||
MTU_PacketSize = 32,
|
||||
MTU_DataSize = 33,
|
||||
Unencrypted = 34,
|
||||
EnumerateDevVars = 35,
|
||||
SDRClient_ConsecutitivePingTimeoutsFailInitial = 19,
|
||||
SDRClient_ConsecutitivePingTimeoutsFail = 20,
|
||||
SDRClient_MinPingsBeforePingAccurate = 21,
|
||||
SDRClient_SingleSocket = 22,
|
||||
SDRClient_ForceRelayCluster = 29,
|
||||
SDRClient_DebugTicketAddress = 30,
|
||||
SDRClient_ForceProxyAddr = 31,
|
||||
SDRClient_FakeClusterPing = 36,
|
||||
LogLevel_AckRTT = 13,
|
||||
LogLevel_PacketDecode = 14,
|
||||
LogLevel_Message = 15,
|
||||
LogLevel_PacketGaps = 16,
|
||||
LogLevel_P2PRendezvous = 17,
|
||||
LogLevel_SDRRelayPings = 18,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamNetworkingGetConfigValueResult
|
||||
//
|
||||
internal enum NetConfigResult : int
|
||||
{
|
||||
BadValue = -1,
|
||||
BadScopeObj = -2,
|
||||
BufferTooSmall = -3,
|
||||
OK = 1,
|
||||
OKInherited = 2,
|
||||
}
|
||||
|
||||
//
|
||||
// ESteamNetworkingSocketsDebugOutputType
|
||||
//
|
||||
public enum NetDebugOutput : int
|
||||
{
|
||||
None = 0,
|
||||
Bug = 1,
|
||||
Error = 2,
|
||||
Important = 3,
|
||||
Warning = 4,
|
||||
Msg = 5,
|
||||
Verbose = 6,
|
||||
Debug = 7,
|
||||
Everything = 8,
|
||||
}
|
||||
|
||||
//
|
||||
// EServerMode
|
||||
//
|
||||
internal enum ServerMode : int
|
||||
{
|
||||
Invalid = 0,
|
||||
NoAuthentication = 1,
|
||||
Authentication = 2,
|
||||
AuthenticationAndSecure = 3,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
internal static class SteamInternal
|
||||
{
|
||||
internal static class Native
|
||||
{
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamInternal_GameServer_Init", CallingConvention = CallingConvention.Cdecl )]
|
||||
[return: MarshalAs( UnmanagedType.I1 )]
|
||||
public static extern bool SteamInternal_GameServer_Init( uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamInternal_FindOrCreateUserInterface", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern IntPtr SteamInternal_FindOrCreateUserInterface( int steamuser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string versionname );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamInternal_FindOrCreateGameServerInterface", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern IntPtr SteamInternal_FindOrCreateGameServerInterface( int steamuser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string versionname );
|
||||
|
||||
[DllImport( Platform.LibraryName, EntryPoint = "SteamInternal_CreateInterface", CallingConvention = CallingConvention.Cdecl )]
|
||||
public static extern IntPtr SteamInternal_CreateInterface( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string version );
|
||||
|
||||
}
|
||||
static internal bool GameServer_Init( uint unIP, ushort usPort, ushort usGamePort, ushort usQueryPort, int eServerMode, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchVersionString )
|
||||
{
|
||||
return Native.SteamInternal_GameServer_Init( unIP, usPort, usGamePort, usQueryPort, eServerMode, pchVersionString );
|
||||
}
|
||||
|
||||
static internal IntPtr FindOrCreateUserInterface( int steamuser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string versionname )
|
||||
{
|
||||
return Native.SteamInternal_FindOrCreateUserInterface( steamuser, versionname );
|
||||
}
|
||||
|
||||
static internal IntPtr FindOrCreateGameServerInterface( int steamuser, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string versionname )
|
||||
{
|
||||
return Native.SteamInternal_FindOrCreateGameServerInterface( steamuser, versionname );
|
||||
}
|
||||
|
||||
static internal IntPtr CreateInterface( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string version )
|
||||
{
|
||||
return Native.SteamInternal_CreateInterface( version );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Linq;
|
||||
using Steamworks.Data;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace 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 );
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,7 @@ namespace 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 };
|
||||
@@ -23,6 +24,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -38,10 +40,11 @@ namespace Steamworks.Data
|
||||
|
||||
internal struct TxnID_t : IEquatable<TxnID_t>, IComparable<TxnID_t>
|
||||
{
|
||||
public GID_t Value;
|
||||
// Name: TxnID_t, Type: unsigned long long
|
||||
public ulong Value;
|
||||
|
||||
public static implicit operator TxnID_t( GID_t value ) => new TxnID_t(){ Value = value };
|
||||
public static implicit operator GID_t( TxnID_t value ) => value.Value;
|
||||
public static implicit operator TxnID_t( ulong value ) => new TxnID_t(){ Value = value };
|
||||
public static implicit operator ulong( TxnID_t value ) => value.Value;
|
||||
public override string ToString() => Value.ToString();
|
||||
public override int GetHashCode() => Value.GetHashCode();
|
||||
public override bool Equals( object p ) => this.Equals( (TxnID_t) p );
|
||||
@@ -53,6 +56,7 @@ namespace Steamworks.Data
|
||||
|
||||
internal struct PackageId_t : IEquatable<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 };
|
||||
@@ -68,6 +72,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -83,6 +88,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -98,6 +104,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -113,6 +120,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -128,6 +136,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -143,6 +152,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -158,6 +168,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -173,6 +184,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -188,6 +200,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -203,6 +216,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -218,6 +232,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -233,6 +248,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -248,6 +264,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -263,6 +280,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -278,6 +296,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -293,6 +312,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -308,6 +328,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -323,6 +344,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -338,6 +360,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -353,6 +376,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -368,6 +392,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -383,6 +408,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -398,6 +424,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -413,6 +440,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -428,6 +456,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -443,6 +472,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -458,6 +488,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -473,6 +504,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -488,6 +520,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -503,6 +536,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -518,6 +552,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -533,6 +568,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -548,6 +584,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -563,6 +600,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -578,6 +616,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -593,6 +632,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -608,6 +648,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -623,6 +664,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -638,6 +680,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -653,6 +696,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -668,6 +712,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -683,6 +728,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -698,6 +744,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -713,6 +760,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -728,6 +776,7 @@ namespace Steamworks.Data
|
||||
|
||||
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 };
|
||||
@@ -741,4 +790,52 @@ namespace Steamworks.Data
|
||||
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 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+35
-27
@@ -3,11 +3,21 @@ using System.Collections.Generic;
|
||||
|
||||
namespace 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
|
||||
{
|
||||
internal uint Id;
|
||||
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.
|
||||
@@ -51,12 +61,19 @@ namespace Steamworks.Data
|
||||
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 )
|
||||
{
|
||||
return SteamNetworkingSockets.Internal.SendMessageToConnection( this, ptr, (uint) size, (int)sendType );
|
||||
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 )
|
||||
@@ -65,6 +82,10 @@ namespace Steamworks.Data
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 )
|
||||
@@ -73,6 +94,9 @@ namespace Steamworks.Data
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 );
|
||||
@@ -80,10 +104,16 @@ namespace Steamworks.Data
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Flush any messages waiting on the Nagle timer and send them at the next transmission opportunity (often that means right now).
|
||||
/// 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 )
|
||||
@@ -91,27 +121,5 @@ namespace Steamworks.Data
|
||||
|
||||
return strVal;
|
||||
}
|
||||
|
||||
/*
|
||||
[ThreadStatic]
|
||||
private static SteamNetworkingMessage_t[] messageBuffer;
|
||||
|
||||
public IEnumerable<SteamNetworkingMessage_t> Messages
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( messageBuffer == null )
|
||||
messageBuffer = new SteamNetworkingMessage_t[128];
|
||||
|
||||
var num = SteamNetworkingSockets.Internal.ReceiveMessagesOnConnection( this, ref messageBuffer, messageBuffer.Length );
|
||||
|
||||
for ( int i = 0; i < num; i++)
|
||||
{
|
||||
yield return messageBuffer[i];
|
||||
messageBuffer[i].Release();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
+21
-1
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// Describe the state of a connection
|
||||
/// </summary>
|
||||
[StructLayout( LayoutKind.Sequential, Size = 696 )]
|
||||
public struct ConnectionInfo
|
||||
{
|
||||
@@ -19,7 +22,24 @@ namespace Steamworks.Data
|
||||
[MarshalAs( UnmanagedType.ByValTStr, SizeConst = 128 )]
|
||||
internal string connectionDescription;
|
||||
|
||||
/// <summary>
|
||||
/// High level state of the connection
|
||||
/// </summary>
|
||||
public ConnectionState State => state;
|
||||
public SteamId SteamId => identity.steamID;
|
||||
|
||||
/// <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;
|
||||
}
|
||||
}
|
||||
+33
-11
@@ -4,9 +4,23 @@ using System.Runtime.InteropServices;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public class ConnectionInterface
|
||||
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;
|
||||
|
||||
@@ -26,20 +40,22 @@ namespace Steamworks
|
||||
|
||||
public override string ToString() => Connection.ToString();
|
||||
|
||||
public virtual void OnConnectionChanged( ConnectionInfo data )
|
||||
public virtual void OnConnectionChanged( ConnectionInfo info )
|
||||
{
|
||||
switch ( data.State )
|
||||
ConnectionInfo = info;
|
||||
|
||||
switch ( info.State )
|
||||
{
|
||||
case ConnectionState.Connecting:
|
||||
OnConnecting( data );
|
||||
OnConnecting( info );
|
||||
break;
|
||||
case ConnectionState.Connected:
|
||||
OnConnected( data );
|
||||
OnConnected( info );
|
||||
break;
|
||||
case ConnectionState.ClosedByPeer:
|
||||
case ConnectionState.ProblemDetectedLocally:
|
||||
case ConnectionState.None:
|
||||
OnDisconnected( data );
|
||||
OnDisconnected( info );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -47,16 +63,20 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// We're trying to connect!
|
||||
/// </summary>
|
||||
public virtual void OnConnecting( ConnectionInfo data )
|
||||
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 data )
|
||||
public virtual void OnConnected( ConnectionInfo info )
|
||||
{
|
||||
Interface?.OnConnected( info );
|
||||
|
||||
Connected = true;
|
||||
Connecting = false;
|
||||
}
|
||||
@@ -64,8 +84,10 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// The connection has been closed remotely or disconnected locally. Check data.State for details.
|
||||
/// </summary>
|
||||
public virtual void OnDisconnected( ConnectionInfo data )
|
||||
public virtual void OnDisconnected( ConnectionInfo info )
|
||||
{
|
||||
Interface?.OnDisconnected( info );
|
||||
|
||||
Connected = false;
|
||||
Connecting = false;
|
||||
}
|
||||
@@ -108,13 +130,13 @@ namespace Steamworks
|
||||
//
|
||||
// Releases the message
|
||||
//
|
||||
msg.Release( msgPtr );
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using Steamworks.Data;
|
||||
|
||||
namespace 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 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using Steamworks.Data;
|
||||
|
||||
namespace 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 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,156 @@
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace 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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
using Steamworks.Data;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
[UnmanagedFunctionPointer( Platform.CC )]
|
||||
delegate void NetDebugFunc( [In] NetDebugOutput nType, [In] IntPtr pszMsg );
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
using Steamworks.Data;
|
||||
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
internal unsafe struct NetErrorMessage
|
||||
{
|
||||
public fixed char Value[1024];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace 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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
using Steamworks.Data;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace 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
|
||||
}
|
||||
}
|
||||
+1
-13
@@ -5,7 +5,7 @@ using System.Runtime.InteropServices;
|
||||
namespace Steamworks.Data
|
||||
{
|
||||
[StructLayout( LayoutKind.Sequential )]
|
||||
internal struct NetMsg
|
||||
internal partial struct NetMsg
|
||||
{
|
||||
internal IntPtr DataPtr;
|
||||
internal int DataSize;
|
||||
@@ -17,17 +17,5 @@ namespace Steamworks.Data
|
||||
internal IntPtr FreeDataPtr;
|
||||
internal IntPtr ReleasePtr;
|
||||
internal int Channel;
|
||||
|
||||
internal delegate void ReleaseDelegate( IntPtr msg );
|
||||
|
||||
public void Release( IntPtr data )
|
||||
{
|
||||
//
|
||||
// I think this function might be a static global, so we could probably
|
||||
// cache this release call.
|
||||
//
|
||||
var d = Marshal.GetDelegateForFunctionPointer<ReleaseDelegate>( ReleasePtr );
|
||||
d( data );
|
||||
}
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -20,11 +20,11 @@ namespace Steamworks.Data
|
||||
///
|
||||
/// </summary>
|
||||
[StructLayout( LayoutKind.Explicit, Size = 512 )]
|
||||
public struct PingLocation
|
||||
public struct NetPingLocation
|
||||
{
|
||||
public static PingLocation? TryParseFromString( string str )
|
||||
public static NetPingLocation? TryParseFromString( string str )
|
||||
{
|
||||
var result = default( PingLocation );
|
||||
var result = default( NetPingLocation );
|
||||
if ( !SteamNetworkingUtils.Internal.ParsePingLocationString( str, ref result ) )
|
||||
return null;
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace Steamworks.Data
|
||||
///
|
||||
/// Do you need to be able to do this from a backend/matchmaking server?
|
||||
/// You are looking for the "ticketgen" library.
|
||||
public int EstimatePingTo( PingLocation target )
|
||||
public int EstimatePingTo( NetPingLocation target )
|
||||
{
|
||||
return SteamNetworkingUtils.Internal.EstimatePingTimeBetweenTwoLocations( ref this, ref target );
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace 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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
+71
-18
@@ -5,30 +5,70 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public class SocketInterface
|
||||
/// <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 bool Close() => Socket.Close();
|
||||
|
||||
public override string ToString() => Socket.ToString();
|
||||
|
||||
public virtual void OnConnectionChanged( Connection connection, ConnectionInfo data )
|
||||
internal HSteamNetPollGroup pollGroup;
|
||||
|
||||
internal void Initialize()
|
||||
{
|
||||
switch ( data.State )
|
||||
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:
|
||||
OnConnecting( connection, data );
|
||||
if ( !Connecting.Contains( connection ) )
|
||||
{
|
||||
Connecting.Add( connection );
|
||||
OnConnecting( connection, info );
|
||||
}
|
||||
break;
|
||||
case ConnectionState.Connected:
|
||||
OnConnected( connection, data );
|
||||
if ( !Connected.Contains( connection ) )
|
||||
{
|
||||
Connecting.Remove( connection );
|
||||
Connected.Add( connection );
|
||||
|
||||
OnConnected( connection, info );
|
||||
}
|
||||
break;
|
||||
case ConnectionState.ClosedByPeer:
|
||||
case ConnectionState.ProblemDetectedLocally:
|
||||
case ConnectionState.None:
|
||||
OnDisconnected( connection, data );
|
||||
if ( Connecting.Contains( connection ) || Connected.Contains( connection ) )
|
||||
{
|
||||
OnDisconnected( connection, info );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -36,30 +76,42 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Default behaviour is to accept every connection
|
||||
/// </summary>
|
||||
public virtual void OnConnecting( Connection connection, ConnectionInfo data )
|
||||
public virtual void OnConnecting( Connection connection, ConnectionInfo info )
|
||||
{
|
||||
connection.Accept();
|
||||
Connecting.Add( connection );
|
||||
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 data )
|
||||
public virtual void OnConnected( Connection connection, ConnectionInfo info )
|
||||
{
|
||||
Connecting.Remove( connection );
|
||||
Connected.Add( connection );
|
||||
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 data )
|
||||
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 )
|
||||
@@ -69,7 +121,7 @@ namespace Steamworks
|
||||
|
||||
try
|
||||
{
|
||||
processed = SteamNetworkingSockets.Internal.ReceiveMessagesOnListenSocket( Socket, messageBuffer, bufferSize );
|
||||
processed = SteamNetworkingSockets.Internal.ReceiveMessagesOnPollGroup( pollGroup, messageBuffer, bufferSize );
|
||||
|
||||
for ( int i = 0; i < processed; i++ )
|
||||
{
|
||||
@@ -80,6 +132,7 @@ namespace Steamworks
|
||||
{
|
||||
Marshal.FreeHGlobal( messageBuffer );
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Overwhelmed our buffer, keep going
|
||||
@@ -100,13 +153,13 @@ namespace Steamworks
|
||||
//
|
||||
// Releases the message
|
||||
//
|
||||
msg.Release( msgPtr );
|
||||
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 Steamworks.Data
|
||||
{
|
||||
struct SteamDatagramRelayAuthTicket
|
||||
{
|
||||
// Not implemented, not used
|
||||
};
|
||||
}
|
||||
@@ -11,27 +11,7 @@ namespace Steamworks.ServerList
|
||||
{
|
||||
|
||||
#region ISteamMatchmakingServers
|
||||
|
||||
static ISteamMatchmakingServers _internal;
|
||||
internal static ISteamMatchmakingServers Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamMatchmakingServers();
|
||||
_internal.Init();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Shutdown()
|
||||
{
|
||||
_internal = null;
|
||||
}
|
||||
|
||||
internal static ISteamMatchmakingServers Internal => SteamMatchmakingServers.Internal;
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -11,32 +11,19 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Exposes a wide range of information and actions for applications and Downloadable Content (DLC).
|
||||
/// </summary>
|
||||
public static class SteamApps
|
||||
public class SteamApps : SteamSharedClass<SteamApps>
|
||||
{
|
||||
static ISteamApps _internal;
|
||||
internal static ISteamApps Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamApps();
|
||||
_internal.Init();
|
||||
}
|
||||
internal static ISteamApps Internal => Interface as ISteamApps;
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Shutdown()
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
_internal = null;
|
||||
SetInterface( server, new ISteamApps( server ) );
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
DlcInstalled_t.Install( x => OnDlcInstalled?.Invoke( x.AppID ) );
|
||||
NewUrlLaunchParameters_t.Install( x => OnNewLaunchParameters?.Invoke() );
|
||||
Dispatch.Install<DlcInstalled_t>( x => OnDlcInstalled?.Invoke( x.AppID ) );
|
||||
Dispatch.Install<NewUrlLaunchParameters_t>( x => OnNewLaunchParameters?.Invoke() );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -87,7 +74,7 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Gets a list of the languages the current app supports.
|
||||
/// </summary>
|
||||
public static string[] AvailablLanguages => Internal.GetAvailableGameLanguages().Split( new[] { ',' }, StringSplitOptions.RemoveEmptyEntries );
|
||||
public static string[] AvailableLanguages => Internal.GetAvailableGameLanguages().Split( new[] { ',' }, StringSplitOptions.RemoveEmptyEntries );
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the active user is subscribed to a specified AppId.
|
||||
@@ -181,9 +168,7 @@ namespace Steamworks
|
||||
appid = SteamClient.AppId;
|
||||
|
||||
var depots = new DepotId_t[32];
|
||||
uint count = 0;
|
||||
|
||||
count = Internal.GetInstalledDepots( appid.Value, depots, (uint) depots.Length );
|
||||
uint count = Internal.GetInstalledDepots( appid.Value, depots, (uint) depots.Length );
|
||||
|
||||
for ( int i = 0; i < count; i++ )
|
||||
{
|
||||
@@ -233,7 +218,7 @@ namespace Steamworks
|
||||
ulong punBytesTotal = 0;
|
||||
|
||||
if ( !Internal.GetDlcDownloadProgress( appid.Value, ref punBytesDownloaded, ref punBytesTotal ) )
|
||||
return default( DownloadProgress );
|
||||
return default;
|
||||
|
||||
return new DownloadProgress { BytesDownloaded = punBytesDownloaded, BytesTotal = punBytesTotal, Active = true };
|
||||
}
|
||||
@@ -276,7 +261,7 @@ namespace Steamworks
|
||||
{
|
||||
get
|
||||
{
|
||||
var len = Internal.GetLaunchCommandLine( out var strVal );
|
||||
Internal.GetLaunchCommandLine( out var strVal );
|
||||
return strVal;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@ namespace Steamworks
|
||||
/// </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() );
|
||||
|
||||
@@ -29,76 +32,69 @@ namespace Steamworks
|
||||
|
||||
initialized = true;
|
||||
|
||||
SteamApps.InstallEvents();
|
||||
SteamUtils.InstallEvents();
|
||||
SteamParental.InstallEvents();
|
||||
SteamMusic.InstallEvents();
|
||||
SteamVideo.InstallEvents();
|
||||
SteamUser.InstallEvents();
|
||||
SteamFriends.InstallEvents();
|
||||
SteamScreenshots.InstallEvents();
|
||||
SteamUserStats.InstallEvents();
|
||||
SteamInventory.InstallEvents();
|
||||
SteamNetworking.InstallEvents();
|
||||
SteamMatchmaking.InstallEvents();
|
||||
SteamParties.InstallEvents();
|
||||
SteamNetworkingSockets.InstallEvents();
|
||||
SteamInput.InstallEvents();
|
||||
SteamUGC.InstallEvents();
|
||||
//
|
||||
// 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 )
|
||||
{
|
||||
RunCallbacksAsync();
|
||||
//
|
||||
// This will keep looping in the background every 16 ms
|
||||
// until we shut down.
|
||||
//
|
||||
Dispatch.LoopClientAsync();
|
||||
}
|
||||
}
|
||||
|
||||
static List<SteamInterface> openIterfaces = new List<SteamInterface>();
|
||||
|
||||
internal static void WatchInterface( SteamInterface steamInterface )
|
||||
internal static void AddInterface<T>() where T : SteamClass, new()
|
||||
{
|
||||
if ( openIterfaces.Contains( steamInterface ) )
|
||||
throw new System.Exception( "openIterfaces already contains interface!" );
|
||||
|
||||
openIterfaces.Add( steamInterface );
|
||||
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 openIterfaces )
|
||||
foreach ( var e in openInterfaces )
|
||||
{
|
||||
e.Shutdown();
|
||||
e.DestroyInterface( false );
|
||||
}
|
||||
|
||||
openIterfaces.Clear();
|
||||
openInterfaces.Clear();
|
||||
}
|
||||
|
||||
public static Action<Exception> OnCallbackException;
|
||||
|
||||
public static bool IsValid => initialized;
|
||||
|
||||
internal static async void RunCallbacksAsync()
|
||||
{
|
||||
while ( IsValid )
|
||||
{
|
||||
await Task.Delay( 16 );
|
||||
|
||||
try
|
||||
{
|
||||
RunCallbacks();
|
||||
}
|
||||
catch ( System.Exception e )
|
||||
{
|
||||
OnCallbackException?.Invoke( e );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Shutdown()
|
||||
{
|
||||
if ( !IsValid ) return;
|
||||
|
||||
SteamInput.Shutdown();
|
||||
|
||||
Cleanup();
|
||||
|
||||
SteamAPI.Shutdown();
|
||||
@@ -106,45 +102,16 @@ namespace Steamworks
|
||||
|
||||
internal static void Cleanup()
|
||||
{
|
||||
Dispatch.ShutdownClient();
|
||||
|
||||
initialized = false;
|
||||
|
||||
Event.DisposeAllClient();
|
||||
ShutdownInterfaces();
|
||||
|
||||
SteamInput.Shutdown();
|
||||
SteamApps.Shutdown();
|
||||
SteamUtils.Shutdown();
|
||||
SteamParental.Shutdown();
|
||||
SteamMusic.Shutdown();
|
||||
SteamVideo.Shutdown();
|
||||
SteamUser.Shutdown();
|
||||
SteamFriends.Shutdown();
|
||||
SteamScreenshots.Shutdown();
|
||||
SteamUserStats.Shutdown();
|
||||
SteamInventory.Shutdown();
|
||||
SteamNetworking.Shutdown();
|
||||
SteamMatchmaking.Shutdown();
|
||||
SteamParties.Shutdown();
|
||||
SteamNetworkingUtils.Shutdown();
|
||||
SteamNetworkingSockets.Shutdown();
|
||||
ServerList.Base.Shutdown();
|
||||
}
|
||||
|
||||
internal static void RegisterCallback( IntPtr intPtr, int callbackId )
|
||||
{
|
||||
SteamAPI.RegisterCallback( intPtr, callbackId );
|
||||
}
|
||||
|
||||
public static void RunCallbacks()
|
||||
{
|
||||
if ( !IsValid ) return;
|
||||
|
||||
SteamAPI.RunCallbacks();
|
||||
}
|
||||
|
||||
internal static void UnregisterCallback( IntPtr intPtr )
|
||||
{
|
||||
SteamAPI.UnregisterCallback( intPtr );
|
||||
if ( Dispatch.ClientPipe != 0 )
|
||||
Dispatch.Frame( Dispatch.ClientPipe );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -10,42 +10,30 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public static class SteamFriends
|
||||
public class SteamFriends : SteamClientClass<SteamFriends>
|
||||
{
|
||||
static ISteamFriends _internal;
|
||||
internal static ISteamFriends Internal
|
||||
internal static ISteamFriends Internal => Interface as ISteamFriends;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
get
|
||||
{
|
||||
SteamClient.ValidCheck();
|
||||
SetInterface( server, new ISteamFriends( server ) );
|
||||
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamFriends();
|
||||
_internal.Init();
|
||||
richPresence = new Dictionary<string, string>();
|
||||
|
||||
richPresence = new Dictionary<string, string>();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
internal static void Shutdown()
|
||||
{
|
||||
_internal = null;
|
||||
InstallEvents();
|
||||
}
|
||||
|
||||
static Dictionary<string, string> richPresence;
|
||||
|
||||
internal static void InstallEvents()
|
||||
internal void InstallEvents()
|
||||
{
|
||||
FriendStateChange_t.Install( x => OnPersonaStateChange?.Invoke( new Friend( x.SteamID ) ) );
|
||||
GameRichPresenceJoinRequested_t.Install( x => OnGameRichPresenceJoinRequested?.Invoke( new Friend( x.SteamIDFriend), x.ConnectUTF8() ) );
|
||||
GameConnectedFriendChatMsg_t.Install( OnFriendChatMessage );
|
||||
GameOverlayActivated_t.Install( x => OnGameOverlayActivated?.Invoke() );
|
||||
GameServerChangeRequested_t.Install( x => OnGameServerChangeRequested?.Invoke( x.ServerUTF8(), x.PasswordUTF8() ) );
|
||||
GameLobbyJoinRequested_t.Install( x => OnGameLobbyJoinRequested?.Invoke( new Lobby( x.SteamIDLobby ), x.SteamIDFriend ) );
|
||||
FriendRichPresenceUpdate_t.Install( x => OnFriendRichPresenceUpdate?.Invoke( new Friend( x.SteamIDFriend ) ) );
|
||||
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>
|
||||
@@ -70,7 +58,7 @@ namespace Steamworks
|
||||
/// 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 OnGameOverlayActivated;
|
||||
public static event Action<bool> OnGameOverlayActivated;
|
||||
|
||||
/// <summary>
|
||||
/// Called when the user tries to join a different game server from their friends list
|
||||
@@ -95,20 +83,25 @@ namespace Steamworks
|
||||
|
||||
var friend = new Friend( data.SteamIDUser );
|
||||
|
||||
var buffer = Helpers.TakeBuffer( 1024 * 32 );
|
||||
var buffer = Helpers.TakeMemory();
|
||||
var type = ChatEntryType.ChatMsg;
|
||||
|
||||
fixed ( byte* ptr = buffer )
|
||||
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++ )
|
||||
{
|
||||
var len = Internal.GetFriendMessage( data.SteamIDUser, data.MessageID, (IntPtr)ptr, buffer.Length, ref type );
|
||||
|
||||
if ( len == 0 && type == ChatEntryType.Invalid )
|
||||
return;
|
||||
|
||||
var typeName = type.ToString();
|
||||
var message = Encoding.UTF8.GetString( buffer, 0, len );
|
||||
|
||||
OnChatMessage( friend, typeName, message );
|
||||
yield return new Friend( Internal.GetFriendByIndex( i, (int)flag ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,18 +112,32 @@ namespace Steamworks
|
||||
|
||||
public static IEnumerable<Friend> GetFriends()
|
||||
{
|
||||
for ( int i=0; i<Internal.GetFriendCount( (int) FriendFlags.Immediate ); i++ )
|
||||
{
|
||||
yield return new Friend( Internal.GetFriendByIndex( i, (int)FriendFlags.Immediate ) );
|
||||
}
|
||||
return GetFriendsWithFlag(FriendFlags.Immediate);
|
||||
}
|
||||
|
||||
public static IEnumerable<Friend> GetBlocked()
|
||||
{
|
||||
for ( int i = 0; i < Internal.GetFriendCount( (int)FriendFlags.Blocked ); i++ )
|
||||
{
|
||||
yield return new Friend( Internal.GetFriendByIndex( i, (int)FriendFlags.Blocked) );
|
||||
}
|
||||
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()
|
||||
@@ -141,6 +148,22 @@ namespace Steamworks
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<Friend> GetFromSource( SteamId steamid )
|
||||
{
|
||||
for ( int i = 0; i < Internal.GetFriendCountFromSource( steamid ); i++ )
|
||||
{
|
||||
yield return new Friend( Internal.GetFriendFromSourceByIndex( steamid, i ) );
|
||||
}
|
||||
}
|
||||
|
||||
public static IEnumerable<Clan> GetClans()
|
||||
{
|
||||
for (int i = 0; i < Internal.GetClanCount(); i++)
|
||||
{
|
||||
yield return new Clan( Internal.GetClanByIndex( i ) );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The dialog to open. Valid options are:
|
||||
/// "friends",
|
||||
@@ -258,8 +281,12 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static bool SetRichPresence( string key, string value )
|
||||
{
|
||||
richPresence[key] = value;
|
||||
return Internal.SetRichPresence( key, value );
|
||||
bool success = Internal.SetRichPresence( key, value );
|
||||
|
||||
if ( success )
|
||||
richPresence[key] = value;
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -289,5 +316,36 @@ namespace Steamworks
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,44 +3,17 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public static class SteamInput
|
||||
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;
|
||||
|
||||
static ISteamInput _internal;
|
||||
internal static ISteamInput Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
SteamClient.ValidCheck();
|
||||
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamInput();
|
||||
_internal.Init();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Shutdown()
|
||||
{
|
||||
if ( _internal != null && _internal.IsValid )
|
||||
{
|
||||
_internal.DoShutdown();
|
||||
}
|
||||
|
||||
_internal = null;
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
Internal.DoInit();
|
||||
Internal.RunFrame();
|
||||
|
||||
// None?
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// You shouldn't really need to call this because it get called by RunCallbacks on SteamClient
|
||||
@@ -52,7 +25,7 @@ namespace Steamworks
|
||||
Internal.RunFrame();
|
||||
}
|
||||
|
||||
static InputHandle_t[] queryArray = new InputHandle_t[STEAM_CONTROLLER_MAX_COUNT];
|
||||
static readonly InputHandle_t[] queryArray = new InputHandle_t[STEAM_CONTROLLER_MAX_COUNT];
|
||||
|
||||
/// <summary>
|
||||
/// Return a list of connected controllers.
|
||||
@@ -70,7 +43,30 @@ namespace Steamworks
|
||||
}
|
||||
}
|
||||
|
||||
internal static Dictionary<string, InputDigitalActionHandle_t> DigitalHandles = new Dictionary<string, InputDigitalActionHandle_t>();
|
||||
|
||||
/// <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 ) )
|
||||
|
||||
@@ -12,32 +12,25 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public static class SteamInventory
|
||||
public class SteamInventory : SteamSharedClass<SteamInventory>
|
||||
{
|
||||
static ISteamInventory _internal;
|
||||
internal static ISteamInventory Internal
|
||||
internal static ISteamInventory Internal => Interface as ISteamInventory;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
get
|
||||
SetInterface( server, new ISteamInventory( server ) );
|
||||
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
internal static void InstallEvents( bool server )
|
||||
{
|
||||
if ( !server )
|
||||
{
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamInventory();
|
||||
_internal.Init();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
Dispatch.Install<SteamInventoryFullUpdate_t>( x => InventoryUpdated( x ) );
|
||||
}
|
||||
}
|
||||
internal static void Shutdown()
|
||||
{
|
||||
_internal = null;
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
SteamInventoryFullUpdate_t.Install( x => InventoryUpdated( x ) );
|
||||
SteamInventoryDefinitionUpdate_t.Install( x => LoadDefinitions() );
|
||||
SteamInventoryDefinitionUpdate_t.Install( x => LoadDefinitions(), true );
|
||||
Dispatch.Install<SteamInventoryDefinitionUpdate_t>( x => LoadDefinitions(), server );
|
||||
}
|
||||
|
||||
private static void InventoryUpdated( SteamInventoryFullUpdate_t x )
|
||||
@@ -184,7 +177,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static bool GetAllItems()
|
||||
{
|
||||
var sresult = default( SteamInventoryResult_t );
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
return Internal.GetAllItems( ref sresult );
|
||||
}
|
||||
|
||||
@@ -193,7 +186,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> GetAllItemsAsync()
|
||||
{
|
||||
var sresult = default( SteamInventoryResult_t );
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
if ( !Internal.GetAllItems( ref sresult ) )
|
||||
return null;
|
||||
@@ -209,7 +202,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> GenerateItemAsync( InventoryDef target, int amount )
|
||||
{
|
||||
var sresult = default( SteamInventoryResult_t );
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
var defs = new InventoryDefId[] { target.Id };
|
||||
var cnts = new uint[] { (uint)amount };
|
||||
@@ -227,7 +220,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> CraftItemAsync( InventoryItem[] list, InventoryDef target )
|
||||
{
|
||||
var sresult = default( SteamInventoryResult_t );
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
var give = new InventoryDefId[] { target.Id };
|
||||
var givec = new uint[] { 1 };
|
||||
@@ -248,7 +241,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> CraftItemAsync( InventoryItem.Amount[] list, InventoryDef target )
|
||||
{
|
||||
var sresult = default( SteamInventoryResult_t );
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
var give = new InventoryDefId[] { target.Id };
|
||||
var givec = new uint[] { 1 };
|
||||
@@ -290,7 +283,7 @@ namespace Steamworks
|
||||
{
|
||||
Marshal.Copy( data, 0, ptr, dataLength );
|
||||
|
||||
var sresult = default( SteamInventoryResult_t );
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
if ( !Internal.DeserializeResult( ref sresult, (IntPtr)ptr, (uint)dataLength, false ) )
|
||||
return null;
|
||||
@@ -311,7 +304,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> GrantPromoItemsAsync()
|
||||
{
|
||||
var sresult = default( SteamInventoryResult_t );
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
if ( !Internal.GrantPromoItems( ref sresult ) )
|
||||
return null;
|
||||
@@ -325,7 +318,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> TriggerItemDropAsync( InventoryDefId id )
|
||||
{
|
||||
var sresult = default( SteamInventoryResult_t );
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
if ( !Internal.TriggerItemDrop( ref sresult, id ) )
|
||||
return null;
|
||||
@@ -339,7 +332,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static async Task<InventoryResult?> AddPromoItemAsync( InventoryDefId id )
|
||||
{
|
||||
var sresult = default( SteamInventoryResult_t );
|
||||
var sresult = Defines.k_SteamInventoryResultInvalid;
|
||||
|
||||
if ( !Internal.AddPromoItem( ref sresult, id ) )
|
||||
return null;
|
||||
|
||||
@@ -10,48 +10,34 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Functions for clients to access matchmaking services, favorites, and to operate on game lobbies
|
||||
/// </summary>
|
||||
public static class SteamMatchmaking
|
||||
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;
|
||||
|
||||
|
||||
static ISteamMatchmaking _internal;
|
||||
|
||||
internal static ISteamMatchmaking Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
SteamClient.ValidCheck();
|
||||
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamMatchmaking();
|
||||
_internal.Init();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Shutdown()
|
||||
{
|
||||
_internal = null;
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
LobbyInvite_t.Install( x => OnLobbyInvite?.Invoke( new Friend( x.SteamIDUser ), new Lobby( x.SteamIDLobby ) ) );
|
||||
Dispatch.Install<LobbyInvite_t>( x => OnLobbyInvite?.Invoke( new Friend( x.SteamIDUser ), new Lobby( x.SteamIDLobby ) ) );
|
||||
|
||||
LobbyEnter_t.Install( x => OnLobbyEntered?.Invoke( new Lobby( x.SteamIDLobby ) ) );
|
||||
Dispatch.Install<LobbyEnter_t>( x => OnLobbyEntered?.Invoke( new Lobby( x.SteamIDLobby ) ) );
|
||||
|
||||
LobbyCreated_t.Install( x => OnLobbyCreated?.Invoke( x.Result, new Lobby( x.SteamIDLobby ) ) );
|
||||
Dispatch.Install<LobbyCreated_t>( x => OnLobbyCreated?.Invoke( x.Result, new Lobby( x.SteamIDLobby ) ) );
|
||||
|
||||
LobbyGameCreated_t.Install( x => OnLobbyGameCreated?.Invoke( new Lobby( x.SteamIDLobby ), x.IP, x.Port, x.SteamIDGameServer ) );
|
||||
Dispatch.Install<LobbyGameCreated_t>( x => OnLobbyGameCreated?.Invoke( new Lobby( x.SteamIDLobby ), x.IP, x.Port, x.SteamIDGameServer ) );
|
||||
|
||||
LobbyDataUpdate_t.Install( x =>
|
||||
Dispatch.Install<LobbyDataUpdate_t>( x =>
|
||||
{
|
||||
if ( x.Success == 0 ) return;
|
||||
|
||||
@@ -61,7 +47,7 @@ namespace Steamworks
|
||||
OnLobbyMemberDataChanged?.Invoke( new Lobby( x.SteamIDLobby ), new Friend( x.SteamIDMember ) );
|
||||
} );
|
||||
|
||||
LobbyChatUpdate_t.Install( x =>
|
||||
Dispatch.Install<LobbyChatUpdate_t>( x =>
|
||||
{
|
||||
if ( (x.GfChatMemberStateChange & (int)ChatMemberStateChange.Entered) != 0 )
|
||||
OnLobbyMemberJoined?.Invoke( new Lobby( x.SteamIDLobby ), new Friend( x.SteamIDUserChanged ) );
|
||||
@@ -79,23 +65,20 @@ namespace Steamworks
|
||||
OnLobbyMemberBanned?.Invoke( new Lobby( x.SteamIDLobby ), new Friend( x.SteamIDUserChanged ), new Friend( x.SteamIDMakingChange ) );
|
||||
} );
|
||||
|
||||
LobbyChatMsg_t.Install( OnLobbyChatMessageRecievedAPI );
|
||||
Dispatch.Install<LobbyChatMsg_t>( OnLobbyChatMessageRecievedAPI );
|
||||
}
|
||||
|
||||
static private unsafe void OnLobbyChatMessageRecievedAPI( LobbyChatMsg_t callback )
|
||||
{
|
||||
SteamId steamid = default;
|
||||
ChatEntryType chatEntryType = default;
|
||||
var buffer = Helpers.TakeBuffer( 1024 * 4 );
|
||||
var buffer = Helpers.TakeMemory();
|
||||
|
||||
fixed ( byte* p = buffer )
|
||||
var readData = Internal.GetLobbyChatEntry( callback.SteamIDLobby, (int)callback.ChatID, ref steamid, buffer, Helpers.MemoryBufferSize, ref chatEntryType );
|
||||
|
||||
if ( readData > 0 )
|
||||
{
|
||||
var readData = Internal.GetLobbyChatEntry( callback.SteamIDLobby, (int)callback.ChatID, ref steamid, (IntPtr)p, buffer.Length, ref chatEntryType );
|
||||
|
||||
if ( readData > 0 )
|
||||
{
|
||||
OnChatMessage?.Invoke( new Lobby( callback.SteamIDLobby ), new Friend( steamid ), Encoding.UTF8.GetString( buffer, 0, readData ) );
|
||||
}
|
||||
OnChatMessage?.Invoke( new Lobby( callback.SteamIDLobby ), new Friend( steamid ), Helpers.MemoryToString( buffer ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,9 +171,9 @@ namespace Steamworks
|
||||
return new Lobby { Id = lobby.Value.SteamIDLobby };
|
||||
}
|
||||
|
||||
/// <summmary>
|
||||
/// <summary>
|
||||
/// Attempts to directly join the specified lobby
|
||||
/// </summmary>
|
||||
/// </summary>
|
||||
public static async Task<Lobby?> JoinLobbyAsync( SteamId lobbyId )
|
||||
{
|
||||
var lobby = await Internal.JoinLobby( lobbyId );
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
namespace 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 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,33 +13,21 @@ namespace Steamworks
|
||||
/// when an important cut scene is shown, and start playing afterwards.
|
||||
/// Nothing uses Steam Music though so this can probably get fucked
|
||||
/// </summary>
|
||||
public static class SteamMusic
|
||||
public class SteamMusic : SteamClientClass<SteamMusic>
|
||||
{
|
||||
static ISteamMusic _internal;
|
||||
internal static ISteamMusic Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
SteamClient.ValidCheck();
|
||||
internal static ISteamMusic Internal => Interface as ISteamMusic;
|
||||
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamMusic();
|
||||
_internal.Init();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
internal static void Shutdown()
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
_internal = null;
|
||||
SetInterface( server, new ISteamMusic( server ) );
|
||||
|
||||
InstallEvents();
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
PlaybackStatusHasChanged_t.Install( x => OnPlaybackChanged?.Invoke() );
|
||||
VolumeHasChanged_t.Install( x => OnVolumeChanged?.Invoke( x.NewVolume ) );
|
||||
Dispatch.Install<PlaybackStatusHasChanged_t>( x => OnPlaybackChanged?.Invoke() );
|
||||
Dispatch.Install<VolumeHasChanged_t>( x => OnVolumeChanged?.Invoke( x.NewVolume ) );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -8,32 +8,21 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public static class SteamNetworking
|
||||
public class SteamNetworking : SteamSharedClass<SteamNetworking>
|
||||
{
|
||||
static ISteamNetworking _internal;
|
||||
internal static ISteamNetworking Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamNetworking();
|
||||
_internal.Init();
|
||||
}
|
||||
internal static ISteamNetworking Internal => Interface as ISteamNetworking;
|
||||
|
||||
return _internal;
|
||||
}
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamNetworking( server ) );
|
||||
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
internal static void Shutdown()
|
||||
internal static void InstallEvents( bool server )
|
||||
{
|
||||
_internal = null;
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
P2PSessionRequest_t.Install( x => OnP2PSessionRequest?.Invoke( x.SteamIDRemote ) );
|
||||
P2PSessionConnectFail_t.Install( x => OnP2PConnectionFailed?.Invoke( x.SteamIDRemote, (P2PSessionError) x.P2PSessionError ) );
|
||||
Dispatch.Install<P2PSessionRequest_t>( x => OnP2PSessionRequest?.Invoke( x.SteamIDRemote ), server );
|
||||
Dispatch.Install<P2PSessionConnectFail_t>( x => OnP2PConnectionFailed?.Invoke( x.SteamIDRemote, (P2PSessionError) x.P2PSessionError ), server );
|
||||
}
|
||||
|
||||
public static void ResetActions()
|
||||
@@ -97,10 +86,10 @@ namespace Steamworks
|
||||
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;
|
||||
{
|
||||
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 );
|
||||
@@ -110,7 +99,25 @@ namespace Steamworks
|
||||
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>
|
||||
@@ -129,6 +136,24 @@ namespace Steamworks
|
||||
}
|
||||
}
|
||||
|
||||
/// <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 );
|
||||
}
|
||||
|
||||
public static P2PSessionState? GetP2PSessionState( SteamId steamid )
|
||||
{
|
||||
P2PSessionState_t state = new P2PSessionState_t();
|
||||
if (Internal.GetP2PSessionState(steamid, ref state))
|
||||
{
|
||||
return new P2PSessionState(state);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,31 +8,21 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public static class SteamNetworkingSockets
|
||||
public class SteamNetworkingSockets : SteamSharedClass<SteamNetworkingSockets>
|
||||
{
|
||||
static ISteamNetworkingSockets _internal;
|
||||
internal static ISteamNetworkingSockets Internal
|
||||
internal static ISteamNetworkingSockets Internal => Interface as ISteamNetworkingSockets;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamNetworkingSockets();
|
||||
_internal.Init();
|
||||
|
||||
SocketInterfaces = new Dictionary<uint, SocketInterface>();
|
||||
ConnectionInterfaces = new Dictionary<uint, ConnectionInterface>();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
SetInterface( server, new ISteamNetworkingSockets( server ) );
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
#region SocketInterface
|
||||
|
||||
#region SocketInterface
|
||||
static readonly Dictionary<uint, SocketManager> SocketInterfaces = new Dictionary<uint, SocketManager>();
|
||||
|
||||
static Dictionary<uint, SocketInterface> SocketInterfaces;
|
||||
|
||||
internal static SocketInterface GetSocketInterface( uint id )
|
||||
internal static SocketManager GetSocketManager( uint id )
|
||||
{
|
||||
if ( SocketInterfaces == null ) return null;
|
||||
if ( id == 0 ) throw new System.ArgumentException( "Invalid Socket" );
|
||||
@@ -43,20 +33,17 @@ namespace Steamworks
|
||||
return null;
|
||||
}
|
||||
|
||||
internal static void SetSocketInterface( uint id, SocketInterface iface )
|
||||
internal static void SetSocketManager( uint id, SocketManager manager )
|
||||
{
|
||||
if ( id == 0 ) throw new System.ArgumentException( "Invalid Socket" );
|
||||
|
||||
Console.WriteLine( $"Installing Socket For {id}" );
|
||||
SocketInterfaces[id] = iface;
|
||||
SocketInterfaces[id] = manager;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region ConnectionInterface
|
||||
static Dictionary<uint, ConnectionInterface> ConnectionInterfaces;
|
||||
#region ConnectionInterface
|
||||
static readonly Dictionary<uint, ConnectionManager> ConnectionInterfaces = new Dictionary<uint, ConnectionManager>();
|
||||
|
||||
|
||||
internal static ConnectionInterface GetConnectionInterface( uint id )
|
||||
internal static ConnectionManager GetConnectionManager( uint id )
|
||||
{
|
||||
if ( ConnectionInterfaces == null ) return null;
|
||||
if ( id == 0 ) return null;
|
||||
@@ -67,24 +54,20 @@ namespace Steamworks
|
||||
return null;
|
||||
}
|
||||
|
||||
internal static void SetConnectionInterface( uint id, ConnectionInterface iface )
|
||||
internal static void SetConnectionManager( uint id, ConnectionManager manager )
|
||||
{
|
||||
if ( id == 0 ) throw new System.ArgumentException( "Invalid Connection" );
|
||||
ConnectionInterfaces[id] = iface;
|
||||
ConnectionInterfaces[id] = manager;
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
internal static void Shutdown()
|
||||
|
||||
|
||||
internal void InstallEvents( bool server )
|
||||
{
|
||||
_internal = null;
|
||||
SocketInterfaces = null;
|
||||
ConnectionInterfaces = null;
|
||||
Dispatch.Install<SteamNetConnectionStatusChangedCallback_t>( ConnectionStatusChanged, server );
|
||||
}
|
||||
|
||||
internal static void InstallEvents( bool server = false )
|
||||
{
|
||||
SteamNetConnectionStatusChangedCallback_t.Install( x => ConnectionStatusChanged( x ), server );
|
||||
}
|
||||
|
||||
private static void ConnectionStatusChanged( SteamNetConnectionStatusChangedCallback_t data )
|
||||
{
|
||||
@@ -93,12 +76,12 @@ namespace Steamworks
|
||||
//
|
||||
if ( data.Nfo.listenSocket.Id > 0 )
|
||||
{
|
||||
var iface = GetSocketInterface( data.Nfo.listenSocket.Id );
|
||||
var iface = GetSocketManager( data.Nfo.listenSocket.Id );
|
||||
iface?.OnConnectionChanged( data.Conn, data.Nfo );
|
||||
}
|
||||
else
|
||||
{
|
||||
var iface = GetConnectionInterface( data.Conn.Id );
|
||||
var iface = GetConnectionManager( data.Conn.Id );
|
||||
iface?.OnConnectionChanged( data.Nfo );
|
||||
}
|
||||
|
||||
@@ -111,46 +94,128 @@ namespace Steamworks
|
||||
/// <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 : SocketInterface, new()
|
||||
public static T CreateNormalSocket<T>( NetAddress address ) where T : SocketManager, new()
|
||||
{
|
||||
var t = new T();
|
||||
t.Socket = Internal.CreateListenSocketIP( ref address );
|
||||
SetSocketInterface( t.Socket.Id, 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 : ConnectionInterface, new()
|
||||
public static T ConnectNormal<T>( NetAddress address ) where T : ConnectionManager, new()
|
||||
{
|
||||
var t = new T();
|
||||
t.Connection = Internal.ConnectByIPAddress( ref address );
|
||||
SetConnectionInterface( t.Connection.Id, 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)
|
||||
///
|
||||
/// To use this derive a class from SocketManager and override as much as you want.
|
||||
///
|
||||
/// </summary>
|
||||
public static T CreateRelaySocket<T>( int virtualport = 0 ) where T : SocketInterface, new()
|
||||
public static T CreateRelaySocket<T>( int virtualport = 0 ) where T : SocketManager, new()
|
||||
{
|
||||
var t = new T();
|
||||
t.Socket = Internal.CreateListenSocketP2P( virtualport );
|
||||
SetSocketInterface( t.Socket.Id, t );
|
||||
var options = Array.Empty<NetKeyValue>();
|
||||
t.Socket = Internal.CreateListenSocketP2P( virtualport, options.Length, options );
|
||||
t.Initialize();
|
||||
SetSocketManager( t.Socket.Id, t );
|
||||
return t;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a server that will be relayed via Valve's network (hiding the IP and improving ping)
|
||||
///
|
||||
/// 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 CreateRelaySocket( int virtualport, ISocketManager intrface )
|
||||
{
|
||||
var options = Array.Empty<NetKeyValue>();
|
||||
var socket = Internal.CreateListenSocketP2P( virtualport, options.Length, options );
|
||||
|
||||
var t = new SocketManager
|
||||
{
|
||||
Socket = socket,
|
||||
Interface = intrface
|
||||
};
|
||||
|
||||
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 : ConnectionInterface, new()
|
||||
public static T ConnectRelay<T>( SteamId serverId, int virtualport = 0 ) where T : ConnectionManager, new()
|
||||
{
|
||||
var t = new T();
|
||||
NetIdentity identity = serverId;
|
||||
t.Connection = Internal.ConnectP2P( ref identity, virtualport );
|
||||
SetConnectionInterface( t.Connection.Id, t );
|
||||
var options = Array.Empty<NetKeyValue>();
|
||||
t.Connection = Internal.ConnectP2P( ref identity, virtualport, options.Length, options );
|
||||
SetConnectionManager( t.Connection.Id, t );
|
||||
return t;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,26 +10,79 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public static class SteamNetworkingUtils
|
||||
public class SteamNetworkingUtils : SteamSharedClass<SteamNetworkingUtils>
|
||||
{
|
||||
static ISteamNetworkingUtils _internal;
|
||||
internal static ISteamNetworkingUtils Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamNetworkingUtils();
|
||||
_internal.InitUserless();
|
||||
}
|
||||
internal static ISteamNetworkingUtils Internal => Interface as ISteamNetworkingUtils;
|
||||
|
||||
return _internal;
|
||||
}
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
SetInterface( server, new ISteamNetworkingUtils( server ) );
|
||||
InstallCallbacks( server );
|
||||
}
|
||||
|
||||
internal static void Shutdown()
|
||||
static void InstallCallbacks( bool server )
|
||||
{
|
||||
_internal = null;
|
||||
Dispatch.Install<SteamRelayNetworkStatus_t>( x =>
|
||||
{
|
||||
Status = new SteamRelayNetworkStatus
|
||||
{
|
||||
Avail = x.Avail,
|
||||
AvailNetConfig = x.AvailNetworkConfig,
|
||||
AvailAnyRelay = x.AvailAnyRelay,
|
||||
Msg = x.DebugMsgUTF8()
|
||||
};
|
||||
}, 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;
|
||||
|
||||
public struct SteamRelayNetworkStatus
|
||||
{
|
||||
public SteamNetworkingAvailability Avail;
|
||||
public SteamNetworkingAvailability AvailNetConfig;
|
||||
public SteamNetworkingAvailability AvailAnyRelay;
|
||||
public string Msg;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The latest available status gathered from the SteamRelayNetworkStatus callback
|
||||
/// </summary>
|
||||
public static SteamRelayNetworkStatus 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>
|
||||
@@ -41,11 +94,11 @@ namespace Steamworks
|
||||
/// 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 PingLocation? LocalPingLocation
|
||||
public static NetPingLocation? LocalPingLocation
|
||||
{
|
||||
get
|
||||
{
|
||||
PingLocation location = default;
|
||||
NetPingLocation location = default;
|
||||
var age = Internal.GetLocalPingLocation( ref location );
|
||||
if ( age < 0 )
|
||||
return null;
|
||||
@@ -59,7 +112,7 @@ namespace Steamworks
|
||||
/// 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( PingLocation target )
|
||||
public static int EstimatePingTo( NetPingLocation target )
|
||||
{
|
||||
return Internal.EstimatePingTimeFromLocalHost( ref target );
|
||||
}
|
||||
@@ -70,10 +123,12 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static async Task WaitForPingDataAsync( float maxAgeInSeconds = 60 * 5 )
|
||||
{
|
||||
if ( Internal.CheckPingDataUpToDate( 60.0f ) )
|
||||
if ( Internal.CheckPingDataUpToDate( maxAgeInSeconds ) )
|
||||
return;
|
||||
|
||||
while ( Internal.IsPingMeasurementInProgress() )
|
||||
SteamRelayNetworkStatus_t status = default;
|
||||
|
||||
while ( Internal.GetRelayNetworkStatus( ref status ) != SteamNetworkingAvailability.Current )
|
||||
{
|
||||
await Task.Delay( 10 );
|
||||
}
|
||||
@@ -81,11 +136,6 @@ namespace Steamworks
|
||||
|
||||
public static long LocalTimestamp => Internal.GetLocalTimestamp();
|
||||
|
||||
public static void SetDebugOutputFunction(DebugOutputType eDetailLevel, IntPtr pfnFunc)
|
||||
{
|
||||
Internal.SetDebugOutputFunction(eDetailLevel, pfnFunc);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// [0 - 100] - Randomly discard N pct of packets
|
||||
@@ -123,12 +173,107 @@ namespace Steamworks
|
||||
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 GetConfigInt( NetConfig type, int value )
|
||||
internal unsafe static bool SetConfigInt( NetConfig type, int value )
|
||||
{
|
||||
int* ptr = &value;
|
||||
return Internal.SetConfigValue( type, NetScope.Global, 0, NetConfigType.Int32, (IntPtr)ptr );
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, NetConfigType.Int32, (IntPtr)ptr );
|
||||
}
|
||||
|
||||
internal unsafe static int GetConfigInt( NetConfig type )
|
||||
@@ -136,8 +281,8 @@ namespace Steamworks
|
||||
int value = 0;
|
||||
NetConfigType dtype = NetConfigType.Int32;
|
||||
int* ptr = &value;
|
||||
ulong size = sizeof( int );
|
||||
var result = Internal.GetConfigValue( type, NetScope.Global, 0, ref dtype, (IntPtr) ptr, ref size );
|
||||
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;
|
||||
|
||||
@@ -147,7 +292,7 @@ namespace Steamworks
|
||||
internal unsafe static bool SetConfigFloat( NetConfig type, float value )
|
||||
{
|
||||
float* ptr = &value;
|
||||
return Internal.SetConfigValue( type, NetScope.Global, 0, NetConfigType.Float, (IntPtr)ptr );
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, NetConfigType.Float, (IntPtr)ptr );
|
||||
}
|
||||
|
||||
internal unsafe static float GetConfigFloat( NetConfig type )
|
||||
@@ -155,8 +300,8 @@ namespace Steamworks
|
||||
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 );
|
||||
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;
|
||||
|
||||
@@ -169,7 +314,7 @@ namespace Steamworks
|
||||
|
||||
fixed ( byte* ptr = bytes )
|
||||
{
|
||||
return Internal.SetConfigValue( type, NetScope.Global, 0, NetConfigType.String, (IntPtr)ptr );
|
||||
return Internal.SetConfigValue( type, NetConfigScope.Global, IntPtr.Zero, NetConfigType.String, (IntPtr)ptr );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -216,6 +361,6 @@ namespace Steamworks
|
||||
}
|
||||
}*/
|
||||
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,32 +10,19 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public static class SteamParental
|
||||
public class SteamParental : SteamSharedClass<SteamParental>
|
||||
{
|
||||
static ISteamParentalSettings _internal;
|
||||
internal static ISteamParentalSettings Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
SteamClient.ValidCheck();
|
||||
internal static ISteamParentalSettings Internal => Interface as ISteamParentalSettings;
|
||||
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamParentalSettings();
|
||||
_internal.Init();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
internal static void Shutdown()
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
_internal = null;
|
||||
SetInterface( server, new ISteamParentalSettings( server ) );
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
internal static void InstallEvents( bool server )
|
||||
{
|
||||
SteamParentalSettingsChanged_t.Install( x => OnSettingsChanged?.Invoke() );
|
||||
Dispatch.Install<SteamParentalSettingsChanged_t>( x => OnSettingsChanged?.Invoke(), server );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -7,31 +7,26 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public static class SteamParties
|
||||
/// <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>
|
||||
{
|
||||
static ISteamParties _internal;
|
||||
internal static ISteamParties Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamParties();
|
||||
_internal.Init();
|
||||
}
|
||||
internal static ISteamParties Internal => Interface as ISteamParties;
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
internal static void Shutdown()
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
_internal = null;
|
||||
SetInterface( server, new ISteamParties( server ) );
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
internal void InstallEvents( bool server )
|
||||
{
|
||||
AvailableBeaconLocationsUpdated_t.Install( x => OnBeaconLocationsUpdated?.Invoke() );
|
||||
ActiveBeaconsUpdated_t.Install( x => OnActiveBeaconsUpdated?.Invoke() );
|
||||
Dispatch.Install<AvailableBeaconLocationsUpdated_t>( x => OnBeaconLocationsUpdated?.Invoke(), server );
|
||||
Dispatch.Install<ActiveBeaconsUpdated_t>( x => OnActiveBeaconsUpdated?.Invoke(), server );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -60,18 +55,5 @@ namespace Steamworks
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new party beacon and activate it in the selected location.
|
||||
/// When people begin responding to your beacon, Steam will send you
|
||||
/// OnPartyReservation callbacks to let you know who is on the way.
|
||||
/// </summary>
|
||||
//public async Task<PartyBeacon?> CreateBeacon( int slots, string connectString, string meta )
|
||||
//{
|
||||
// var result = await Internal.CreateBeacon( (uint)slots, null, connectString, meta );
|
||||
// if ( !result.HasValue ) return null;
|
||||
//}
|
||||
|
||||
// TODO - is this useful to anyone, or is it a load of shit?
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
namespace 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 );
|
||||
}
|
||||
}
|
||||
@@ -10,27 +10,15 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public static class SteamRemoteStorage
|
||||
public class SteamRemoteStorage : SteamClientClass<SteamRemoteStorage>
|
||||
{
|
||||
static ISteamRemoteStorage _internal;
|
||||
internal static ISteamRemoteStorage Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamRemoteStorage();
|
||||
_internal.Init();
|
||||
}
|
||||
internal static ISteamRemoteStorage Internal => Interface as ISteamRemoteStorage;
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Shutdown()
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
_internal = null;
|
||||
SetInterface( server, new ISteamRemoteStorage( server ) );
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new file, writes the bytes to the file, and then closes the file.
|
||||
|
||||
@@ -10,33 +10,20 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Undocumented Parental Settings
|
||||
/// </summary>
|
||||
public static class SteamScreenshots
|
||||
public class SteamScreenshots : SteamClientClass<SteamScreenshots>
|
||||
{
|
||||
static ISteamScreenshots _internal;
|
||||
internal static ISteamScreenshots Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
SteamClient.ValidCheck();
|
||||
internal static ISteamScreenshots Internal => Interface as ISteamScreenshots;
|
||||
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamScreenshots();
|
||||
_internal.Init();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
internal static void Shutdown()
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
_internal = null;
|
||||
SetInterface( server, new ISteamScreenshots( server ) );
|
||||
InstallEvents();
|
||||
}
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
ScreenshotRequested_t.Install( x => OnScreenshotRequested?.Invoke() );
|
||||
ScreenshotReady_t.Install( x =>
|
||||
Dispatch.Install<ScreenshotRequested_t>( x => OnScreenshotRequested?.Invoke() );
|
||||
Dispatch.Install<ScreenshotReady_t>( x =>
|
||||
{
|
||||
if ( x.Result != Result.OK )
|
||||
OnScreenshotFailed?.Invoke( x.Result );
|
||||
@@ -47,7 +34,7 @@ namespace Steamworks
|
||||
|
||||
/// <summary>
|
||||
/// A screenshot has been requested by the user from the Steam screenshot hotkey.
|
||||
/// This will only be called if HookScreenshots has been enabled, in which case Steam
|
||||
/// 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;
|
||||
|
||||
@@ -10,40 +10,25 @@ namespace Steamworks
|
||||
/// <summary>
|
||||
/// Provides the core of the Steam Game Servers API
|
||||
/// </summary>
|
||||
public static partial class SteamServer
|
||||
public partial class SteamServer : SteamServerClass<SteamServer>
|
||||
{
|
||||
static bool initialized;
|
||||
internal static ISteamGameServer Internal => Interface as ISteamGameServer;
|
||||
|
||||
static ISteamGameServer _internal;
|
||||
internal static ISteamGameServer Internal
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamGameServer( );
|
||||
_internal.InitServer();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
SetInterface( server, new ISteamGameServer( server ) );
|
||||
InstallEvents();
|
||||
}
|
||||
|
||||
public static bool IsValid => initialized;
|
||||
|
||||
|
||||
public static Action<Exception> OnCallbackException;
|
||||
public static bool IsValid => Internal != null && Internal.IsValid;
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
SteamInventory.InstallEvents();
|
||||
SteamNetworkingSockets.InstallEvents(true);
|
||||
SteamUGC.InstallEvents(true);
|
||||
|
||||
ValidateAuthTicketResponse_t.Install( x => OnValidateAuthTicketResponse?.Invoke( x.SteamID, x.OwnerSteamID, x.AuthSessionResponse ), true );
|
||||
SteamServersConnected_t.Install( x => OnSteamServersConnected?.Invoke(), true );
|
||||
SteamServerConnectFailure_t.Install( x => OnSteamServerConnectFailure?.Invoke( x.Result, x.StillRetrying ), true );
|
||||
SteamServersDisconnected_t.Install( x => OnSteamServersDisconnected?.Invoke( x.Result ), true );
|
||||
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>
|
||||
@@ -67,6 +52,11 @@ namespace Steamworks
|
||||
/// </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.
|
||||
@@ -74,6 +64,9 @@ namespace Steamworks
|
||||
/// </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 )
|
||||
@@ -94,7 +87,24 @@ namespace Steamworks
|
||||
throw new System.Exception( $"InitGameServer returned false ({ipaddress},{init.SteamPort},{init.GamePort},{init.QueryPort},{secure},\"{init.VersionString}\")" );
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
//
|
||||
// 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
|
||||
@@ -108,73 +118,52 @@ namespace Steamworks
|
||||
Passworded = false;
|
||||
DedicatedServer = init.DedicatedServer;
|
||||
|
||||
InstallEvents();
|
||||
|
||||
if ( asyncCallbacks )
|
||||
{
|
||||
RunCallbacksAsync();
|
||||
//
|
||||
// This will keep looping in the background every 16 ms
|
||||
// until we shut down.
|
||||
//
|
||||
Dispatch.LoopServerAsync();
|
||||
}
|
||||
}
|
||||
|
||||
static List<SteamInterface> openIterfaces = new List<SteamInterface>();
|
||||
|
||||
internal static void WatchInterface( SteamInterface steamInterface )
|
||||
internal static void AddInterface<T>() where T : SteamClass, new()
|
||||
{
|
||||
if ( openIterfaces.Contains( steamInterface ) )
|
||||
throw new System.Exception( "openIterfaces already contains interface!" );
|
||||
|
||||
openIterfaces.Add( steamInterface );
|
||||
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 openIterfaces )
|
||||
foreach ( var e in openInterfaces )
|
||||
{
|
||||
e.Shutdown();
|
||||
e.DestroyInterface( true );
|
||||
}
|
||||
|
||||
openIterfaces.Clear();
|
||||
openInterfaces.Clear();
|
||||
}
|
||||
|
||||
public static void Shutdown()
|
||||
{
|
||||
Event.DisposeAllServer();
|
||||
|
||||
initialized = false;
|
||||
|
||||
_internal = null;
|
||||
Dispatch.ShutdownServer();
|
||||
|
||||
ShutdownInterfaces();
|
||||
SteamNetworkingUtils.Shutdown();
|
||||
SteamNetworkingSockets.Shutdown();
|
||||
SteamInventory.Shutdown();
|
||||
|
||||
SteamGameServer.Shutdown();
|
||||
}
|
||||
|
||||
internal static async void RunCallbacksAsync()
|
||||
{
|
||||
while ( IsValid )
|
||||
{
|
||||
try
|
||||
{
|
||||
RunCallbacks();
|
||||
}
|
||||
catch ( System.Exception e )
|
||||
{
|
||||
OnCallbackException?.Invoke( e );
|
||||
}
|
||||
|
||||
await Task.Delay( 16 );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Run the callbacks. This is also called in Async callbacks.
|
||||
/// </summary>
|
||||
public static void RunCallbacks()
|
||||
{
|
||||
SteamGameServer.RunCallbacks();
|
||||
if ( Dispatch.ServerPipe != 0 )
|
||||
{
|
||||
Dispatch.Frame( Dispatch.ServerPipe );
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -286,6 +275,8 @@ namespace Steamworks
|
||||
}
|
||||
private static string _gametags = "";
|
||||
|
||||
public static SteamId SteamId => Internal.GetSteamID();
|
||||
|
||||
/// <summary>
|
||||
/// Log onto Steam anonymously.
|
||||
/// </summary>
|
||||
@@ -314,16 +305,7 @@ namespace Steamworks
|
||||
/// 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
|
||||
{
|
||||
get
|
||||
{
|
||||
var ip = Internal.GetPublicIP();
|
||||
if ( ip == 0 ) return null;
|
||||
|
||||
return Utility.Int32ToIp( ip );
|
||||
}
|
||||
}
|
||||
public static System.Net.IPAddress PublicIp => Internal.GetPublicIP();
|
||||
|
||||
/// <summary>
|
||||
/// Enable or disable heartbeats, which are sent regularly to the master server.
|
||||
@@ -462,6 +444,14 @@ namespace Steamworks
|
||||
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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,34 +7,22 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public static class SteamServerStats
|
||||
public class SteamServerStats : SteamServerClass<SteamServerStats>
|
||||
{
|
||||
static ISteamGameServerStats _internal;
|
||||
internal static ISteamGameServerStats Internal
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamGameServerStats();
|
||||
_internal.InitServer();
|
||||
}
|
||||
internal static ISteamGameServerStats Internal => Interface as ISteamGameServerStats;
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Shutdown()
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
_internal = null;
|
||||
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> RequestUserStats( SteamId steamid )
|
||||
public static async Task<Result> RequestUserStatsAsync( SteamId steamid )
|
||||
{
|
||||
var r = await Internal.RequestUserStats( steamid );
|
||||
if ( !r.HasValue ) return Result.Fail;
|
||||
@@ -47,7 +35,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static bool SetInt( SteamId steamid, string name, int stat )
|
||||
{
|
||||
return Internal.SetUserStat1( steamid, name, stat );
|
||||
return Internal.SetUserStat( steamid, name, stat );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -56,7 +44,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static bool SetFloat( SteamId steamid, string name, float stat )
|
||||
{
|
||||
return Internal.SetUserStat2( steamid, name, stat );
|
||||
return Internal.SetUserStat( steamid, name, stat );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -68,7 +56,7 @@ namespace Steamworks
|
||||
{
|
||||
int data = defaultValue;
|
||||
|
||||
if ( !Internal.GetUserStat1( steamid, name, ref data ) )
|
||||
if ( !Internal.GetUserStat( steamid, name, ref data ) )
|
||||
return defaultValue;
|
||||
|
||||
return data;
|
||||
@@ -83,7 +71,7 @@ namespace Steamworks
|
||||
{
|
||||
float data = defaultValue;
|
||||
|
||||
if ( !Internal.GetUserStat2( steamid, name, ref data ) )
|
||||
if ( !Internal.GetUserStat( steamid, name, ref data ) )
|
||||
return defaultValue;
|
||||
|
||||
return data;
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Steamworks.Data;
|
||||
|
||||
@@ -12,42 +13,37 @@ namespace Steamworks
|
||||
/// Functions for accessing and manipulating Steam user information.
|
||||
/// This is also where the APIs for Steam Voice are exposed.
|
||||
/// </summary>
|
||||
public static class SteamUGC
|
||||
public class SteamUGC : SteamSharedClass<SteamUGC>
|
||||
{
|
||||
static ISteamUGC _internal;
|
||||
internal static ISteamUGC Internal
|
||||
internal static ISteamUGC Internal => Interface as ISteamUGC;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
get
|
||||
SetInterface( server, new ISteamUGC( server ) );
|
||||
InstallEvents( server );
|
||||
}
|
||||
|
||||
internal static void InstallEvents( bool server )
|
||||
{
|
||||
Dispatch.Install<DownloadItemResult_t>( x => OnDownloadItemResult?.Invoke( x.Result ), server );
|
||||
Dispatch.Install<ItemInstalled_t>(x =>
|
||||
{
|
||||
if ( _internal == null )
|
||||
if (x.AppID == SteamClient.AppId)
|
||||
{
|
||||
_internal = new ISteamUGC();
|
||||
_internal.Init();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Shutdown()
|
||||
{
|
||||
_internal = null;
|
||||
}
|
||||
|
||||
internal static void InstallEvents(bool server=false)
|
||||
{
|
||||
ItemInstalled_t.Install(x => {
|
||||
if (x.AppID == SteamClient.AppId)
|
||||
{
|
||||
GlobalOnItemInstalled?.Invoke(x.PublishedFileId);
|
||||
if (onItemInstalled?.ContainsKey(x.PublishedFileId) ?? false)
|
||||
{
|
||||
onItemInstalled[x.PublishedFileId]?.Invoke();
|
||||
onItemInstalled.Remove(x.PublishedFileId);
|
||||
}
|
||||
}
|
||||
}, server);
|
||||
}
|
||||
if (onItemInstalled?.ContainsKey(x.PublishedFileId) ?? false)
|
||||
{
|
||||
onItemInstalled[x.PublishedFileId]?.Invoke();
|
||||
onItemInstalled.Remove(x.PublishedFileId);
|
||||
}
|
||||
}
|
||||
}, server);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Posted after Download call
|
||||
/// </summary>
|
||||
public static event Action<Result> OnDownloadItemResult;
|
||||
|
||||
public static async Task<bool> DeleteFileAsync( PublishedFileId fileId )
|
||||
{
|
||||
@@ -55,6 +51,12 @@ namespace Steamworks
|
||||
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, Action onInstalled = null, bool highPriority = false )
|
||||
{
|
||||
if (onInstalled != null)
|
||||
@@ -72,6 +74,80 @@ namespace Steamworks
|
||||
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, null, 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.
|
||||
@@ -92,10 +168,29 @@ namespace Steamworks
|
||||
return item;
|
||||
}
|
||||
|
||||
private static Dictionary<PublishedFileId, Action> onItemInstalled;
|
||||
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;
|
||||
}
|
||||
|
||||
private static Dictionary<PublishedFileId, Action> onItemInstalled;
|
||||
|
||||
public static event Action<ulong> GlobalOnItemInstalled;
|
||||
|
||||
public static uint NumSubscribedItems { get { return Internal.GetNumSubscribedItems(); } }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,46 +13,33 @@ namespace Steamworks
|
||||
/// Functions for accessing and manipulating Steam user information.
|
||||
/// This is also where the APIs for Steam Voice are exposed.
|
||||
/// </summary>
|
||||
public static class SteamUser
|
||||
public class SteamUser : SteamClientClass<SteamUser>
|
||||
{
|
||||
static ISteamUser _internal;
|
||||
internal static ISteamUser Internal
|
||||
internal static ISteamUser Internal => Interface as ISteamUser;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
get
|
||||
{
|
||||
SteamClient.ValidCheck();
|
||||
SetInterface( server, new ISteamUser( server ) );
|
||||
InstallEvents();
|
||||
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamUser();
|
||||
_internal.Init();
|
||||
|
||||
richPresence = new Dictionary<string, string>();
|
||||
|
||||
SampleRate = OptimalSampleRate;
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
internal static void Shutdown()
|
||||
{
|
||||
_internal = null;
|
||||
richPresence = new Dictionary<string, string>();
|
||||
SampleRate = OptimalSampleRate;
|
||||
}
|
||||
|
||||
static Dictionary<string, string> richPresence;
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
SteamServersConnected_t.Install( x => OnSteamServersConnected?.Invoke() );
|
||||
SteamServerConnectFailure_t.Install( x => OnSteamServerConnectFailure?.Invoke() );
|
||||
SteamServersDisconnected_t.Install( x => OnSteamServersDisconnected?.Invoke() );
|
||||
ClientGameServerDeny_t.Install( x => OnClientGameServerDeny?.Invoke() );
|
||||
LicensesUpdated_t.Install( x => OnLicensesUpdated?.Invoke() );
|
||||
ValidateAuthTicketResponse_t.Install( x => OnValidateAuthTicketResponse?.Invoke( x.SteamID, x.OwnerSteamID, x.AuthSessionResponse ) );
|
||||
MicroTxnAuthorizationResponse_t.Install( x => OnMicroTxnAuthorizationResponse?.Invoke( x.AppID, x.OrderID, x.Authorized != 0 ) );
|
||||
GameWebCallback_t.Install( x => OnGameWebCallback?.Invoke( x.URLUTF8() ) );
|
||||
GetAuthSessionTicketResponse_t.Install( x => OnGetAuthSessionTicketResponse?.Invoke( x ) );
|
||||
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>
|
||||
@@ -109,12 +96,20 @@ namespace Steamworks
|
||||
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.
|
||||
/// Sent to your game in response to a steam://gamewebcallback/(appid)/command/stuff 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;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -266,6 +261,9 @@ namespace Steamworks
|
||||
return (int)szWritten;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lazy version
|
||||
/// </summary>
|
||||
public static unsafe int DecompressVoice( byte[] from, System.IO.Stream output )
|
||||
{
|
||||
var to = Helpers.TakeBuffer( 1024 * 64 );
|
||||
@@ -289,6 +287,22 @@ namespace Steamworks
|
||||
return (int)szWritten;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Advanced and potentially fastest version - incase you know what you're doing
|
||||
/// </summary>
|
||||
public static unsafe int DecompressVoice( IntPtr from, int length, IntPtr to, int bufferSize )
|
||||
{
|
||||
if ( length <= 0 ) throw new ArgumentException( $"length should be > 0 " );
|
||||
if ( bufferSize <= 0 ) throw new ArgumentException( $"bufferSize should be > 0 " );
|
||||
|
||||
uint szWritten = 0;
|
||||
|
||||
if ( Internal.DecompressVoice( from, (uint) length, to, (uint)bufferSize, ref szWritten, SampleRate ) != VoiceResult.OK )
|
||||
return 0;
|
||||
|
||||
return (int)szWritten;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve a authentication ticket to be sent to the entity who wishes to authenticate you.
|
||||
/// </summary>
|
||||
@@ -324,11 +338,11 @@ namespace Steamworks
|
||||
AuthTicket ticket = null;
|
||||
var stopwatch = Stopwatch.StartNew();
|
||||
|
||||
Action<GetAuthSessionTicketResponse_t> f = ( t ) =>
|
||||
void f( GetAuthSessionTicketResponse_t t )
|
||||
{
|
||||
if ( t.AuthTicket != ticket.Handle ) return;
|
||||
result = t.Result;
|
||||
};
|
||||
}
|
||||
|
||||
OnGetAuthSessionTicketResponse += f;
|
||||
|
||||
@@ -424,6 +438,7 @@ namespace Steamworks
|
||||
/// 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 )
|
||||
@@ -483,5 +498,16 @@ namespace Steamworks
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <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 };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,36 +7,22 @@ using Steamworks.Data;
|
||||
|
||||
namespace Steamworks
|
||||
{
|
||||
public static class SteamUserStats
|
||||
public class SteamUserStats : SteamClientClass<SteamUserStats>
|
||||
{
|
||||
static ISteamUserStats _internal;
|
||||
internal static ISteamUserStats Internal
|
||||
internal static ISteamUserStats Internal => Interface as ISteamUserStats;
|
||||
|
||||
internal override void InitializeInterface( bool server )
|
||||
{
|
||||
get
|
||||
{
|
||||
SteamClient.ValidCheck();
|
||||
|
||||
if ( _internal == null )
|
||||
{
|
||||
_internal = new ISteamUserStats();
|
||||
_internal.Init();
|
||||
|
||||
RequestCurrentStats();
|
||||
}
|
||||
|
||||
return _internal;
|
||||
}
|
||||
}
|
||||
internal static void Shutdown()
|
||||
{
|
||||
_internal = null;
|
||||
SetInterface( server, new ISteamUserStats( server ) );
|
||||
InstallEvents();
|
||||
RequestCurrentStats();
|
||||
}
|
||||
|
||||
public static bool StatsRecieved { get; internal set; }
|
||||
|
||||
internal static void InstallEvents()
|
||||
{
|
||||
UserStatsReceived_t.Install( x =>
|
||||
Dispatch.Install<UserStatsReceived_t>( x =>
|
||||
{
|
||||
if ( x.SteamIDUser == SteamClient.SteamId )
|
||||
StatsRecieved = true;
|
||||
@@ -44,10 +30,10 @@ namespace Steamworks
|
||||
OnUserStatsReceived?.Invoke( x.SteamIDUser, x.Result );
|
||||
} );
|
||||
|
||||
UserStatsStored_t.Install( x => OnUserStatsStored?.Invoke( x.Result ) );
|
||||
UserAchievementStored_t.Install( x => OnAchievementProgress?.Invoke( new Achievement( x.AchievementNameUTF8() ), (int) x.CurProgress, (int)x.MaxProgress ) );
|
||||
UserStatsUnloaded_t.Install( x => OnUserStatsUnloaded?.Invoke( x.SteamIDUser ) );
|
||||
UserAchievementIconFetched_t.Install( x => OnAchievementIconFetched?.Invoke( x.AchievementNameUTF8(), x.IconHandle ) );
|
||||
Dispatch.Install<UserStatsStored_t>( x => OnUserStatsStored?.Invoke( x.Result ) );
|
||||
Dispatch.Install<UserAchievementStored_t>( x => OnAchievementProgress?.Invoke( new Achievement( x.AchievementNameUTF8() ), (int) x.CurProgress, (int)x.MaxProgress ) );
|
||||
Dispatch.Install<UserStatsUnloaded_t>( x => OnUserStatsUnloaded?.Invoke( x.SteamIDUser ) );
|
||||
Dispatch.Install<UserAchievementIconFetched_t>( x => OnAchievementIconFetched?.Invoke( x.AchievementNameUTF8(), x.IconHandle ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -150,6 +136,22 @@ namespace Steamworks
|
||||
return Internal.RequestCurrentStats();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Asynchronously fetches global stats data, which is available for stats marked as
|
||||
/// "aggregated" in the App Admin panel of the Steamworks website.
|
||||
/// You must have called RequestCurrentStats and it needs to return successfully via
|
||||
/// its callback prior to calling this.
|
||||
/// </summary>
|
||||
/// <param name="days">How many days of day-by-day history to retrieve in addition to the overall totals. The limit is 60.</param>
|
||||
/// <returns>OK indicates success, InvalidState means you need to call RequestCurrentStats first, Fail means the remote call failed</returns>
|
||||
public static async Task<Result> RequestGlobalStatsAsync( int days )
|
||||
{
|
||||
var result = await SteamUserStats.Internal.RequestGlobalStats( days );
|
||||
if ( !result.HasValue ) return Result.Fail;
|
||||
return result.Value.Result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets a leaderboard by name, it will create it if it's not yet created.
|
||||
/// Leaderboards created with this function will not automatically show up in the Steam Community.
|
||||
@@ -209,7 +211,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static bool SetStat( string name, int value )
|
||||
{
|
||||
return Internal.SetStat1( name, value );
|
||||
return Internal.SetStat( name, value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -218,7 +220,7 @@ namespace Steamworks
|
||||
/// </summary>
|
||||
public static bool SetStat( string name, float value )
|
||||
{
|
||||
return Internal.SetStat2( name, value );
|
||||
return Internal.SetStat( name, value );
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -227,7 +229,7 @@ namespace Steamworks
|
||||
public static int GetStatInt( string name )
|
||||
{
|
||||
int data = 0;
|
||||
Internal.GetStat1( name, ref data );
|
||||
Internal.GetStat( name, ref data );
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -237,7 +239,7 @@ namespace Steamworks
|
||||
public static float GetStatFloat( string name )
|
||||
{
|
||||
float data = 0;
|
||||
Internal.GetStat2( name, ref data );
|
||||
Internal.GetStat( name, ref data );
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user