38f1ddb...178a853: v0.8.9.1, removed content folder

This commit is contained in:
Joonas Rikkonen
2019-03-18 19:46:58 +02:00
parent 38f1ddb6fe
commit 6c0679c297
1054 changed files with 151673 additions and 144931 deletions
@@ -0,0 +1,198 @@
using System;
using System.Runtime.InteropServices;
using Facepunch.Steamworks;
namespace SteamNative
{
[StructLayout( LayoutKind.Sequential )]
internal class Callback
{
internal enum Flags : byte
{
Registered = 0x01,
GameServer = 0x02
}
public IntPtr vTablePtr;
public byte CallbackFlags;
public int CallbackId;
[StructLayout( LayoutKind.Sequential, Pack = 1 )]
public class VTable
{
[UnmanagedFunctionPointer( CallingConvention.StdCall )] public delegate void ResultD( IntPtr pvParam );
[UnmanagedFunctionPointer( CallingConvention.StdCall )] public delegate void ResultWithInfoD( IntPtr pvParam, bool bIOFailure, SteamNative.SteamAPICall_t hSteamAPICall );
[UnmanagedFunctionPointer( CallingConvention.StdCall )] public delegate int GetSizeD();
public ResultD ResultA;
public ResultWithInfoD ResultB;
public GetSizeD GetSize;
}
[StructLayout( LayoutKind.Sequential, Pack = 1 )]
public class VTableWin
{
[UnmanagedFunctionPointer( CallingConvention.StdCall )] public delegate void ResultD( IntPtr pvParam );
[UnmanagedFunctionPointer( CallingConvention.StdCall )] public delegate void ResultWithInfoD( IntPtr pvParam, bool bIOFailure, SteamNative.SteamAPICall_t hSteamAPICall );
[UnmanagedFunctionPointer( CallingConvention.StdCall )] public delegate int GetSizeD();
public ResultWithInfoD ResultB;
public ResultD ResultA;
public GetSizeD GetSize;
}
[StructLayout( LayoutKind.Sequential, Pack = 1 )]
public class VTableThis
{
[UnmanagedFunctionPointer( CallingConvention.ThisCall )] public delegate void ResultD( IntPtr thisptr, IntPtr pvParam );
[UnmanagedFunctionPointer( CallingConvention.ThisCall )] public delegate void ResultWithInfoD( IntPtr thisptr, IntPtr pvParam, bool bIOFailure, SteamNative.SteamAPICall_t hSteamAPICall );
[UnmanagedFunctionPointer( CallingConvention.ThisCall )] public delegate int GetSizeD( IntPtr thisptr );
public ResultD ResultA;
public ResultWithInfoD ResultB;
public GetSizeD GetSize;
}
[StructLayout( LayoutKind.Sequential, Pack = 1 )]
public class VTableWinThis
{
[UnmanagedFunctionPointer( CallingConvention.ThisCall )] public delegate void ResultD( IntPtr thisptr, IntPtr pvParam );
[UnmanagedFunctionPointer( CallingConvention.ThisCall )] public delegate void ResultWithInfoD( IntPtr thisptr, IntPtr pvParam, bool bIOFailure, SteamNative.SteamAPICall_t hSteamAPICall );
[UnmanagedFunctionPointer( CallingConvention.ThisCall )] public delegate int GetSizeD( IntPtr thisptr );
public ResultWithInfoD ResultB;
public ResultD ResultA;
public GetSizeD GetSize;
}
};
//
// Created on registration of a callback
//
internal class CallbackHandle : IDisposable
{
internal BaseSteamworks Steamworks;
// Get Rid
internal GCHandle FuncA;
internal GCHandle FuncB;
internal GCHandle FuncC;
internal IntPtr vTablePtr;
internal GCHandle PinnedCallback;
internal CallbackHandle( Facepunch.Steamworks.BaseSteamworks steamworks )
{
Steamworks = steamworks;
}
public void Dispose()
{
UnregisterCallback();
if ( FuncA.IsAllocated )
FuncA.Free();
if ( FuncB.IsAllocated )
FuncB.Free();
if ( FuncC.IsAllocated )
FuncC.Free();
if ( PinnedCallback.IsAllocated )
PinnedCallback.Free();
if ( vTablePtr != IntPtr.Zero )
{
Marshal.FreeHGlobal( vTablePtr );
vTablePtr = IntPtr.Zero;
}
}
private void UnregisterCallback()
{
if ( !PinnedCallback.IsAllocated )
return;
Steamworks.native.api.SteamAPI_UnregisterCallback( PinnedCallback.AddrOfPinnedObject() );
}
public virtual bool IsValid { get { return true; } }
}
internal abstract class CallResult : CallbackHandle
{
internal SteamAPICall_t Call;
public override bool IsValid { get { return Call > 0; } }
internal CallResult( Facepunch.Steamworks.BaseSteamworks steamworks, SteamAPICall_t call ) : base( steamworks )
{
Call = call;
}
internal void Try()
{
bool failed = false;
if ( !Steamworks.native.utils.IsAPICallCompleted( Call, ref failed ))
return;
Steamworks.UnregisterCallResult( this );
RunCallback();
}
internal abstract void RunCallback();
}
internal class CallResult<T> : CallResult
{
private static byte[] resultBuffer = new byte[1024 * 16];
internal delegate T ConvertFromPointer( IntPtr p );
Action<T, bool> CallbackFunction;
ConvertFromPointer ConvertFromPointerFunction;
internal int ResultSize = -1;
internal int CallbackId = 0;
internal CallResult( Facepunch.Steamworks.BaseSteamworks steamworks, SteamAPICall_t call, Action<T, bool> callbackFunction, ConvertFromPointer fromPointer, int resultSize, int callbackId ) : base( steamworks, call )
{
ResultSize = resultSize;
CallbackId = callbackId;
CallbackFunction = callbackFunction;
ConvertFromPointerFunction = fromPointer;
Steamworks.RegisterCallResult( this );
}
public override string ToString()
{
return $"CallResult( {typeof(T).Name}, {CallbackId}, {ResultSize}b )";
}
unsafe internal override void RunCallback()
{
bool failed = false;
fixed ( byte* ptr = resultBuffer )
{
if ( !Steamworks.native.utils.GetAPICallResult( Call, (IntPtr)ptr, resultBuffer.Length, CallbackId, ref failed ) || failed )
{
CallbackFunction( default(T), true );
return;
}
var val = ConvertFromPointerFunction( (IntPtr)ptr );
CallbackFunction( val, false );
}
}
}
internal class MonoPInvokeCallbackAttribute : Attribute
{
public MonoPInvokeCallbackAttribute() { }
}
}
@@ -0,0 +1,88 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
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 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;
}
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 = "SteamController006";
internal const string STEAMFRIENDS_INTERFACE_VERSION = "SteamFriends015";
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_004";
internal const string STEAMHTTP_INTERFACE_VERSION = "STEAMHTTP_INTERFACE_VERSION002";
internal const string STEAMINVENTORY_INTERFACE_VERSION = "STEAMINVENTORY_INTERFACE_V002";
internal const string STEAMMATCHMAKING_INTERFACE_VERSION = "SteamMatchMaking009";
internal const string STEAMMATCHMAKINGSERVERS_INTERFACE_VERSION = "SteamMatchMakingServers002";
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 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_VERSION010";
internal const string STEAMUSER_INTERFACE_VERSION = "SteamUser019";
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";
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,40 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Collections.Generic;
namespace SteamNative
{
internal static class Helpers
{
private static StringBuilder[] StringBuilderPool;
private static int StringBuilderPoolIndex;
/// <summary>
/// Returns a StringBuilder. This will get returned and reused later on.
/// </summary>
public static StringBuilder TakeStringBuilder()
{
if ( StringBuilderPool == null )
{
//
// The pool has 8 items. This should be safe because we shouldn't really
// ever be using more than 2 StringBuilders at the same time.
//
StringBuilderPool = new StringBuilder[8];
for ( int i = 0; i < StringBuilderPool.Length; i++ )
StringBuilderPool[i] = new StringBuilder( 4096 );
}
StringBuilderPoolIndex++;
if ( StringBuilderPoolIndex >= StringBuilderPool.Length )
StringBuilderPoolIndex = 0;
StringBuilderPool[StringBuilderPoolIndex].Capacity = 4096;
StringBuilderPool[StringBuilderPoolIndex].Length = 0;
return StringBuilderPool[StringBuilderPoolIndex];
}
}
}
@@ -0,0 +1,717 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal static partial class Platform
{
internal interface Interface : IDisposable
{
// Implementation should return true if _ptr is non null
bool IsValid { get; }
uint /*uint32*/ ISteamAppList_GetNumInstalledApps();
uint /*uint32*/ ISteamAppList_GetInstalledApps( IntPtr /*AppId_t **/ pvecAppID, uint /*uint32*/ unMaxAppIDs );
int /*int*/ ISteamAppList_GetAppName( uint nAppID, System.Text.StringBuilder /*char **/ pchName, int /*int*/ cchNameMax );
int /*int*/ ISteamAppList_GetAppInstallDir( uint nAppID, System.Text.StringBuilder /*char **/ pchDirectory, int /*int*/ cchNameMax );
int /*int*/ ISteamAppList_GetAppBuildId( uint nAppID );
bool /*bool*/ ISteamApps_BIsSubscribed();
bool /*bool*/ ISteamApps_BIsLowViolence();
bool /*bool*/ ISteamApps_BIsCybercafe();
bool /*bool*/ ISteamApps_BIsVACBanned();
IntPtr ISteamApps_GetCurrentGameLanguage();
IntPtr ISteamApps_GetAvailableGameLanguages();
bool /*bool*/ ISteamApps_BIsSubscribedApp( uint appID );
bool /*bool*/ ISteamApps_BIsDlcInstalled( uint appID );
uint /*uint32*/ ISteamApps_GetEarliestPurchaseUnixTime( uint nAppID );
bool /*bool*/ ISteamApps_BIsSubscribedFromFreeWeekend();
int /*int*/ ISteamApps_GetDLCCount();
bool /*bool*/ ISteamApps_BGetDLCDataByIndex( int /*int*/ iDLC, ref uint pAppID, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbAvailable, System.Text.StringBuilder /*char **/ pchName, int /*int*/ cchNameBufferSize );
void /*void*/ ISteamApps_InstallDLC( uint nAppID );
void /*void*/ ISteamApps_UninstallDLC( uint nAppID );
void /*void*/ ISteamApps_RequestAppProofOfPurchaseKey( uint nAppID );
bool /*bool*/ ISteamApps_GetCurrentBetaName( System.Text.StringBuilder /*char **/ pchName, int /*int*/ cchNameBufferSize );
bool /*bool*/ ISteamApps_MarkContentCorrupt( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bMissingFilesOnly );
uint /*uint32*/ ISteamApps_GetInstalledDepots( uint appID, IntPtr /*DepotId_t **/ pvecDepots, uint /*uint32*/ cMaxDepots );
uint /*uint32*/ ISteamApps_GetAppInstallDir( uint appID, System.Text.StringBuilder /*char **/ pchFolder, uint /*uint32*/ cchFolderBufferSize );
bool /*bool*/ ISteamApps_BIsAppInstalled( uint appID );
CSteamID /*(class CSteamID)*/ ISteamApps_GetAppOwner();
IntPtr ISteamApps_GetLaunchQueryParam( string /*const char **/ pchKey );
bool /*bool*/ ISteamApps_GetDlcDownloadProgress( uint nAppID, out ulong /*uint64 **/ punBytesDownloaded, out ulong /*uint64 **/ punBytesTotal );
int /*int*/ ISteamApps_GetAppBuildId();
void /*void*/ ISteamApps_RequestAllProofOfPurchaseKeys();
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamApps_GetFileDetails( string /*const char **/ pszFileName );
HSteamPipe /*(HSteamPipe)*/ ISteamClient_CreateSteamPipe();
bool /*bool*/ ISteamClient_BReleaseSteamPipe( int hSteamPipe );
HSteamUser /*(HSteamUser)*/ ISteamClient_ConnectToGlobalUser( int hSteamPipe );
HSteamUser /*(HSteamUser)*/ ISteamClient_CreateLocalUser( out int phSteamPipe, AccountType /*EAccountType*/ eAccountType );
void /*void*/ ISteamClient_ReleaseUser( int hSteamPipe, int hUser );
IntPtr /*class ISteamUser **/ ISteamClient_GetISteamUser( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamGameServer **/ ISteamClient_GetISteamGameServer( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
void /*void*/ ISteamClient_SetLocalIPBinding( uint /*uint32*/ unIP, ushort /*uint16*/ usPort );
IntPtr /*class ISteamFriends **/ ISteamClient_GetISteamFriends( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamUtils **/ ISteamClient_GetISteamUtils( int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamMatchmaking **/ ISteamClient_GetISteamMatchmaking( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamMatchmakingServers **/ ISteamClient_GetISteamMatchmakingServers( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*void **/ ISteamClient_GetISteamGenericInterface( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamUserStats **/ ISteamClient_GetISteamUserStats( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamGameServerStats **/ ISteamClient_GetISteamGameServerStats( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamApps **/ ISteamClient_GetISteamApps( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamNetworking **/ ISteamClient_GetISteamNetworking( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamRemoteStorage **/ ISteamClient_GetISteamRemoteStorage( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamScreenshots **/ ISteamClient_GetISteamScreenshots( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion );
uint /*uint32*/ ISteamClient_GetIPCCallCount();
void /*void*/ ISteamClient_SetWarningMessageHook( IntPtr /*SteamAPIWarningMessageHook_t*/ pFunction );
bool /*bool*/ ISteamClient_BShutdownIfAllPipesClosed();
IntPtr /*class ISteamHTTP **/ ISteamClient_GetISteamHTTP( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamController **/ ISteamClient_GetISteamController( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamUGC **/ ISteamClient_GetISteamUGC( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamAppList **/ ISteamClient_GetISteamAppList( int hSteamUser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamMusic **/ ISteamClient_GetISteamMusic( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamMusicRemote **/ ISteamClient_GetISteamMusicRemote( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamHTMLSurface **/ ISteamClient_GetISteamHTMLSurface( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamInventory **/ ISteamClient_GetISteamInventory( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamVideo **/ ISteamClient_GetISteamVideo( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion );
IntPtr /*class ISteamParentalSettings **/ ISteamClient_GetISteamParentalSettings( int hSteamuser, int hSteamPipe, string /*const char **/ pchVersion );
bool /*bool*/ ISteamController_Init();
bool /*bool*/ ISteamController_Shutdown();
void /*void*/ ISteamController_RunFrame();
int /*int*/ ISteamController_GetConnectedControllers( IntPtr /*ControllerHandle_t **/ handlesOut );
bool /*bool*/ ISteamController_ShowBindingPanel( ulong controllerHandle );
ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ ISteamController_GetActionSetHandle( string /*const char **/ pszActionSetName );
void /*void*/ ISteamController_ActivateActionSet( ulong controllerHandle, ulong actionSetHandle );
ControllerActionSetHandle_t /*(ControllerActionSetHandle_t)*/ ISteamController_GetCurrentActionSet( ulong controllerHandle );
void /*void*/ ISteamController_ActivateActionSetLayer( ulong controllerHandle, ulong actionSetLayerHandle );
void /*void*/ ISteamController_DeactivateActionSetLayer( ulong controllerHandle, ulong actionSetLayerHandle );
void /*void*/ ISteamController_DeactivateAllActionSetLayers( ulong controllerHandle );
int /*int*/ ISteamController_GetActiveActionSetLayers( ulong controllerHandle, IntPtr /*ControllerActionSetHandle_t **/ handlesOut );
ControllerDigitalActionHandle_t /*(ControllerDigitalActionHandle_t)*/ ISteamController_GetDigitalActionHandle( string /*const char **/ pszActionName );
ControllerDigitalActionData_t /*struct ControllerDigitalActionData_t*/ ISteamController_GetDigitalActionData( ulong controllerHandle, ulong digitalActionHandle );
int /*int*/ ISteamController_GetDigitalActionOrigins( ulong controllerHandle, ulong actionSetHandle, ulong digitalActionHandle, out ControllerActionOrigin /*EControllerActionOrigin **/ originsOut );
ControllerAnalogActionHandle_t /*(ControllerAnalogActionHandle_t)*/ ISteamController_GetAnalogActionHandle( string /*const char **/ pszActionName );
ControllerAnalogActionData_t /*struct ControllerAnalogActionData_t*/ ISteamController_GetAnalogActionData( ulong controllerHandle, ulong analogActionHandle );
int /*int*/ ISteamController_GetAnalogActionOrigins( ulong controllerHandle, ulong actionSetHandle, ulong analogActionHandle, out ControllerActionOrigin /*EControllerActionOrigin **/ originsOut );
void /*void*/ ISteamController_StopAnalogActionMomentum( ulong controllerHandle, ulong eAction );
void /*void*/ ISteamController_TriggerHapticPulse( ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec );
void /*void*/ ISteamController_TriggerRepeatedHapticPulse( ulong controllerHandle, SteamControllerPad /*ESteamControllerPad*/ eTargetPad, ushort /*unsigned short*/ usDurationMicroSec, ushort /*unsigned short*/ usOffMicroSec, ushort /*unsigned short*/ unRepeat, uint /*unsigned int*/ nFlags );
void /*void*/ ISteamController_TriggerVibration( ulong controllerHandle, ushort /*unsigned short*/ usLeftSpeed, ushort /*unsigned short*/ usRightSpeed );
void /*void*/ ISteamController_SetLEDColor( ulong controllerHandle, byte /*uint8*/ nColorR, byte /*uint8*/ nColorG, byte /*uint8*/ nColorB, uint /*unsigned int*/ nFlags );
int /*int*/ ISteamController_GetGamepadIndexForController( ulong ulControllerHandle );
ControllerHandle_t /*(ControllerHandle_t)*/ ISteamController_GetControllerForGamepadIndex( int /*int*/ nIndex );
ControllerMotionData_t /*struct ControllerMotionData_t*/ ISteamController_GetMotionData( ulong controllerHandle );
bool /*bool*/ ISteamController_ShowDigitalActionOrigins( ulong controllerHandle, ulong digitalActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition );
bool /*bool*/ ISteamController_ShowAnalogActionOrigins( ulong controllerHandle, ulong analogActionHandle, float /*float*/ flScale, float /*float*/ flXPosition, float /*float*/ flYPosition );
IntPtr ISteamController_GetStringForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin );
IntPtr ISteamController_GetGlyphForActionOrigin( ControllerActionOrigin /*EControllerActionOrigin*/ eOrigin );
SteamInputType /*ESteamInputType*/ ISteamController_GetInputTypeForHandle( ulong controllerHandle );
IntPtr ISteamFriends_GetPersonaName();
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamFriends_SetPersonaName( string /*const char **/ pchPersonaName );
PersonaState /*EPersonaState*/ ISteamFriends_GetPersonaState();
int /*int*/ ISteamFriends_GetFriendCount( int /*int*/ iFriendFlags );
CSteamID /*(class CSteamID)*/ ISteamFriends_GetFriendByIndex( int /*int*/ iFriend, int /*int*/ iFriendFlags );
FriendRelationship /*EFriendRelationship*/ ISteamFriends_GetFriendRelationship( ulong steamIDFriend );
PersonaState /*EPersonaState*/ ISteamFriends_GetFriendPersonaState( ulong steamIDFriend );
IntPtr ISteamFriends_GetFriendPersonaName( ulong steamIDFriend );
bool /*bool*/ ISteamFriends_GetFriendGamePlayed( ulong steamIDFriend, ref FriendGameInfo_t /*struct FriendGameInfo_t **/ pFriendGameInfo );
IntPtr ISteamFriends_GetFriendPersonaNameHistory( ulong steamIDFriend, int /*int*/ iPersonaName );
int /*int*/ ISteamFriends_GetFriendSteamLevel( ulong steamIDFriend );
IntPtr ISteamFriends_GetPlayerNickname( ulong steamIDPlayer );
int /*int*/ ISteamFriends_GetFriendsGroupCount();
FriendsGroupID_t /*(FriendsGroupID_t)*/ ISteamFriends_GetFriendsGroupIDByIndex( int /*int*/ iFG );
IntPtr ISteamFriends_GetFriendsGroupName( short friendsGroupID );
int /*int*/ ISteamFriends_GetFriendsGroupMembersCount( short friendsGroupID );
void /*void*/ ISteamFriends_GetFriendsGroupMembersList( short friendsGroupID, IntPtr /*class CSteamID **/ pOutSteamIDMembers, int /*int*/ nMembersCount );
bool /*bool*/ ISteamFriends_HasFriend( ulong steamIDFriend, int /*int*/ iFriendFlags );
int /*int*/ ISteamFriends_GetClanCount();
CSteamID /*(class CSteamID)*/ ISteamFriends_GetClanByIndex( int /*int*/ iClan );
IntPtr ISteamFriends_GetClanName( ulong steamIDClan );
IntPtr ISteamFriends_GetClanTag( ulong steamIDClan );
bool /*bool*/ ISteamFriends_GetClanActivityCounts( ulong steamIDClan, out int /*int **/ pnOnline, out int /*int **/ pnInGame, out int /*int **/ pnChatting );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamFriends_DownloadClanActivityCounts( IntPtr /*class CSteamID **/ psteamIDClans, int /*int*/ cClansToRequest );
int /*int*/ ISteamFriends_GetFriendCountFromSource( ulong steamIDSource );
CSteamID /*(class CSteamID)*/ ISteamFriends_GetFriendFromSourceByIndex( ulong steamIDSource, int /*int*/ iFriend );
bool /*bool*/ ISteamFriends_IsUserInSource( ulong steamIDUser, ulong steamIDSource );
void /*void*/ ISteamFriends_SetInGameVoiceSpeaking( ulong steamIDUser, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bSpeaking );
void /*void*/ ISteamFriends_ActivateGameOverlay( string /*const char **/ pchDialog );
void /*void*/ ISteamFriends_ActivateGameOverlayToUser( string /*const char **/ pchDialog, ulong steamID );
void /*void*/ ISteamFriends_ActivateGameOverlayToWebPage( string /*const char **/ pchURL );
void /*void*/ ISteamFriends_ActivateGameOverlayToStore( uint nAppID, OverlayToStoreFlag /*EOverlayToStoreFlag*/ eFlag );
void /*void*/ ISteamFriends_SetPlayedWith( ulong steamIDUserPlayedWith );
void /*void*/ ISteamFriends_ActivateGameOverlayInviteDialog( ulong steamIDLobby );
int /*int*/ ISteamFriends_GetSmallFriendAvatar( ulong steamIDFriend );
int /*int*/ ISteamFriends_GetMediumFriendAvatar( ulong steamIDFriend );
int /*int*/ ISteamFriends_GetLargeFriendAvatar( ulong steamIDFriend );
bool /*bool*/ ISteamFriends_RequestUserInformation( ulong steamIDUser, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bRequireNameOnly );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamFriends_RequestClanOfficerList( ulong steamIDClan );
CSteamID /*(class CSteamID)*/ ISteamFriends_GetClanOwner( ulong steamIDClan );
int /*int*/ ISteamFriends_GetClanOfficerCount( ulong steamIDClan );
CSteamID /*(class CSteamID)*/ ISteamFriends_GetClanOfficerByIndex( ulong steamIDClan, int /*int*/ iOfficer );
uint /*uint32*/ ISteamFriends_GetUserRestrictions();
bool /*bool*/ ISteamFriends_SetRichPresence( string /*const char **/ pchKey, string /*const char **/ pchValue );
void /*void*/ ISteamFriends_ClearRichPresence();
IntPtr ISteamFriends_GetFriendRichPresence( ulong steamIDFriend, string /*const char **/ pchKey );
int /*int*/ ISteamFriends_GetFriendRichPresenceKeyCount( ulong steamIDFriend );
IntPtr ISteamFriends_GetFriendRichPresenceKeyByIndex( ulong steamIDFriend, int /*int*/ iKey );
void /*void*/ ISteamFriends_RequestFriendRichPresence( ulong steamIDFriend );
bool /*bool*/ ISteamFriends_InviteUserToGame( ulong steamIDFriend, string /*const char **/ pchConnectString );
int /*int*/ ISteamFriends_GetCoplayFriendCount();
CSteamID /*(class CSteamID)*/ ISteamFriends_GetCoplayFriend( int /*int*/ iCoplayFriend );
int /*int*/ ISteamFriends_GetFriendCoplayTime( ulong steamIDFriend );
AppId_t /*(AppId_t)*/ ISteamFriends_GetFriendCoplayGame( ulong steamIDFriend );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamFriends_JoinClanChatRoom( ulong steamIDClan );
bool /*bool*/ ISteamFriends_LeaveClanChatRoom( ulong steamIDClan );
int /*int*/ ISteamFriends_GetClanChatMemberCount( ulong steamIDClan );
CSteamID /*(class CSteamID)*/ ISteamFriends_GetChatMemberByIndex( ulong steamIDClan, int /*int*/ iUser );
bool /*bool*/ ISteamFriends_SendClanChatMessage( ulong steamIDClanChat, string /*const char **/ pchText );
int /*int*/ ISteamFriends_GetClanChatMessage( ulong steamIDClanChat, int /*int*/ iMessage, IntPtr /*void **/ prgchText, int /*int*/ cchTextMax, out ChatEntryType /*EChatEntryType **/ peChatEntryType, out ulong psteamidChatter );
bool /*bool*/ ISteamFriends_IsClanChatAdmin( ulong steamIDClanChat, ulong steamIDUser );
bool /*bool*/ ISteamFriends_IsClanChatWindowOpenInSteam( ulong steamIDClanChat );
bool /*bool*/ ISteamFriends_OpenClanChatWindowInSteam( ulong steamIDClanChat );
bool /*bool*/ ISteamFriends_CloseClanChatWindowInSteam( ulong steamIDClanChat );
bool /*bool*/ ISteamFriends_SetListenForFriendsMessages( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bInterceptEnabled );
bool /*bool*/ ISteamFriends_ReplyToFriendMessage( ulong steamIDFriend, string /*const char **/ pchMsgToSend );
int /*int*/ ISteamFriends_GetFriendMessage( ulong steamIDFriend, int /*int*/ iMessageID, IntPtr /*void **/ pvData, int /*int*/ cubData, out ChatEntryType /*EChatEntryType **/ peChatEntryType );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamFriends_GetFollowerCount( ulong steamID );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamFriends_IsFollowing( ulong steamID );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamFriends_EnumerateFollowingList( uint /*uint32*/ unStartIndex );
bool /*bool*/ ISteamFriends_IsClanPublic( ulong steamIDClan );
bool /*bool*/ ISteamFriends_IsClanOfficialGameGroup( ulong steamIDClan );
bool /*bool*/ ISteamGameServer_InitGameServer( uint /*uint32*/ unIP, ushort /*uint16*/ usGamePort, ushort /*uint16*/ usQueryPort, uint /*uint32*/ unFlags, uint nGameAppId, string /*const char **/ pchVersionString );
void /*void*/ ISteamGameServer_SetProduct( string /*const char **/ pszProduct );
void /*void*/ ISteamGameServer_SetGameDescription( string /*const char **/ pszGameDescription );
void /*void*/ ISteamGameServer_SetModDir( string /*const char **/ pszModDir );
void /*void*/ ISteamGameServer_SetDedicatedServer( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bDedicated );
void /*void*/ ISteamGameServer_LogOn( string /*const char **/ pszToken );
void /*void*/ ISteamGameServer_LogOnAnonymous();
void /*void*/ ISteamGameServer_LogOff();
bool /*bool*/ ISteamGameServer_BLoggedOn();
bool /*bool*/ ISteamGameServer_BSecure();
CSteamID /*(class CSteamID)*/ ISteamGameServer_GetSteamID();
bool /*bool*/ ISteamGameServer_WasRestartRequested();
void /*void*/ ISteamGameServer_SetMaxPlayerCount( int /*int*/ cPlayersMax );
void /*void*/ ISteamGameServer_SetBotPlayerCount( int /*int*/ cBotplayers );
void /*void*/ ISteamGameServer_SetServerName( string /*const char **/ pszServerName );
void /*void*/ ISteamGameServer_SetMapName( string /*const char **/ pszMapName );
void /*void*/ ISteamGameServer_SetPasswordProtected( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bPasswordProtected );
void /*void*/ ISteamGameServer_SetSpectatorPort( ushort /*uint16*/ unSpectatorPort );
void /*void*/ ISteamGameServer_SetSpectatorServerName( string /*const char **/ pszSpectatorServerName );
void /*void*/ ISteamGameServer_ClearAllKeyValues();
void /*void*/ ISteamGameServer_SetKeyValue( string /*const char **/ pKey, string /*const char **/ pValue );
void /*void*/ ISteamGameServer_SetGameTags( string /*const char **/ pchGameTags );
void /*void*/ ISteamGameServer_SetGameData( string /*const char **/ pchGameData );
void /*void*/ ISteamGameServer_SetRegion( string /*const char **/ pszRegion );
bool /*bool*/ ISteamGameServer_SendUserConnectAndAuthenticate( uint /*uint32*/ unIPClient, IntPtr /*const void **/ pvAuthBlob, uint /*uint32*/ cubAuthBlobSize, out ulong pSteamIDUser );
CSteamID /*(class CSteamID)*/ ISteamGameServer_CreateUnauthenticatedUserConnection();
void /*void*/ ISteamGameServer_SendUserDisconnect( ulong steamIDUser );
bool /*bool*/ ISteamGameServer_BUpdateUserData( ulong steamIDUser, string /*const char **/ pchPlayerName, uint /*uint32*/ uScore );
HAuthTicket /*(HAuthTicket)*/ ISteamGameServer_GetAuthSessionTicket( IntPtr /*void **/ pTicket, int /*int*/ cbMaxTicket, out uint /*uint32 **/ pcbTicket );
BeginAuthSessionResult /*EBeginAuthSessionResult*/ ISteamGameServer_BeginAuthSession( IntPtr /*const void **/ pAuthTicket, int /*int*/ cbAuthTicket, ulong steamID );
void /*void*/ ISteamGameServer_EndAuthSession( ulong steamID );
void /*void*/ ISteamGameServer_CancelAuthTicket( uint hAuthTicket );
UserHasLicenseForAppResult /*EUserHasLicenseForAppResult*/ ISteamGameServer_UserHasLicenseForApp( ulong steamID, uint appID );
bool /*bool*/ ISteamGameServer_RequestUserGroupStatus( ulong steamIDUser, ulong steamIDGroup );
void /*void*/ ISteamGameServer_GetGameplayStats();
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamGameServer_GetServerReputation();
uint /*uint32*/ ISteamGameServer_GetPublicIP();
bool /*bool*/ ISteamGameServer_HandleIncomingPacket( IntPtr /*const void **/ pData, int /*int*/ cbData, uint /*uint32*/ srcIP, ushort /*uint16*/ srcPort );
int /*int*/ ISteamGameServer_GetNextOutgoingPacket( IntPtr /*void **/ pOut, int /*int*/ cbMaxOut, out uint /*uint32 **/ pNetAdr, out ushort /*uint16 **/ pPort );
void /*void*/ ISteamGameServer_EnableHeartbeats( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bActive );
void /*void*/ ISteamGameServer_SetHeartbeatInterval( int /*int*/ iHeartbeatInterval );
void /*void*/ ISteamGameServer_ForceHeartbeat();
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamGameServer_AssociateWithClan( ulong steamIDClan );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamGameServer_ComputeNewPlayerCompatibility( ulong steamIDNewPlayer );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamGameServerStats_RequestUserStats( ulong steamIDUser );
bool /*bool*/ ISteamGameServerStats_GetUserStat( ulong steamIDUser, string /*const char **/ pchName, out int /*int32 **/ pData );
bool /*bool*/ ISteamGameServerStats_GetUserStat0( ulong steamIDUser, string /*const char **/ pchName, out float /*float **/ pData );
bool /*bool*/ ISteamGameServerStats_GetUserAchievement( ulong steamIDUser, string /*const char **/ pchName, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbAchieved );
bool /*bool*/ ISteamGameServerStats_SetUserStat( ulong steamIDUser, string /*const char **/ pchName, int /*int32*/ nData );
bool /*bool*/ ISteamGameServerStats_SetUserStat0( ulong steamIDUser, string /*const char **/ pchName, float /*float*/ fData );
bool /*bool*/ ISteamGameServerStats_UpdateUserAvgRateStat( ulong steamIDUser, string /*const char **/ pchName, float /*float*/ flCountThisSession, double /*double*/ dSessionLength );
bool /*bool*/ ISteamGameServerStats_SetUserAchievement( ulong steamIDUser, string /*const char **/ pchName );
bool /*bool*/ ISteamGameServerStats_ClearUserAchievement( ulong steamIDUser, string /*const char **/ pchName );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamGameServerStats_StoreUserStats( ulong steamIDUser );
void /*void*/ ISteamHTMLSurface_DestructISteamHTMLSurface();
bool /*bool*/ ISteamHTMLSurface_Init();
bool /*bool*/ ISteamHTMLSurface_Shutdown();
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamHTMLSurface_CreateBrowser( string /*const char **/ pchUserAgent, string /*const char **/ pchUserCSS );
void /*void*/ ISteamHTMLSurface_RemoveBrowser( uint unBrowserHandle );
void /*void*/ ISteamHTMLSurface_LoadURL( uint unBrowserHandle, string /*const char **/ pchURL, string /*const char **/ pchPostData );
void /*void*/ ISteamHTMLSurface_SetSize( uint unBrowserHandle, uint /*uint32*/ unWidth, uint /*uint32*/ unHeight );
void /*void*/ ISteamHTMLSurface_StopLoad( uint unBrowserHandle );
void /*void*/ ISteamHTMLSurface_Reload( uint unBrowserHandle );
void /*void*/ ISteamHTMLSurface_GoBack( uint unBrowserHandle );
void /*void*/ ISteamHTMLSurface_GoForward( uint unBrowserHandle );
void /*void*/ ISteamHTMLSurface_AddHeader( uint unBrowserHandle, string /*const char **/ pchKey, string /*const char **/ pchValue );
void /*void*/ ISteamHTMLSurface_ExecuteJavascript( uint unBrowserHandle, string /*const char **/ pchScript );
void /*void*/ ISteamHTMLSurface_MouseUp( uint unBrowserHandle, HTMLMouseButton /*ISteamHTMLSurface::EHTMLMouseButton*/ eMouseButton );
void /*void*/ ISteamHTMLSurface_MouseDown( uint unBrowserHandle, HTMLMouseButton /*ISteamHTMLSurface::EHTMLMouseButton*/ eMouseButton );
void /*void*/ ISteamHTMLSurface_MouseDoubleClick( uint unBrowserHandle, HTMLMouseButton /*ISteamHTMLSurface::EHTMLMouseButton*/ eMouseButton );
void /*void*/ ISteamHTMLSurface_MouseMove( uint unBrowserHandle, int /*int*/ x, int /*int*/ y );
void /*void*/ ISteamHTMLSurface_MouseWheel( uint unBrowserHandle, int /*int32*/ nDelta );
void /*void*/ ISteamHTMLSurface_KeyDown( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers );
void /*void*/ ISteamHTMLSurface_KeyUp( uint unBrowserHandle, uint /*uint32*/ nNativeKeyCode, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers );
void /*void*/ ISteamHTMLSurface_KeyChar( uint unBrowserHandle, uint /*uint32*/ cUnicodeChar, HTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ eHTMLKeyModifiers );
void /*void*/ ISteamHTMLSurface_SetHorizontalScroll( uint unBrowserHandle, uint /*uint32*/ nAbsolutePixelScroll );
void /*void*/ ISteamHTMLSurface_SetVerticalScroll( uint unBrowserHandle, uint /*uint32*/ nAbsolutePixelScroll );
void /*void*/ ISteamHTMLSurface_SetKeyFocus( uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bHasKeyFocus );
void /*void*/ ISteamHTMLSurface_ViewSource( uint unBrowserHandle );
void /*void*/ ISteamHTMLSurface_CopyToClipboard( uint unBrowserHandle );
void /*void*/ ISteamHTMLSurface_PasteFromClipboard( uint unBrowserHandle );
void /*void*/ ISteamHTMLSurface_Find( uint unBrowserHandle, string /*const char **/ pchSearchStr, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bCurrentlyInFind, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bReverse );
void /*void*/ ISteamHTMLSurface_StopFind( uint unBrowserHandle );
void /*void*/ ISteamHTMLSurface_GetLinkAtPosition( uint unBrowserHandle, int /*int*/ x, int /*int*/ y );
void /*void*/ ISteamHTMLSurface_SetCookie( string /*const char **/ pchHostname, string /*const char **/ pchKey, string /*const char **/ pchValue, string /*const char **/ pchPath, uint nExpires, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bSecure, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bHTTPOnly );
void /*void*/ ISteamHTMLSurface_SetPageScaleFactor( uint unBrowserHandle, float /*float*/ flZoom, int /*int*/ nPointX, int /*int*/ nPointY );
void /*void*/ ISteamHTMLSurface_SetBackgroundMode( uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bBackgroundMode );
void /*void*/ ISteamHTMLSurface_SetDPIScalingFactor( uint unBrowserHandle, float /*float*/ flDPIScaling );
void /*void*/ ISteamHTMLSurface_AllowStartRequest( uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowed );
void /*void*/ ISteamHTMLSurface_JSDialogResponse( uint unBrowserHandle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bResult );
HTTPRequestHandle /*(HTTPRequestHandle)*/ ISteamHTTP_CreateHTTPRequest( HTTPMethod /*EHTTPMethod*/ eHTTPRequestMethod, string /*const char **/ pchAbsoluteURL );
bool /*bool*/ ISteamHTTP_SetHTTPRequestContextValue( uint hRequest, ulong /*uint64*/ ulContextValue );
bool /*bool*/ ISteamHTTP_SetHTTPRequestNetworkActivityTimeout( uint hRequest, uint /*uint32*/ unTimeoutSeconds );
bool /*bool*/ ISteamHTTP_SetHTTPRequestHeaderValue( uint hRequest, string /*const char **/ pchHeaderName, string /*const char **/ pchHeaderValue );
bool /*bool*/ ISteamHTTP_SetHTTPRequestGetOrPostParameter( uint hRequest, string /*const char **/ pchParamName, string /*const char **/ pchParamValue );
bool /*bool*/ ISteamHTTP_SendHTTPRequest( uint hRequest, ref ulong pCallHandle );
bool /*bool*/ ISteamHTTP_SendHTTPRequestAndStreamResponse( uint hRequest, ref ulong pCallHandle );
bool /*bool*/ ISteamHTTP_DeferHTTPRequest( uint hRequest );
bool /*bool*/ ISteamHTTP_PrioritizeHTTPRequest( uint hRequest );
bool /*bool*/ ISteamHTTP_GetHTTPResponseHeaderSize( uint hRequest, string /*const char **/ pchHeaderName, out uint /*uint32 **/ unResponseHeaderSize );
bool /*bool*/ ISteamHTTP_GetHTTPResponseHeaderValue( uint hRequest, string /*const char **/ pchHeaderName, out byte /*uint8 **/ pHeaderValueBuffer, uint /*uint32*/ unBufferSize );
bool /*bool*/ ISteamHTTP_GetHTTPResponseBodySize( uint hRequest, out uint /*uint32 **/ unBodySize );
bool /*bool*/ ISteamHTTP_GetHTTPResponseBodyData( uint hRequest, out byte /*uint8 **/ pBodyDataBuffer, uint /*uint32*/ unBufferSize );
bool /*bool*/ ISteamHTTP_GetHTTPStreamingResponseBodyData( uint hRequest, uint /*uint32*/ cOffset, out byte /*uint8 **/ pBodyDataBuffer, uint /*uint32*/ unBufferSize );
bool /*bool*/ ISteamHTTP_ReleaseHTTPRequest( uint hRequest );
bool /*bool*/ ISteamHTTP_GetHTTPDownloadProgressPct( uint hRequest, out float /*float **/ pflPercentOut );
bool /*bool*/ ISteamHTTP_SetHTTPRequestRawPostBody( uint hRequest, string /*const char **/ pchContentType, out byte /*uint8 **/ pubBody, uint /*uint32*/ unBodyLen );
HTTPCookieContainerHandle /*(HTTPCookieContainerHandle)*/ ISteamHTTP_CreateCookieContainer( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowResponsesToModify );
bool /*bool*/ ISteamHTTP_ReleaseCookieContainer( uint hCookieContainer );
bool /*bool*/ ISteamHTTP_SetCookie( uint hCookieContainer, string /*const char **/ pchHost, string /*const char **/ pchUrl, string /*const char **/ pchCookie );
bool /*bool*/ ISteamHTTP_SetHTTPRequestCookieContainer( uint hRequest, uint hCookieContainer );
bool /*bool*/ ISteamHTTP_SetHTTPRequestUserAgentInfo( uint hRequest, string /*const char **/ pchUserAgentInfo );
bool /*bool*/ ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate( uint hRequest, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bRequireVerifiedCertificate );
bool /*bool*/ ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS( uint hRequest, uint /*uint32*/ unMilliseconds );
bool /*bool*/ ISteamHTTP_GetHTTPRequestWasTimedOut( uint hRequest, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbWasTimedOut );
Result /*EResult*/ ISteamInventory_GetResultStatus( int resultHandle );
bool /*bool*/ ISteamInventory_GetResultItems( int resultHandle, IntPtr /*struct SteamItemDetails_t **/ pOutItemsArray, out uint /*uint32 **/ punOutItemsArraySize );
bool /*bool*/ ISteamInventory_GetResultItemProperty( int resultHandle, uint /*uint32*/ unItemIndex, string /*const char **/ pchPropertyName, System.Text.StringBuilder /*char **/ pchValueBuffer, out uint /*uint32 **/ punValueBufferSizeOut );
uint /*uint32*/ ISteamInventory_GetResultTimestamp( int resultHandle );
bool /*bool*/ ISteamInventory_CheckResultSteamID( int resultHandle, ulong steamIDExpected );
void /*void*/ ISteamInventory_DestroyResult( int resultHandle );
bool /*bool*/ ISteamInventory_GetAllItems( ref int pResultHandle );
bool /*bool*/ ISteamInventory_GetItemsByID( ref int pResultHandle, ulong[] pInstanceIDs, uint /*uint32*/ unCountInstanceIDs );
bool /*bool*/ ISteamInventory_SerializeResult( int resultHandle, IntPtr /*void **/ pOutBuffer, out uint /*uint32 **/ punOutBufferSize );
bool /*bool*/ ISteamInventory_DeserializeResult( ref int pOutResultHandle, IntPtr /*const void **/ pBuffer, uint /*uint32*/ unBufferSize, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bRESERVED_MUST_BE_FALSE );
bool /*bool*/ ISteamInventory_GenerateItems( ref int pResultHandle, int[] pArrayItemDefs, uint[] /*const uint32 **/ punArrayQuantity, uint /*uint32*/ unArrayLength );
bool /*bool*/ ISteamInventory_GrantPromoItems( ref int pResultHandle );
bool /*bool*/ ISteamInventory_AddPromoItem( ref int pResultHandle, int itemDef );
bool /*bool*/ ISteamInventory_AddPromoItems( ref int pResultHandle, int[] pArrayItemDefs, uint /*uint32*/ unArrayLength );
bool /*bool*/ ISteamInventory_ConsumeItem( ref int pResultHandle, ulong itemConsume, uint /*uint32*/ unQuantity );
bool /*bool*/ ISteamInventory_ExchangeItems( ref int pResultHandle, int[] pArrayGenerate, uint[] /*const uint32 **/ punArrayGenerateQuantity, uint /*uint32*/ unArrayGenerateLength, ulong[] pArrayDestroy, uint[] /*const uint32 **/ punArrayDestroyQuantity, uint /*uint32*/ unArrayDestroyLength );
bool /*bool*/ ISteamInventory_TransferItemQuantity( ref int pResultHandle, ulong itemIdSource, uint /*uint32*/ unQuantity, ulong itemIdDest );
void /*void*/ ISteamInventory_SendItemDropHeartbeat();
bool /*bool*/ ISteamInventory_TriggerItemDrop( ref int pResultHandle, int dropListDefinition );
bool /*bool*/ ISteamInventory_TradeItems( ref int pResultHandle, ulong steamIDTradePartner, ulong[] pArrayGive, uint[] /*const uint32 **/ pArrayGiveQuantity, uint /*uint32*/ nArrayGiveLength, ulong[] pArrayGet, uint[] /*const uint32 **/ pArrayGetQuantity, uint /*uint32*/ nArrayGetLength );
bool /*bool*/ ISteamInventory_LoadItemDefinitions();
bool /*bool*/ ISteamInventory_GetItemDefinitionIDs( IntPtr /*SteamItemDef_t **/ pItemDefIDs, out uint /*uint32 **/ punItemDefIDsArraySize );
bool /*bool*/ ISteamInventory_GetItemDefinitionProperty( int iDefinition, string /*const char **/ pchPropertyName, System.Text.StringBuilder /*char **/ pchValueBuffer, out uint /*uint32 **/ punValueBufferSizeOut );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamInventory_RequestEligiblePromoItemDefinitionsIDs( ulong steamID );
bool /*bool*/ ISteamInventory_GetEligiblePromoItemDefinitionIDs( ulong steamID, IntPtr /*SteamItemDef_t **/ pItemDefIDs, out uint /*uint32 **/ punItemDefIDsArraySize );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamInventory_StartPurchase( int[] pArrayItemDefs, uint[] /*const uint32 **/ punArrayQuantity, uint /*uint32*/ unArrayLength );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamInventory_RequestPrices();
uint /*uint32*/ ISteamInventory_GetNumItemsWithPrices();
bool /*bool*/ ISteamInventory_GetItemsWithPrices( IntPtr /*SteamItemDef_t **/ pArrayItemDefs, IntPtr /*uint64 **/ pPrices, uint /*uint32*/ unArrayLength );
bool /*bool*/ ISteamInventory_GetItemPrice( int iDefinition, out ulong /*uint64 **/ pPrice );
SteamInventoryUpdateHandle_t /*(SteamInventoryUpdateHandle_t)*/ ISteamInventory_StartUpdateProperties();
bool /*bool*/ ISteamInventory_RemoveProperty( ulong handle, ulong nItemID, string /*const char **/ pchPropertyName );
bool /*bool*/ ISteamInventory_SetProperty( ulong handle, ulong nItemID, string /*const char **/ pchPropertyName, string /*const char **/ pchPropertyValue );
bool /*bool*/ ISteamInventory_SetProperty0( ulong handle, ulong nItemID, string /*const char **/ pchPropertyName, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bValue );
bool /*bool*/ ISteamInventory_SetProperty0( ulong handle, ulong nItemID, string /*const char **/ pchPropertyName, long /*int64*/ nValue );
bool /*bool*/ ISteamInventory_SetProperty0( ulong handle, ulong nItemID, string /*const char **/ pchPropertyName, float /*float*/ flValue );
bool /*bool*/ ISteamInventory_SubmitUpdateProperties( ulong handle, ref int pResultHandle );
int /*int*/ ISteamMatchmaking_GetFavoriteGameCount();
bool /*bool*/ ISteamMatchmaking_GetFavoriteGame( int /*int*/ iGame, ref uint pnAppID, out uint /*uint32 **/ pnIP, out ushort /*uint16 **/ pnConnPort, out ushort /*uint16 **/ pnQueryPort, out uint /*uint32 **/ punFlags, out uint /*uint32 **/ pRTime32LastPlayedOnServer );
int /*int*/ ISteamMatchmaking_AddFavoriteGame( uint nAppID, uint /*uint32*/ nIP, ushort /*uint16*/ nConnPort, ushort /*uint16*/ nQueryPort, uint /*uint32*/ unFlags, uint /*uint32*/ rTime32LastPlayedOnServer );
bool /*bool*/ ISteamMatchmaking_RemoveFavoriteGame( uint nAppID, uint /*uint32*/ nIP, ushort /*uint16*/ nConnPort, ushort /*uint16*/ nQueryPort, uint /*uint32*/ unFlags );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamMatchmaking_RequestLobbyList();
void /*void*/ ISteamMatchmaking_AddRequestLobbyListStringFilter( string /*const char **/ pchKeyToMatch, string /*const char **/ pchValueToMatch, LobbyComparison /*ELobbyComparison*/ eComparisonType );
void /*void*/ ISteamMatchmaking_AddRequestLobbyListNumericalFilter( string /*const char **/ pchKeyToMatch, int /*int*/ nValueToMatch, LobbyComparison /*ELobbyComparison*/ eComparisonType );
void /*void*/ ISteamMatchmaking_AddRequestLobbyListNearValueFilter( string /*const char **/ pchKeyToMatch, int /*int*/ nValueToBeCloseTo );
void /*void*/ ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable( int /*int*/ nSlotsAvailable );
void /*void*/ ISteamMatchmaking_AddRequestLobbyListDistanceFilter( LobbyDistanceFilter /*ELobbyDistanceFilter*/ eLobbyDistanceFilter );
void /*void*/ ISteamMatchmaking_AddRequestLobbyListResultCountFilter( int /*int*/ cMaxResults );
void /*void*/ ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter( ulong steamIDLobby );
CSteamID /*(class CSteamID)*/ ISteamMatchmaking_GetLobbyByIndex( int /*int*/ iLobby );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamMatchmaking_CreateLobby( LobbyType /*ELobbyType*/ eLobbyType, int /*int*/ cMaxMembers );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamMatchmaking_JoinLobby( ulong steamIDLobby );
void /*void*/ ISteamMatchmaking_LeaveLobby( ulong steamIDLobby );
bool /*bool*/ ISteamMatchmaking_InviteUserToLobby( ulong steamIDLobby, ulong steamIDInvitee );
int /*int*/ ISteamMatchmaking_GetNumLobbyMembers( ulong steamIDLobby );
CSteamID /*(class CSteamID)*/ ISteamMatchmaking_GetLobbyMemberByIndex( ulong steamIDLobby, int /*int*/ iMember );
IntPtr ISteamMatchmaking_GetLobbyData( ulong steamIDLobby, string /*const char **/ pchKey );
bool /*bool*/ ISteamMatchmaking_SetLobbyData( ulong steamIDLobby, string /*const char **/ pchKey, string /*const char **/ pchValue );
int /*int*/ ISteamMatchmaking_GetLobbyDataCount( ulong steamIDLobby );
bool /*bool*/ ISteamMatchmaking_GetLobbyDataByIndex( ulong steamIDLobby, int /*int*/ iLobbyData, System.Text.StringBuilder /*char **/ pchKey, int /*int*/ cchKeyBufferSize, System.Text.StringBuilder /*char **/ pchValue, int /*int*/ cchValueBufferSize );
bool /*bool*/ ISteamMatchmaking_DeleteLobbyData( ulong steamIDLobby, string /*const char **/ pchKey );
IntPtr ISteamMatchmaking_GetLobbyMemberData( ulong steamIDLobby, ulong steamIDUser, string /*const char **/ pchKey );
void /*void*/ ISteamMatchmaking_SetLobbyMemberData( ulong steamIDLobby, string /*const char **/ pchKey, string /*const char **/ pchValue );
bool /*bool*/ ISteamMatchmaking_SendLobbyChatMsg( ulong steamIDLobby, IntPtr /*const void **/ pvMsgBody, int /*int*/ cubMsgBody );
int /*int*/ ISteamMatchmaking_GetLobbyChatEntry( ulong steamIDLobby, int /*int*/ iChatID, out ulong pSteamIDUser, IntPtr /*void **/ pvData, int /*int*/ cubData, out ChatEntryType /*EChatEntryType **/ peChatEntryType );
bool /*bool*/ ISteamMatchmaking_RequestLobbyData( ulong steamIDLobby );
void /*void*/ ISteamMatchmaking_SetLobbyGameServer( ulong steamIDLobby, uint /*uint32*/ unGameServerIP, ushort /*uint16*/ unGameServerPort, ulong steamIDGameServer );
bool /*bool*/ ISteamMatchmaking_GetLobbyGameServer( ulong steamIDLobby, out uint /*uint32 **/ punGameServerIP, out ushort /*uint16 **/ punGameServerPort, out ulong psteamIDGameServer );
bool /*bool*/ ISteamMatchmaking_SetLobbyMemberLimit( ulong steamIDLobby, int /*int*/ cMaxMembers );
int /*int*/ ISteamMatchmaking_GetLobbyMemberLimit( ulong steamIDLobby );
bool /*bool*/ ISteamMatchmaking_SetLobbyType( ulong steamIDLobby, LobbyType /*ELobbyType*/ eLobbyType );
bool /*bool*/ ISteamMatchmaking_SetLobbyJoinable( ulong steamIDLobby, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bLobbyJoinable );
CSteamID /*(class CSteamID)*/ ISteamMatchmaking_GetLobbyOwner( ulong steamIDLobby );
bool /*bool*/ ISteamMatchmaking_SetLobbyOwner( ulong steamIDLobby, ulong steamIDNewOwner );
bool /*bool*/ ISteamMatchmaking_SetLinkedLobby( ulong steamIDLobby, ulong steamIDLobbyDependent );
HServerListRequest /*(HServerListRequest)*/ ISteamMatchmakingServers_RequestInternetServerList( uint iApp, IntPtr /*struct MatchMakingKeyValuePair_t ***/ ppchFilters, uint /*uint32*/ nFilters, IntPtr /*class ISteamMatchmakingServerListResponse **/ pRequestServersResponse );
HServerListRequest /*(HServerListRequest)*/ ISteamMatchmakingServers_RequestLANServerList( uint iApp, IntPtr /*class ISteamMatchmakingServerListResponse **/ pRequestServersResponse );
HServerListRequest /*(HServerListRequest)*/ ISteamMatchmakingServers_RequestFriendsServerList( uint iApp, IntPtr /*struct MatchMakingKeyValuePair_t ***/ ppchFilters, uint /*uint32*/ nFilters, IntPtr /*class ISteamMatchmakingServerListResponse **/ pRequestServersResponse );
HServerListRequest /*(HServerListRequest)*/ ISteamMatchmakingServers_RequestFavoritesServerList( uint iApp, IntPtr /*struct MatchMakingKeyValuePair_t ***/ ppchFilters, uint /*uint32*/ nFilters, IntPtr /*class ISteamMatchmakingServerListResponse **/ pRequestServersResponse );
HServerListRequest /*(HServerListRequest)*/ ISteamMatchmakingServers_RequestHistoryServerList( uint iApp, IntPtr /*struct MatchMakingKeyValuePair_t ***/ ppchFilters, uint /*uint32*/ nFilters, IntPtr /*class ISteamMatchmakingServerListResponse **/ pRequestServersResponse );
HServerListRequest /*(HServerListRequest)*/ ISteamMatchmakingServers_RequestSpectatorServerList( uint iApp, IntPtr /*struct MatchMakingKeyValuePair_t ***/ ppchFilters, uint /*uint32*/ nFilters, IntPtr /*class ISteamMatchmakingServerListResponse **/ pRequestServersResponse );
void /*void*/ ISteamMatchmakingServers_ReleaseRequest( IntPtr hServerListRequest );
IntPtr /*class gameserveritem_t **/ ISteamMatchmakingServers_GetServerDetails( IntPtr hRequest, int /*int*/ iServer );
void /*void*/ ISteamMatchmakingServers_CancelQuery( IntPtr hRequest );
void /*void*/ ISteamMatchmakingServers_RefreshQuery( IntPtr hRequest );
bool /*bool*/ ISteamMatchmakingServers_IsRefreshing( IntPtr hRequest );
int /*int*/ ISteamMatchmakingServers_GetServerCount( IntPtr hRequest );
void /*void*/ ISteamMatchmakingServers_RefreshServer( IntPtr hRequest, int /*int*/ iServer );
HServerQuery /*(HServerQuery)*/ ISteamMatchmakingServers_PingServer( uint /*uint32*/ unIP, ushort /*uint16*/ usPort, IntPtr /*class ISteamMatchmakingPingResponse **/ pRequestServersResponse );
HServerQuery /*(HServerQuery)*/ ISteamMatchmakingServers_PlayerDetails( uint /*uint32*/ unIP, ushort /*uint16*/ usPort, IntPtr /*class ISteamMatchmakingPlayersResponse **/ pRequestServersResponse );
HServerQuery /*(HServerQuery)*/ ISteamMatchmakingServers_ServerRules( uint /*uint32*/ unIP, ushort /*uint16*/ usPort, IntPtr /*class ISteamMatchmakingRulesResponse **/ pRequestServersResponse );
void /*void*/ ISteamMatchmakingServers_CancelServerQuery( int hServerQuery );
bool /*bool*/ ISteamMusic_BIsEnabled();
bool /*bool*/ ISteamMusic_BIsPlaying();
AudioPlayback_Status /*AudioPlayback_Status*/ ISteamMusic_GetPlaybackStatus();
void /*void*/ ISteamMusic_Play();
void /*void*/ ISteamMusic_Pause();
void /*void*/ ISteamMusic_PlayPrevious();
void /*void*/ ISteamMusic_PlayNext();
void /*void*/ ISteamMusic_SetVolume( float /*float*/ flVolume );
float /*float*/ ISteamMusic_GetVolume();
bool /*bool*/ ISteamMusicRemote_RegisterSteamMusicRemote( string /*const char **/ pchName );
bool /*bool*/ ISteamMusicRemote_DeregisterSteamMusicRemote();
bool /*bool*/ ISteamMusicRemote_BIsCurrentMusicRemote();
bool /*bool*/ ISteamMusicRemote_BActivationSuccess( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bValue );
bool /*bool*/ ISteamMusicRemote_SetDisplayName( string /*const char **/ pchDisplayName );
bool /*bool*/ ISteamMusicRemote_SetPNGIcon_64x64( IntPtr /*void **/ pvBuffer, uint /*uint32*/ cbBufferLength );
bool /*bool*/ ISteamMusicRemote_EnablePlayPrevious( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bValue );
bool /*bool*/ ISteamMusicRemote_EnablePlayNext( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bValue );
bool /*bool*/ ISteamMusicRemote_EnableShuffled( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bValue );
bool /*bool*/ ISteamMusicRemote_EnableLooped( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bValue );
bool /*bool*/ ISteamMusicRemote_EnableQueue( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bValue );
bool /*bool*/ ISteamMusicRemote_EnablePlaylists( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bValue );
bool /*bool*/ ISteamMusicRemote_UpdatePlaybackStatus( AudioPlayback_Status /*AudioPlayback_Status*/ nStatus );
bool /*bool*/ ISteamMusicRemote_UpdateShuffled( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bValue );
bool /*bool*/ ISteamMusicRemote_UpdateLooped( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bValue );
bool /*bool*/ ISteamMusicRemote_UpdateVolume( float /*float*/ flValue );
bool /*bool*/ ISteamMusicRemote_CurrentEntryWillChange();
bool /*bool*/ ISteamMusicRemote_CurrentEntryIsAvailable( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAvailable );
bool /*bool*/ ISteamMusicRemote_UpdateCurrentEntryText( string /*const char **/ pchText );
bool /*bool*/ ISteamMusicRemote_UpdateCurrentEntryElapsedSeconds( int /*int*/ nValue );
bool /*bool*/ ISteamMusicRemote_UpdateCurrentEntryCoverArt( IntPtr /*void **/ pvBuffer, uint /*uint32*/ cbBufferLength );
bool /*bool*/ ISteamMusicRemote_CurrentEntryDidChange();
bool /*bool*/ ISteamMusicRemote_QueueWillChange();
bool /*bool*/ ISteamMusicRemote_ResetQueueEntries();
bool /*bool*/ ISteamMusicRemote_SetQueueEntry( int /*int*/ nID, int /*int*/ nPosition, string /*const char **/ pchEntryText );
bool /*bool*/ ISteamMusicRemote_SetCurrentQueueEntry( int /*int*/ nID );
bool /*bool*/ ISteamMusicRemote_QueueDidChange();
bool /*bool*/ ISteamMusicRemote_PlaylistWillChange();
bool /*bool*/ ISteamMusicRemote_ResetPlaylistEntries();
bool /*bool*/ ISteamMusicRemote_SetPlaylistEntry( int /*int*/ nID, int /*int*/ nPosition, string /*const char **/ pchEntryText );
bool /*bool*/ ISteamMusicRemote_SetCurrentPlaylistEntry( int /*int*/ nID );
bool /*bool*/ ISteamMusicRemote_PlaylistDidChange();
bool /*bool*/ ISteamNetworking_SendP2PPacket( ulong steamIDRemote, IntPtr /*const void **/ pubData, uint /*uint32*/ cubData, P2PSend /*EP2PSend*/ eP2PSendType, int /*int*/ nChannel );
bool /*bool*/ ISteamNetworking_IsP2PPacketAvailable( out uint /*uint32 **/ pcubMsgSize, int /*int*/ nChannel );
bool /*bool*/ ISteamNetworking_ReadP2PPacket( IntPtr /*void **/ pubDest, uint /*uint32*/ cubDest, out uint /*uint32 **/ pcubMsgSize, out ulong psteamIDRemote, int /*int*/ nChannel );
bool /*bool*/ ISteamNetworking_AcceptP2PSessionWithUser( ulong steamIDRemote );
bool /*bool*/ ISteamNetworking_CloseP2PSessionWithUser( ulong steamIDRemote );
bool /*bool*/ ISteamNetworking_CloseP2PChannelWithUser( ulong steamIDRemote, int /*int*/ nChannel );
bool /*bool*/ ISteamNetworking_GetP2PSessionState( ulong steamIDRemote, ref P2PSessionState_t /*struct P2PSessionState_t **/ pConnectionState );
bool /*bool*/ ISteamNetworking_AllowP2PPacketRelay( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllow );
SNetListenSocket_t /*(SNetListenSocket_t)*/ ISteamNetworking_CreateListenSocket( int /*int*/ nVirtualP2PPort, uint /*uint32*/ nIP, ushort /*uint16*/ nPort, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowUseOfPacketRelay );
SNetSocket_t /*(SNetSocket_t)*/ ISteamNetworking_CreateP2PConnectionSocket( ulong steamIDTarget, int /*int*/ nVirtualPort, int /*int*/ nTimeoutSec, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAllowUseOfPacketRelay );
SNetSocket_t /*(SNetSocket_t)*/ ISteamNetworking_CreateConnectionSocket( uint /*uint32*/ nIP, ushort /*uint16*/ nPort, int /*int*/ nTimeoutSec );
bool /*bool*/ ISteamNetworking_DestroySocket( uint hSocket, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bNotifyRemoteEnd );
bool /*bool*/ ISteamNetworking_DestroyListenSocket( uint hSocket, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bNotifyRemoteEnd );
bool /*bool*/ ISteamNetworking_SendDataOnSocket( uint hSocket, IntPtr /*void **/ pubData, uint /*uint32*/ cubData, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bReliable );
bool /*bool*/ ISteamNetworking_IsDataAvailableOnSocket( uint hSocket, out uint /*uint32 **/ pcubMsgSize );
bool /*bool*/ ISteamNetworking_RetrieveDataFromSocket( uint hSocket, IntPtr /*void **/ pubDest, uint /*uint32*/ cubDest, out uint /*uint32 **/ pcubMsgSize );
bool /*bool*/ ISteamNetworking_IsDataAvailable( uint hListenSocket, out uint /*uint32 **/ pcubMsgSize, ref uint phSocket );
bool /*bool*/ ISteamNetworking_RetrieveData( uint hListenSocket, IntPtr /*void **/ pubDest, uint /*uint32*/ cubDest, out uint /*uint32 **/ pcubMsgSize, ref uint phSocket );
bool /*bool*/ ISteamNetworking_GetSocketInfo( uint hSocket, out ulong pSteamIDRemote, IntPtr /*int **/ peSocketStatus, out uint /*uint32 **/ punIPRemote, out ushort /*uint16 **/ punPortRemote );
bool /*bool*/ ISteamNetworking_GetListenSocketInfo( uint hListenSocket, out uint /*uint32 **/ pnIP, out ushort /*uint16 **/ pnPort );
SNetSocketConnectionType /*ESNetSocketConnectionType*/ ISteamNetworking_GetSocketConnectionType( uint hSocket );
int /*int*/ ISteamNetworking_GetMaxPacketSize( uint hSocket );
bool /*bool*/ ISteamParentalSettings_BIsParentalLockEnabled();
bool /*bool*/ ISteamParentalSettings_BIsParentalLockLocked();
bool /*bool*/ ISteamParentalSettings_BIsAppBlocked( uint nAppID );
bool /*bool*/ ISteamParentalSettings_BIsAppInBlockList( uint nAppID );
bool /*bool*/ ISteamParentalSettings_BIsFeatureBlocked( ParentalFeature /*EParentalFeature*/ eFeature );
bool /*bool*/ ISteamParentalSettings_BIsFeatureInBlockList( ParentalFeature /*EParentalFeature*/ eFeature );
bool /*bool*/ ISteamRemoteStorage_FileWrite( string /*const char **/ pchFile, IntPtr /*const void **/ pvData, int /*int32*/ cubData );
int /*int32*/ ISteamRemoteStorage_FileRead( string /*const char **/ pchFile, IntPtr /*void **/ pvData, int /*int32*/ cubDataToRead );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_FileWriteAsync( string /*const char **/ pchFile, IntPtr /*const void **/ pvData, uint /*uint32*/ cubData );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_FileReadAsync( string /*const char **/ pchFile, uint /*uint32*/ nOffset, uint /*uint32*/ cubToRead );
bool /*bool*/ ISteamRemoteStorage_FileReadAsyncComplete( ulong hReadCall, IntPtr /*void **/ pvBuffer, uint /*uint32*/ cubToRead );
bool /*bool*/ ISteamRemoteStorage_FileForget( string /*const char **/ pchFile );
bool /*bool*/ ISteamRemoteStorage_FileDelete( string /*const char **/ pchFile );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_FileShare( string /*const char **/ pchFile );
bool /*bool*/ ISteamRemoteStorage_SetSyncPlatforms( string /*const char **/ pchFile, RemoteStoragePlatform /*ERemoteStoragePlatform*/ eRemoteStoragePlatform );
UGCFileWriteStreamHandle_t /*(UGCFileWriteStreamHandle_t)*/ ISteamRemoteStorage_FileWriteStreamOpen( string /*const char **/ pchFile );
bool /*bool*/ ISteamRemoteStorage_FileWriteStreamWriteChunk( ulong writeHandle, IntPtr /*const void **/ pvData, int /*int32*/ cubData );
bool /*bool*/ ISteamRemoteStorage_FileWriteStreamClose( ulong writeHandle );
bool /*bool*/ ISteamRemoteStorage_FileWriteStreamCancel( ulong writeHandle );
bool /*bool*/ ISteamRemoteStorage_FileExists( string /*const char **/ pchFile );
bool /*bool*/ ISteamRemoteStorage_FilePersisted( string /*const char **/ pchFile );
int /*int32*/ ISteamRemoteStorage_GetFileSize( string /*const char **/ pchFile );
long /*int64*/ ISteamRemoteStorage_GetFileTimestamp( string /*const char **/ pchFile );
RemoteStoragePlatform /*ERemoteStoragePlatform*/ ISteamRemoteStorage_GetSyncPlatforms( string /*const char **/ pchFile );
int /*int32*/ ISteamRemoteStorage_GetFileCount();
IntPtr ISteamRemoteStorage_GetFileNameAndSize( int /*int*/ iFile, out int /*int32 **/ pnFileSizeInBytes );
bool /*bool*/ ISteamRemoteStorage_GetQuota( out ulong /*uint64 **/ pnTotalBytes, out ulong /*uint64 **/ puAvailableBytes );
bool /*bool*/ ISteamRemoteStorage_IsCloudEnabledForAccount();
bool /*bool*/ ISteamRemoteStorage_IsCloudEnabledForApp();
void /*void*/ ISteamRemoteStorage_SetCloudEnabledForApp( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bEnabled );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_UGCDownload( ulong hContent, uint /*uint32*/ unPriority );
bool /*bool*/ ISteamRemoteStorage_GetUGCDownloadProgress( ulong hContent, out int /*int32 **/ pnBytesDownloaded, out int /*int32 **/ pnBytesExpected );
bool /*bool*/ ISteamRemoteStorage_GetUGCDetails( ulong hContent, ref uint pnAppID, System.Text.StringBuilder /*char ***/ ppchName, out int /*int32 **/ pnFileSizeInBytes, out ulong pSteamIDOwner );
int /*int32*/ ISteamRemoteStorage_UGCRead( ulong hContent, IntPtr /*void **/ pvData, int /*int32*/ cubDataToRead, uint /*uint32*/ cOffset, UGCReadAction /*EUGCReadAction*/ eAction );
int /*int32*/ ISteamRemoteStorage_GetCachedUGCCount();
UGCHandle_t /*(UGCHandle_t)*/ ISteamRemoteStorage_GetCachedUGCHandle( int /*int32*/ iCachedContent );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_PublishWorkshopFile( string /*const char **/ pchFile, string /*const char **/ pchPreviewFile, uint nConsumerAppId, string /*const char **/ pchTitle, string /*const char **/ pchDescription, RemoteStoragePublishedFileVisibility /*ERemoteStoragePublishedFileVisibility*/ eVisibility, ref SteamParamStringArray_t /*struct SteamParamStringArray_t **/ pTags, WorkshopFileType /*EWorkshopFileType*/ eWorkshopFileType );
PublishedFileUpdateHandle_t /*(PublishedFileUpdateHandle_t)*/ ISteamRemoteStorage_CreatePublishedFileUpdateRequest( ulong unPublishedFileId );
bool /*bool*/ ISteamRemoteStorage_UpdatePublishedFileFile( ulong updateHandle, string /*const char **/ pchFile );
bool /*bool*/ ISteamRemoteStorage_UpdatePublishedFilePreviewFile( ulong updateHandle, string /*const char **/ pchPreviewFile );
bool /*bool*/ ISteamRemoteStorage_UpdatePublishedFileTitle( ulong updateHandle, string /*const char **/ pchTitle );
bool /*bool*/ ISteamRemoteStorage_UpdatePublishedFileDescription( ulong updateHandle, string /*const char **/ pchDescription );
bool /*bool*/ ISteamRemoteStorage_UpdatePublishedFileVisibility( ulong updateHandle, RemoteStoragePublishedFileVisibility /*ERemoteStoragePublishedFileVisibility*/ eVisibility );
bool /*bool*/ ISteamRemoteStorage_UpdatePublishedFileTags( ulong updateHandle, ref SteamParamStringArray_t /*struct SteamParamStringArray_t **/ pTags );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_CommitPublishedFileUpdate( ulong updateHandle );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_GetPublishedFileDetails( ulong unPublishedFileId, uint /*uint32*/ unMaxSecondsOld );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_DeletePublishedFile( ulong unPublishedFileId );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_EnumerateUserPublishedFiles( uint /*uint32*/ unStartIndex );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_SubscribePublishedFile( ulong unPublishedFileId );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_EnumerateUserSubscribedFiles( uint /*uint32*/ unStartIndex );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_UnsubscribePublishedFile( ulong unPublishedFileId );
bool /*bool*/ ISteamRemoteStorage_UpdatePublishedFileSetChangeDescription( ulong updateHandle, string /*const char **/ pchChangeDescription );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_GetPublishedItemVoteDetails( ulong unPublishedFileId );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_UpdateUserPublishedItemVote( ulong unPublishedFileId, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bVoteUp );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_GetUserPublishedItemVoteDetails( ulong unPublishedFileId );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_EnumerateUserSharedWorkshopFiles( ulong steamId, uint /*uint32*/ unStartIndex, ref SteamParamStringArray_t /*struct SteamParamStringArray_t **/ pRequiredTags, ref SteamParamStringArray_t /*struct SteamParamStringArray_t **/ pExcludedTags );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_PublishVideo( WorkshopVideoProvider /*EWorkshopVideoProvider*/ eVideoProvider, string /*const char **/ pchVideoAccount, string /*const char **/ pchVideoIdentifier, string /*const char **/ pchPreviewFile, uint nConsumerAppId, string /*const char **/ pchTitle, string /*const char **/ pchDescription, RemoteStoragePublishedFileVisibility /*ERemoteStoragePublishedFileVisibility*/ eVisibility, ref SteamParamStringArray_t /*struct SteamParamStringArray_t **/ pTags );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_SetUserPublishedFileAction( ulong unPublishedFileId, WorkshopFileAction /*EWorkshopFileAction*/ eAction );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_EnumeratePublishedFilesByUserAction( WorkshopFileAction /*EWorkshopFileAction*/ eAction, uint /*uint32*/ unStartIndex );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_EnumeratePublishedWorkshopFiles( WorkshopEnumerationType /*EWorkshopEnumerationType*/ eEnumerationType, uint /*uint32*/ unStartIndex, uint /*uint32*/ unCount, uint /*uint32*/ unDays, ref SteamParamStringArray_t /*struct SteamParamStringArray_t **/ pTags, ref SteamParamStringArray_t /*struct SteamParamStringArray_t **/ pUserTags );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamRemoteStorage_UGCDownloadToLocation( ulong hContent, string /*const char **/ pchLocation, uint /*uint32*/ unPriority );
ScreenshotHandle /*(ScreenshotHandle)*/ ISteamScreenshots_WriteScreenshot( IntPtr /*void **/ pubRGB, uint /*uint32*/ cubRGB, int /*int*/ nWidth, int /*int*/ nHeight );
ScreenshotHandle /*(ScreenshotHandle)*/ ISteamScreenshots_AddScreenshotToLibrary( string /*const char **/ pchFilename, string /*const char **/ pchThumbnailFilename, int /*int*/ nWidth, int /*int*/ nHeight );
void /*void*/ ISteamScreenshots_TriggerScreenshot();
void /*void*/ ISteamScreenshots_HookScreenshots( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bHook );
bool /*bool*/ ISteamScreenshots_SetLocation( uint hScreenshot, string /*const char **/ pchLocation );
bool /*bool*/ ISteamScreenshots_TagUser( uint hScreenshot, ulong steamID );
bool /*bool*/ ISteamScreenshots_TagPublishedFile( uint hScreenshot, ulong unPublishedFileID );
bool /*bool*/ ISteamScreenshots_IsScreenshotsHooked();
ScreenshotHandle /*(ScreenshotHandle)*/ ISteamScreenshots_AddVRScreenshotToLibrary( VRScreenshotType /*EVRScreenshotType*/ eType, string /*const char **/ pchFilename, string /*const char **/ pchVRFilename );
UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryUserUGCRequest( uint unAccountID, UserUGCList /*EUserUGCList*/ eListType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingUGCType, UserUGCListSortOrder /*EUserUGCListSortOrder*/ eSortOrder, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage );
UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryAllUGCRequest( UGCQuery /*EUGCQuery*/ eQueryType, UGCMatchingUGCType /*EUGCMatchingUGCType*/ eMatchingeMatchingUGCTypeFileType, uint nCreatorAppID, uint nConsumerAppID, uint /*uint32*/ unPage );
UGCQueryHandle_t /*(UGCQueryHandle_t)*/ ISteamUGC_CreateQueryUGCDetailsRequest( IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ unNumPublishedFileIDs );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_SendQueryUGCRequest( ulong handle );
bool /*bool*/ ISteamUGC_GetQueryUGCResult( ulong handle, uint /*uint32*/ index, ref SteamUGCDetails_t /*struct SteamUGCDetails_t **/ pDetails );
bool /*bool*/ ISteamUGC_GetQueryUGCPreviewURL( ulong handle, uint /*uint32*/ index, System.Text.StringBuilder /*char **/ pchURL, uint /*uint32*/ cchURLSize );
bool /*bool*/ ISteamUGC_GetQueryUGCMetadata( ulong handle, uint /*uint32*/ index, System.Text.StringBuilder /*char **/ pchMetadata, uint /*uint32*/ cchMetadatasize );
bool /*bool*/ ISteamUGC_GetQueryUGCChildren( ulong handle, uint /*uint32*/ index, IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ cMaxEntries );
bool /*bool*/ ISteamUGC_GetQueryUGCStatistic( ulong handle, uint /*uint32*/ index, ItemStatistic /*EItemStatistic*/ eStatType, out ulong /*uint64 **/ pStatValue );
uint /*uint32*/ ISteamUGC_GetQueryUGCNumAdditionalPreviews( ulong handle, uint /*uint32*/ index );
bool /*bool*/ ISteamUGC_GetQueryUGCAdditionalPreview( ulong handle, uint /*uint32*/ index, uint /*uint32*/ previewIndex, System.Text.StringBuilder /*char **/ pchURLOrVideoID, uint /*uint32*/ cchURLSize, System.Text.StringBuilder /*char **/ pchOriginalFileName, uint /*uint32*/ cchOriginalFileNameSize, out ItemPreviewType /*EItemPreviewType **/ pPreviewType );
uint /*uint32*/ ISteamUGC_GetQueryUGCNumKeyValueTags( ulong handle, uint /*uint32*/ index );
bool /*bool*/ ISteamUGC_GetQueryUGCKeyValueTag( ulong handle, uint /*uint32*/ index, uint /*uint32*/ keyValueTagIndex, System.Text.StringBuilder /*char **/ pchKey, uint /*uint32*/ cchKeySize, System.Text.StringBuilder /*char **/ pchValue, uint /*uint32*/ cchValueSize );
bool /*bool*/ ISteamUGC_ReleaseQueryUGCRequest( ulong handle );
bool /*bool*/ ISteamUGC_AddRequiredTag( ulong handle, string /*const char **/ pTagName );
bool /*bool*/ ISteamUGC_AddExcludedTag( ulong handle, string /*const char **/ pTagName );
bool /*bool*/ ISteamUGC_SetReturnOnlyIDs( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bReturnOnlyIDs );
bool /*bool*/ ISteamUGC_SetReturnKeyValueTags( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bReturnKeyValueTags );
bool /*bool*/ ISteamUGC_SetReturnLongDescription( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bReturnLongDescription );
bool /*bool*/ ISteamUGC_SetReturnMetadata( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bReturnMetadata );
bool /*bool*/ ISteamUGC_SetReturnChildren( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bReturnChildren );
bool /*bool*/ ISteamUGC_SetReturnAdditionalPreviews( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bReturnAdditionalPreviews );
bool /*bool*/ ISteamUGC_SetReturnTotalOnly( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bReturnTotalOnly );
bool /*bool*/ ISteamUGC_SetReturnPlaytimeStats( ulong handle, uint /*uint32*/ unDays );
bool /*bool*/ ISteamUGC_SetLanguage( ulong handle, string /*const char **/ pchLanguage );
bool /*bool*/ ISteamUGC_SetAllowCachedResponse( ulong handle, uint /*uint32*/ unMaxAgeSeconds );
bool /*bool*/ ISteamUGC_SetCloudFileNameFilter( ulong handle, string /*const char **/ pMatchCloudFileName );
bool /*bool*/ ISteamUGC_SetMatchAnyTag( ulong handle, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bMatchAnyTag );
bool /*bool*/ ISteamUGC_SetSearchText( ulong handle, string /*const char **/ pSearchText );
bool /*bool*/ ISteamUGC_SetRankedByTrendDays( ulong handle, uint /*uint32*/ unDays );
bool /*bool*/ ISteamUGC_AddRequiredKeyValueTag( ulong handle, string /*const char **/ pKey, string /*const char **/ pValue );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_RequestUGCDetails( ulong nPublishedFileID, uint /*uint32*/ unMaxAgeSeconds );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_CreateItem( uint nConsumerAppId, WorkshopFileType /*EWorkshopFileType*/ eFileType );
UGCUpdateHandle_t /*(UGCUpdateHandle_t)*/ ISteamUGC_StartItemUpdate( uint nConsumerAppId, ulong nPublishedFileID );
bool /*bool*/ ISteamUGC_SetItemTitle( ulong handle, string /*const char **/ pchTitle );
bool /*bool*/ ISteamUGC_SetItemDescription( ulong handle, string /*const char **/ pchDescription );
bool /*bool*/ ISteamUGC_SetItemUpdateLanguage( ulong handle, string /*const char **/ pchLanguage );
bool /*bool*/ ISteamUGC_SetItemMetadata( ulong handle, string /*const char **/ pchMetaData );
bool /*bool*/ ISteamUGC_SetItemVisibility( ulong handle, RemoteStoragePublishedFileVisibility /*ERemoteStoragePublishedFileVisibility*/ eVisibility );
bool /*bool*/ ISteamUGC_SetItemTags( ulong updateHandle, ref SteamParamStringArray_t /*const struct SteamParamStringArray_t **/ pTags );
bool /*bool*/ ISteamUGC_SetItemContent( ulong handle, string /*const char **/ pszContentFolder );
bool /*bool*/ ISteamUGC_SetItemPreview( ulong handle, string /*const char **/ pszPreviewFile );
bool /*bool*/ ISteamUGC_RemoveItemKeyValueTags( ulong handle, string /*const char **/ pchKey );
bool /*bool*/ ISteamUGC_AddItemKeyValueTag( ulong handle, string /*const char **/ pchKey, string /*const char **/ pchValue );
bool /*bool*/ ISteamUGC_AddItemPreviewFile( ulong handle, string /*const char **/ pszPreviewFile, ItemPreviewType /*EItemPreviewType*/ type );
bool /*bool*/ ISteamUGC_AddItemPreviewVideo( ulong handle, string /*const char **/ pszVideoID );
bool /*bool*/ ISteamUGC_UpdateItemPreviewFile( ulong handle, uint /*uint32*/ index, string /*const char **/ pszPreviewFile );
bool /*bool*/ ISteamUGC_UpdateItemPreviewVideo( ulong handle, uint /*uint32*/ index, string /*const char **/ pszVideoID );
bool /*bool*/ ISteamUGC_RemoveItemPreview( ulong handle, uint /*uint32*/ index );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_SubmitItemUpdate( ulong handle, string /*const char **/ pchChangeNote );
ItemUpdateStatus /*EItemUpdateStatus*/ ISteamUGC_GetItemUpdateProgress( ulong handle, out ulong /*uint64 **/ punBytesProcessed, out ulong /*uint64 **/ punBytesTotal );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_SetUserItemVote( ulong nPublishedFileID, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bVoteUp );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_GetUserItemVote( ulong nPublishedFileID );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_AddItemToFavorites( uint nAppId, ulong nPublishedFileID );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_RemoveItemFromFavorites( uint nAppId, ulong nPublishedFileID );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_SubscribeItem( ulong nPublishedFileID );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_UnsubscribeItem( ulong nPublishedFileID );
uint /*uint32*/ ISteamUGC_GetNumSubscribedItems();
uint /*uint32*/ ISteamUGC_GetSubscribedItems( IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ cMaxEntries );
uint /*uint32*/ ISteamUGC_GetItemState( ulong nPublishedFileID );
bool /*bool*/ ISteamUGC_GetItemInstallInfo( ulong nPublishedFileID, out ulong /*uint64 **/ punSizeOnDisk, System.Text.StringBuilder /*char **/ pchFolder, uint /*uint32*/ cchFolderSize, out uint /*uint32 **/ punTimeStamp );
bool /*bool*/ ISteamUGC_GetItemDownloadInfo( ulong nPublishedFileID, out ulong /*uint64 **/ punBytesDownloaded, out ulong /*uint64 **/ punBytesTotal );
bool /*bool*/ ISteamUGC_DownloadItem( ulong nPublishedFileID, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bHighPriority );
bool /*bool*/ ISteamUGC_BInitWorkshopForGameServer( uint unWorkshopDepotID, string /*const char **/ pszFolder );
void /*void*/ ISteamUGC_SuspendDownloads( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bSuspend );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_StartPlaytimeTracking( IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ unNumPublishedFileIDs );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_StopPlaytimeTracking( IntPtr /*PublishedFileId_t **/ pvecPublishedFileID, uint /*uint32*/ unNumPublishedFileIDs );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_StopPlaytimeTrackingForAllItems();
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_AddDependency( ulong nParentPublishedFileID, ulong nChildPublishedFileID );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_RemoveDependency( ulong nParentPublishedFileID, ulong nChildPublishedFileID );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_AddAppDependency( ulong nPublishedFileID, uint nAppID );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_RemoveAppDependency( ulong nPublishedFileID, uint nAppID );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_GetAppDependencies( ulong nPublishedFileID );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUGC_DeleteItem( ulong nPublishedFileID );
HSteamUser /*(HSteamUser)*/ ISteamUser_GetHSteamUser();
bool /*bool*/ ISteamUser_BLoggedOn();
CSteamID /*(class CSteamID)*/ ISteamUser_GetSteamID();
int /*int*/ ISteamUser_InitiateGameConnection( IntPtr /*void **/ pAuthBlob, int /*int*/ cbMaxAuthBlob, ulong steamIDGameServer, uint /*uint32*/ unIPServer, ushort /*uint16*/ usPortServer, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bSecure );
void /*void*/ ISteamUser_TerminateGameConnection( uint /*uint32*/ unIPServer, ushort /*uint16*/ usPortServer );
void /*void*/ ISteamUser_TrackAppUsageEvent( ulong gameID, int /*int*/ eAppUsageEvent, string /*const char **/ pchExtraInfo );
bool /*bool*/ ISteamUser_GetUserDataFolder( System.Text.StringBuilder /*char **/ pchBuffer, int /*int*/ cubBuffer );
void /*void*/ ISteamUser_StartVoiceRecording();
void /*void*/ ISteamUser_StopVoiceRecording();
VoiceResult /*EVoiceResult*/ ISteamUser_GetAvailableVoice( out uint /*uint32 **/ pcbCompressed, out uint /*uint32 **/ pcbUncompressed_Deprecated, uint /*uint32*/ nUncompressedVoiceDesiredSampleRate_Deprecated );
VoiceResult /*EVoiceResult*/ ISteamUser_GetVoice( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bWantCompressed, IntPtr /*void **/ pDestBuffer, uint /*uint32*/ cbDestBufferSize, out uint /*uint32 **/ nBytesWritten, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bWantUncompressed_Deprecated, IntPtr /*void **/ pUncompressedDestBuffer_Deprecated, uint /*uint32*/ cbUncompressedDestBufferSize_Deprecated, out uint /*uint32 **/ nUncompressBytesWritten_Deprecated, uint /*uint32*/ nUncompressedVoiceDesiredSampleRate_Deprecated );
VoiceResult /*EVoiceResult*/ ISteamUser_DecompressVoice( IntPtr /*const void **/ pCompressed, uint /*uint32*/ cbCompressed, IntPtr /*void **/ pDestBuffer, uint /*uint32*/ cbDestBufferSize, out uint /*uint32 **/ nBytesWritten, uint /*uint32*/ nDesiredSampleRate );
uint /*uint32*/ ISteamUser_GetVoiceOptimalSampleRate();
HAuthTicket /*(HAuthTicket)*/ ISteamUser_GetAuthSessionTicket( IntPtr /*void **/ pTicket, int /*int*/ cbMaxTicket, out uint /*uint32 **/ pcbTicket );
BeginAuthSessionResult /*EBeginAuthSessionResult*/ ISteamUser_BeginAuthSession( IntPtr /*const void **/ pAuthTicket, int /*int*/ cbAuthTicket, ulong steamID );
void /*void*/ ISteamUser_EndAuthSession( ulong steamID );
void /*void*/ ISteamUser_CancelAuthTicket( uint hAuthTicket );
UserHasLicenseForAppResult /*EUserHasLicenseForAppResult*/ ISteamUser_UserHasLicenseForApp( ulong steamID, uint appID );
bool /*bool*/ ISteamUser_BIsBehindNAT();
void /*void*/ ISteamUser_AdvertiseGame( ulong steamIDGameServer, uint /*uint32*/ unIPServer, ushort /*uint16*/ usPortServer );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUser_RequestEncryptedAppTicket( IntPtr /*void **/ pDataToInclude, int /*int*/ cbDataToInclude );
bool /*bool*/ ISteamUser_GetEncryptedAppTicket( IntPtr /*void **/ pTicket, int /*int*/ cbMaxTicket, out uint /*uint32 **/ pcbTicket );
int /*int*/ ISteamUser_GetGameBadgeLevel( int /*int*/ nSeries, [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bFoil );
int /*int*/ ISteamUser_GetPlayerSteamLevel();
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUser_RequestStoreAuthURL( string /*const char **/ pchRedirectURL );
bool /*bool*/ ISteamUser_BIsPhoneVerified();
bool /*bool*/ ISteamUser_BIsTwoFactorEnabled();
bool /*bool*/ ISteamUser_BIsPhoneIdentifying();
bool /*bool*/ ISteamUser_BIsPhoneRequiringVerification();
bool /*bool*/ ISteamUserStats_RequestCurrentStats();
bool /*bool*/ ISteamUserStats_GetStat( string /*const char **/ pchName, out int /*int32 **/ pData );
bool /*bool*/ ISteamUserStats_GetStat0( string /*const char **/ pchName, out float /*float **/ pData );
bool /*bool*/ ISteamUserStats_SetStat( string /*const char **/ pchName, int /*int32*/ nData );
bool /*bool*/ ISteamUserStats_SetStat0( string /*const char **/ pchName, float /*float*/ fData );
bool /*bool*/ ISteamUserStats_UpdateAvgRateStat( string /*const char **/ pchName, float /*float*/ flCountThisSession, double /*double*/ dSessionLength );
bool /*bool*/ ISteamUserStats_GetAchievement( string /*const char **/ pchName, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbAchieved );
bool /*bool*/ ISteamUserStats_SetAchievement( string /*const char **/ pchName );
bool /*bool*/ ISteamUserStats_ClearAchievement( string /*const char **/ pchName );
bool /*bool*/ ISteamUserStats_GetAchievementAndUnlockTime( string /*const char **/ pchName, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbAchieved, out uint /*uint32 **/ punUnlockTime );
bool /*bool*/ ISteamUserStats_StoreStats();
int /*int*/ ISteamUserStats_GetAchievementIcon( string /*const char **/ pchName );
IntPtr ISteamUserStats_GetAchievementDisplayAttribute( string /*const char **/ pchName, string /*const char **/ pchKey );
bool /*bool*/ ISteamUserStats_IndicateAchievementProgress( string /*const char **/ pchName, uint /*uint32*/ nCurProgress, uint /*uint32*/ nMaxProgress );
uint /*uint32*/ ISteamUserStats_GetNumAchievements();
IntPtr ISteamUserStats_GetAchievementName( uint /*uint32*/ iAchievement );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUserStats_RequestUserStats( ulong steamIDUser );
bool /*bool*/ ISteamUserStats_GetUserStat( ulong steamIDUser, string /*const char **/ pchName, out int /*int32 **/ pData );
bool /*bool*/ ISteamUserStats_GetUserStat0( ulong steamIDUser, string /*const char **/ pchName, out float /*float **/ pData );
bool /*bool*/ ISteamUserStats_GetUserAchievement( ulong steamIDUser, string /*const char **/ pchName, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbAchieved );
bool /*bool*/ ISteamUserStats_GetUserAchievementAndUnlockTime( ulong steamIDUser, string /*const char **/ pchName, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbAchieved, out uint /*uint32 **/ punUnlockTime );
bool /*bool*/ ISteamUserStats_ResetAllStats( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bAchievementsToo );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUserStats_FindOrCreateLeaderboard( string /*const char **/ pchLeaderboardName, LeaderboardSortMethod /*ELeaderboardSortMethod*/ eLeaderboardSortMethod, LeaderboardDisplayType /*ELeaderboardDisplayType*/ eLeaderboardDisplayType );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUserStats_FindLeaderboard( string /*const char **/ pchLeaderboardName );
IntPtr ISteamUserStats_GetLeaderboardName( ulong hSteamLeaderboard );
int /*int*/ ISteamUserStats_GetLeaderboardEntryCount( ulong hSteamLeaderboard );
LeaderboardSortMethod /*ELeaderboardSortMethod*/ ISteamUserStats_GetLeaderboardSortMethod( ulong hSteamLeaderboard );
LeaderboardDisplayType /*ELeaderboardDisplayType*/ ISteamUserStats_GetLeaderboardDisplayType( ulong hSteamLeaderboard );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUserStats_DownloadLeaderboardEntries( ulong hSteamLeaderboard, LeaderboardDataRequest /*ELeaderboardDataRequest*/ eLeaderboardDataRequest, int /*int*/ nRangeStart, int /*int*/ nRangeEnd );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUserStats_DownloadLeaderboardEntriesForUsers( ulong hSteamLeaderboard, IntPtr /*class CSteamID **/ prgUsers, int /*int*/ cUsers );
bool /*bool*/ ISteamUserStats_GetDownloadedLeaderboardEntry( ulong hSteamLeaderboardEntries, int /*int*/ index, ref LeaderboardEntry_t /*struct LeaderboardEntry_t **/ pLeaderboardEntry, IntPtr /*int32 **/ pDetails, int /*int*/ cDetailsMax );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUserStats_UploadLeaderboardScore( ulong hSteamLeaderboard, LeaderboardUploadScoreMethod /*ELeaderboardUploadScoreMethod*/ eLeaderboardUploadScoreMethod, int /*int32*/ nScore, int[] /*const int32 **/ pScoreDetails, int /*int*/ cScoreDetailsCount );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUserStats_AttachLeaderboardUGC( ulong hSteamLeaderboard, ulong hUGC );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUserStats_GetNumberOfCurrentPlayers();
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUserStats_RequestGlobalAchievementPercentages();
int /*int*/ ISteamUserStats_GetMostAchievedAchievementInfo( System.Text.StringBuilder /*char **/ pchName, uint /*uint32*/ unNameBufLen, out float /*float **/ pflPercent, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbAchieved );
int /*int*/ ISteamUserStats_GetNextMostAchievedAchievementInfo( int /*int*/ iIteratorPrevious, System.Text.StringBuilder /*char **/ pchName, uint /*uint32*/ unNameBufLen, out float /*float **/ pflPercent, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbAchieved );
bool /*bool*/ ISteamUserStats_GetAchievementAchievedPercent( string /*const char **/ pchName, out float /*float **/ pflPercent );
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUserStats_RequestGlobalStats( int /*int*/ nHistoryDays );
bool /*bool*/ ISteamUserStats_GetGlobalStat( string /*const char **/ pchStatName, out long /*int64 **/ pData );
bool /*bool*/ ISteamUserStats_GetGlobalStat0( string /*const char **/ pchStatName, out double /*double **/ pData );
int /*int32*/ ISteamUserStats_GetGlobalStatHistory( string /*const char **/ pchStatName, out long /*int64 **/ pData, uint /*uint32*/ cubData );
int /*int32*/ ISteamUserStats_GetGlobalStatHistory0( string /*const char **/ pchStatName, out double /*double **/ pData, uint /*uint32*/ cubData );
uint /*uint32*/ ISteamUtils_GetSecondsSinceAppActive();
uint /*uint32*/ ISteamUtils_GetSecondsSinceComputerActive();
Universe /*EUniverse*/ ISteamUtils_GetConnectedUniverse();
uint /*uint32*/ ISteamUtils_GetServerRealTime();
IntPtr ISteamUtils_GetIPCountry();
bool /*bool*/ ISteamUtils_GetImageSize( int /*int*/ iImage, out uint /*uint32 **/ pnWidth, out uint /*uint32 **/ pnHeight );
bool /*bool*/ ISteamUtils_GetImageRGBA( int /*int*/ iImage, IntPtr /*uint8 **/ pubDest, int /*int*/ nDestBufferSize );
bool /*bool*/ ISteamUtils_GetCSERIPPort( out uint /*uint32 **/ unIP, out ushort /*uint16 **/ usPort );
byte /*uint8*/ ISteamUtils_GetCurrentBatteryPower();
uint /*uint32*/ ISteamUtils_GetAppID();
void /*void*/ ISteamUtils_SetOverlayNotificationPosition( NotificationPosition /*ENotificationPosition*/ eNotificationPosition );
bool /*bool*/ ISteamUtils_IsAPICallCompleted( ulong hSteamAPICall, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbFailed );
SteamAPICallFailure /*ESteamAPICallFailure*/ ISteamUtils_GetAPICallFailureReason( ulong hSteamAPICall );
bool /*bool*/ ISteamUtils_GetAPICallResult( ulong hSteamAPICall, IntPtr /*void **/ pCallback, int /*int*/ cubCallback, int /*int*/ iCallbackExpected, [MarshalAs(UnmanagedType.U1)] ref bool /*bool **/ pbFailed );
uint /*uint32*/ ISteamUtils_GetIPCCallCount();
void /*void*/ ISteamUtils_SetWarningMessageHook( IntPtr /*SteamAPIWarningMessageHook_t*/ pFunction );
bool /*bool*/ ISteamUtils_IsOverlayEnabled();
bool /*bool*/ ISteamUtils_BOverlayNeedsPresent();
SteamAPICall_t /*(SteamAPICall_t)*/ ISteamUtils_CheckFileSignature( string /*const char **/ szFileName );
bool /*bool*/ ISteamUtils_ShowGamepadTextInput( GamepadTextInputMode /*EGamepadTextInputMode*/ eInputMode, GamepadTextInputLineMode /*EGamepadTextInputLineMode*/ eLineInputMode, string /*const char **/ pchDescription, uint /*uint32*/ unCharMax, string /*const char **/ pchExistingText );
uint /*uint32*/ ISteamUtils_GetEnteredGamepadTextLength();
bool /*bool*/ ISteamUtils_GetEnteredGamepadTextInput( System.Text.StringBuilder /*char **/ pchText, uint /*uint32*/ cchText );
IntPtr ISteamUtils_GetSteamUILanguage();
bool /*bool*/ ISteamUtils_IsSteamRunningInVR();
void /*void*/ ISteamUtils_SetOverlayNotificationInset( int /*int*/ nHorizontalInset, int /*int*/ nVerticalInset );
bool /*bool*/ ISteamUtils_IsSteamInBigPictureMode();
void /*void*/ ISteamUtils_StartVRDashboard();
bool /*bool*/ ISteamUtils_IsVRHeadsetStreamingEnabled();
void /*void*/ ISteamUtils_SetVRHeadsetStreamingEnabled( [MarshalAs(UnmanagedType.U1)] bool /*bool*/ bEnabled );
void /*void*/ ISteamVideo_GetVideoURL( uint unVideoAppID );
bool /*bool*/ ISteamVideo_IsBroadcasting( IntPtr /*int **/ pnNumViewers );
void /*void*/ ISteamVideo_GetOPFSettings( uint unVideoAppID );
bool /*bool*/ ISteamVideo_GetOPFStringForApp( uint unVideoAppID, System.Text.StringBuilder /*char **/ pchBuffer, out int /*int32 **/ pnBufferSize );
bool /*bool*/ SteamApi_SteamAPI_Init();
void /*void*/ SteamApi_SteamAPI_RunCallbacks();
void /*void*/ SteamApi_SteamGameServer_RunCallbacks();
void /*void*/ SteamApi_SteamAPI_RegisterCallback( IntPtr /*void **/ pCallback, int /*int*/ callback );
void /*void*/ SteamApi_SteamAPI_UnregisterCallback( IntPtr /*void **/ pCallback );
void /*void*/ SteamApi_SteamAPI_RegisterCallResult( IntPtr /*void **/ pCallback, ulong callback );
void /*void*/ SteamApi_SteamAPI_UnregisterCallResult( IntPtr /*void **/ pCallback, ulong callback );
bool /*bool*/ SteamApi_SteamInternal_GameServer_Init( uint /*uint32*/ unIP, ushort /*uint16*/ usPort, ushort /*uint16*/ usGamePort, ushort /*uint16*/ usQueryPort, int /*int*/ eServerMode, string /*const char **/ pchVersionString );
void /*void*/ SteamApi_SteamAPI_Shutdown();
void /*void*/ SteamApi_SteamGameServer_Shutdown();
HSteamUser /*(HSteamUser)*/ SteamApi_SteamAPI_GetHSteamUser();
HSteamPipe /*(HSteamPipe)*/ SteamApi_SteamAPI_GetHSteamPipe();
HSteamUser /*(HSteamUser)*/ SteamApi_SteamGameServer_GetHSteamUser();
HSteamPipe /*(HSteamPipe)*/ SteamApi_SteamGameServer_GetHSteamPipe();
IntPtr /*void **/ SteamApi_SteamInternal_CreateInterface( string /*const char **/ version );
bool /*bool*/ SteamApi_SteamAPI_RestartAppIfNecessary( uint /*uint32*/ unOwnAppID );
}
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,113 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
namespace Facepunch.Steamworks
{
public enum OperatingSystem
{
Unset,
Windows,
Linux,
macOS,
}
public enum Architecture
{
Unset,
x86,
x64
}
}
namespace SteamNative
{
internal static partial class Platform
{
private static Facepunch.Steamworks.OperatingSystem _os;
private static Facepunch.Steamworks.Architecture _arch;
public static Facepunch.Steamworks.OperatingSystem RunningPlatform()
{
switch (Environment.OSVersion.Platform)
{
case PlatformID.Unix:
// macOS sometimes reports to .NET as Unix. Fix is to check against macOS root folders
if (Directory.Exists("/Applications") && Directory.Exists("/System") && Directory.Exists("/Users") && Directory.Exists("/Volumes"))
return Facepunch.Steamworks.OperatingSystem.macOS;
else
return Facepunch.Steamworks.OperatingSystem.Linux;
case PlatformID.MacOSX:
return Facepunch.Steamworks.OperatingSystem.macOS;
default:
return Facepunch.Steamworks.OperatingSystem.Windows;
}
}
internal static Facepunch.Steamworks.OperatingSystem Os
{
get
{
//
// Work out our platform
//
if ( _os == Facepunch.Steamworks.OperatingSystem.Unset )
{
_os = Facepunch.Steamworks.OperatingSystem.Windows;
#if !NET_CORE
// Fixed Bet
_os = RunningPlatform();
#endif
}
return _os;
}
set
{
_os = value;
}
}
internal static Facepunch.Steamworks.Architecture Arch
{
get
{
//
// Work out whether we're 64bit or 32bit
//
if ( _arch == Facepunch.Steamworks.Architecture.Unset )
{
if ( IntPtr.Size == 8 )
_arch = Facepunch.Steamworks.Architecture.x64;
else if ( IntPtr.Size == 4 )
_arch = Facepunch.Steamworks.Architecture.x86;
else
throw new System.Exception( "Unsupported Architecture!" );
}
return _arch;
}
set
{
_arch = value;
}
}
public static bool IsWindows { get { return Os == Facepunch.Steamworks.OperatingSystem.Windows; } }
public static bool IsWindows64 { get { return Arch == Facepunch.Steamworks.Architecture.x64 && IsWindows; } }
public static bool IsWindows32 { get { return Arch == Facepunch.Steamworks.Architecture.x86 && IsWindows; } }
public static bool IsLinux64 { get { return Arch == Facepunch.Steamworks.Architecture.x64 && Os == Facepunch.Steamworks.OperatingSystem.Linux; } }
public static bool IsLinux32 { get { return Arch == Facepunch.Steamworks.Architecture.x86 && Os == Facepunch.Steamworks.OperatingSystem.Linux; } }
public static bool IsOsx { get { return Os == Facepunch.Steamworks.OperatingSystem.macOS; } }
/// <summary>
/// We're only Pack = 8 on Windows
/// </summary>
public static bool PackSmall { get { return Os != Facepunch.Steamworks.OperatingSystem.Windows; } }
}
}
@@ -0,0 +1,141 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamApi : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamApi()
{
if ( Platform.IsWindows64 ) platform = new Platform.Win64( ((IntPtr)1) );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( ((IntPtr)1) );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( ((IntPtr)1) );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( ((IntPtr)1) );
else if ( Platform.IsOsx ) platform = new Platform.Mac( ((IntPtr)1) );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// HSteamPipe
public HSteamPipe SteamAPI_GetHSteamPipe()
{
return platform.SteamApi_SteamAPI_GetHSteamPipe();
}
// HSteamUser
public HSteamUser SteamAPI_GetHSteamUser()
{
return platform.SteamApi_SteamAPI_GetHSteamUser();
}
// bool
public bool SteamAPI_Init()
{
return platform.SteamApi_SteamAPI_Init();
}
// void
public void SteamAPI_RegisterCallback( IntPtr pCallback /*void **/, int callback /*int*/ )
{
platform.SteamApi_SteamAPI_RegisterCallback( (IntPtr) pCallback, callback );
}
// void
public void SteamAPI_RegisterCallResult( IntPtr pCallback /*void **/, SteamAPICall_t callback /*SteamAPICall_t*/ )
{
platform.SteamApi_SteamAPI_RegisterCallResult( (IntPtr) pCallback, callback.Value );
}
// bool
public bool SteamAPI_RestartAppIfNecessary( uint unOwnAppID /*uint32*/ )
{
return platform.SteamApi_SteamAPI_RestartAppIfNecessary( unOwnAppID );
}
// void
public void SteamAPI_RunCallbacks()
{
platform.SteamApi_SteamAPI_RunCallbacks();
}
// void
public void SteamAPI_Shutdown()
{
platform.SteamApi_SteamAPI_Shutdown();
}
// void
public void SteamAPI_UnregisterCallback( IntPtr pCallback /*void **/ )
{
platform.SteamApi_SteamAPI_UnregisterCallback( (IntPtr) pCallback );
}
// void
public void SteamAPI_UnregisterCallResult( IntPtr pCallback /*void **/, SteamAPICall_t callback /*SteamAPICall_t*/ )
{
platform.SteamApi_SteamAPI_UnregisterCallResult( (IntPtr) pCallback, callback.Value );
}
// HSteamPipe
public HSteamPipe SteamGameServer_GetHSteamPipe()
{
return platform.SteamApi_SteamGameServer_GetHSteamPipe();
}
// HSteamUser
public HSteamUser SteamGameServer_GetHSteamUser()
{
return platform.SteamApi_SteamGameServer_GetHSteamUser();
}
// void
public void SteamGameServer_RunCallbacks()
{
platform.SteamApi_SteamGameServer_RunCallbacks();
}
// void
public void SteamGameServer_Shutdown()
{
platform.SteamApi_SteamGameServer_Shutdown();
}
// IntPtr
public IntPtr SteamInternal_CreateInterface( string version /*const char **/ )
{
return platform.SteamApi_SteamInternal_CreateInterface( version );
}
// bool
public bool SteamInternal_GameServer_Init( uint unIP /*uint32*/, ushort usPort /*uint16*/, ushort usGamePort /*uint16*/, ushort usQueryPort /*uint16*/, int eServerMode /*int*/, string pchVersionString /*const char **/ )
{
return platform.SteamApi_SteamInternal_GameServer_Init( unIP, usPort, usGamePort, usQueryPort, eServerMode, pchVersionString );
}
}
}
@@ -0,0 +1,94 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamAppList : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamAppList( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// int
public int GetAppBuildId( AppId_t nAppID /*AppId_t*/ )
{
return platform.ISteamAppList_GetAppBuildId( nAppID.Value );
}
// int
// with: Detect_StringFetch True
public string GetAppInstallDir( AppId_t nAppID /*AppId_t*/ )
{
int bSuccess = default( int );
System.Text.StringBuilder pchDirectory_sb = Helpers.TakeStringBuilder();
int cchNameMax = 4096;
bSuccess = platform.ISteamAppList_GetAppInstallDir( nAppID.Value, pchDirectory_sb, cchNameMax );
if ( bSuccess <= 0 ) return null;
return pchDirectory_sb.ToString();
}
// int
// with: Detect_StringFetch True
public string GetAppName( AppId_t nAppID /*AppId_t*/ )
{
int bSuccess = default( int );
System.Text.StringBuilder pchName_sb = Helpers.TakeStringBuilder();
int cchNameMax = 4096;
bSuccess = platform.ISteamAppList_GetAppName( nAppID.Value, pchName_sb, cchNameMax );
if ( bSuccess <= 0 ) return null;
return pchName_sb.ToString();
}
// with: Detect_VectorReturn
// uint
public uint GetInstalledApps( AppId_t[] pvecAppID /*AppId_t **/ )
{
var unMaxAppIDs = (uint) pvecAppID.Length;
fixed ( AppId_t* pvecAppID_ptr = pvecAppID )
{
return platform.ISteamAppList_GetInstalledApps( (IntPtr) pvecAppID_ptr, unMaxAppIDs );
}
}
// uint
public uint GetNumInstalledApps()
{
return platform.ISteamAppList_GetNumInstalledApps();
}
}
}
@@ -0,0 +1,238 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamApps : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamApps( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// bool
// with: Detect_StringFetch False
public bool BGetDLCDataByIndex( int iDLC /*int*/, ref AppId_t pAppID /*AppId_t **/, ref bool pbAvailable /*bool **/, out string pchName /*char **/ )
{
bool bSuccess = default( bool );
pchName = string.Empty;
System.Text.StringBuilder pchName_sb = Helpers.TakeStringBuilder();
int cchNameBufferSize = 4096;
bSuccess = platform.ISteamApps_BGetDLCDataByIndex( iDLC, ref pAppID.Value, ref pbAvailable, pchName_sb, cchNameBufferSize );
if ( !bSuccess ) return bSuccess;
pchName = pchName_sb.ToString();
return bSuccess;
}
// bool
public bool BIsAppInstalled( AppId_t appID /*AppId_t*/ )
{
return platform.ISteamApps_BIsAppInstalled( appID.Value );
}
// bool
public bool BIsCybercafe()
{
return platform.ISteamApps_BIsCybercafe();
}
// bool
public bool BIsDlcInstalled( AppId_t appID /*AppId_t*/ )
{
return platform.ISteamApps_BIsDlcInstalled( appID.Value );
}
// bool
public bool BIsLowViolence()
{
return platform.ISteamApps_BIsLowViolence();
}
// bool
public bool BIsSubscribed()
{
return platform.ISteamApps_BIsSubscribed();
}
// bool
public bool BIsSubscribedApp( AppId_t appID /*AppId_t*/ )
{
return platform.ISteamApps_BIsSubscribedApp( appID.Value );
}
// bool
public bool BIsSubscribedFromFreeWeekend()
{
return platform.ISteamApps_BIsSubscribedFromFreeWeekend();
}
// bool
public bool BIsVACBanned()
{
return platform.ISteamApps_BIsVACBanned();
}
// int
public int GetAppBuildId()
{
return platform.ISteamApps_GetAppBuildId();
}
// uint
// with: Detect_StringFetch True
public string GetAppInstallDir( AppId_t appID /*AppId_t*/ )
{
uint bSuccess = default( uint );
System.Text.StringBuilder pchFolder_sb = Helpers.TakeStringBuilder();
uint cchFolderBufferSize = 4096;
bSuccess = platform.ISteamApps_GetAppInstallDir( appID.Value, pchFolder_sb, cchFolderBufferSize );
if ( bSuccess <= 0 ) return null;
return pchFolder_sb.ToString();
}
// ulong
public ulong GetAppOwner()
{
return platform.ISteamApps_GetAppOwner();
}
// string
// with: Detect_StringReturn
public string GetAvailableGameLanguages()
{
IntPtr string_pointer;
string_pointer = platform.ISteamApps_GetAvailableGameLanguages();
return Marshal.PtrToStringAnsi( string_pointer );
}
// bool
// with: Detect_StringFetch True
public string GetCurrentBetaName()
{
bool bSuccess = default( bool );
System.Text.StringBuilder pchName_sb = Helpers.TakeStringBuilder();
int cchNameBufferSize = 4096;
bSuccess = platform.ISteamApps_GetCurrentBetaName( pchName_sb, cchNameBufferSize );
if ( !bSuccess ) return null;
return pchName_sb.ToString();
}
// string
// with: Detect_StringReturn
public string GetCurrentGameLanguage()
{
IntPtr string_pointer;
string_pointer = platform.ISteamApps_GetCurrentGameLanguage();
return Marshal.PtrToStringAnsi( string_pointer );
}
// int
public int GetDLCCount()
{
return platform.ISteamApps_GetDLCCount();
}
// bool
public bool GetDlcDownloadProgress( AppId_t nAppID /*AppId_t*/, out ulong punBytesDownloaded /*uint64 **/, out ulong punBytesTotal /*uint64 **/ )
{
return platform.ISteamApps_GetDlcDownloadProgress( nAppID.Value, out punBytesDownloaded, out punBytesTotal );
}
// uint
public uint GetEarliestPurchaseUnixTime( AppId_t nAppID /*AppId_t*/ )
{
return platform.ISteamApps_GetEarliestPurchaseUnixTime( nAppID.Value );
}
// SteamAPICall_t
public CallbackHandle GetFileDetails( string pszFileName /*const char **/, Action<FileDetailsResult_t, bool> CallbackFunction = null /*Action<FileDetailsResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamApps_GetFileDetails( pszFileName );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return FileDetailsResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// uint
public uint GetInstalledDepots( AppId_t appID /*AppId_t*/, IntPtr pvecDepots /*DepotId_t **/, uint cMaxDepots /*uint32*/ )
{
return platform.ISteamApps_GetInstalledDepots( appID.Value, (IntPtr) pvecDepots, cMaxDepots );
}
// string
// with: Detect_StringReturn
public string GetLaunchQueryParam( string pchKey /*const char **/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamApps_GetLaunchQueryParam( pchKey );
return Marshal.PtrToStringAnsi( string_pointer );
}
// void
public void InstallDLC( AppId_t nAppID /*AppId_t*/ )
{
platform.ISteamApps_InstallDLC( nAppID.Value );
}
// bool
public bool MarkContentCorrupt( bool bMissingFilesOnly /*bool*/ )
{
return platform.ISteamApps_MarkContentCorrupt( bMissingFilesOnly );
}
// void
public void RequestAllProofOfPurchaseKeys()
{
platform.ISteamApps_RequestAllProofOfPurchaseKeys();
}
// void
public void RequestAppProofOfPurchaseKey( AppId_t nAppID /*AppId_t*/ )
{
platform.ISteamApps_RequestAppProofOfPurchaseKey( nAppID.Value );
}
// void
public void UninstallDLC( AppId_t nAppID /*AppId_t*/ )
{
platform.ISteamApps_UninstallDLC( nAppID.Value );
}
}
}
@@ -0,0 +1,283 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamClient : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamClient( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// bool
public bool BReleaseSteamPipe( HSteamPipe hSteamPipe /*HSteamPipe*/ )
{
return platform.ISteamClient_BReleaseSteamPipe( hSteamPipe.Value );
}
// bool
public bool BShutdownIfAllPipesClosed()
{
return platform.ISteamClient_BShutdownIfAllPipesClosed();
}
// HSteamUser
public HSteamUser ConnectToGlobalUser( HSteamPipe hSteamPipe /*HSteamPipe*/ )
{
return platform.ISteamClient_ConnectToGlobalUser( hSteamPipe.Value );
}
// HSteamUser
public HSteamUser CreateLocalUser( out HSteamPipe phSteamPipe /*HSteamPipe **/, AccountType eAccountType /*EAccountType*/ )
{
return platform.ISteamClient_CreateLocalUser( out phSteamPipe.Value, eAccountType );
}
// HSteamPipe
public HSteamPipe CreateSteamPipe()
{
return platform.ISteamClient_CreateSteamPipe();
}
// uint
public uint GetIPCCallCount()
{
return platform.ISteamClient_GetIPCCallCount();
}
// ISteamAppList *
public SteamAppList GetISteamAppList( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamAppList( hSteamUser.Value, hSteamPipe.Value, pchVersion );
return new SteamAppList( steamworks, interface_pointer );
}
// ISteamApps *
public SteamApps GetISteamApps( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamApps( hSteamUser.Value, hSteamPipe.Value, pchVersion );
return new SteamApps( steamworks, interface_pointer );
}
// ISteamController *
public SteamController GetISteamController( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamController( hSteamUser.Value, hSteamPipe.Value, pchVersion );
return new SteamController( steamworks, interface_pointer );
}
// ISteamFriends *
public SteamFriends GetISteamFriends( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamFriends( hSteamUser.Value, hSteamPipe.Value, pchVersion );
return new SteamFriends( steamworks, interface_pointer );
}
// ISteamGameServer *
public SteamGameServer GetISteamGameServer( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamGameServer( hSteamUser.Value, hSteamPipe.Value, pchVersion );
return new SteamGameServer( steamworks, interface_pointer );
}
// ISteamGameServerStats *
public SteamGameServerStats GetISteamGameServerStats( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamGameServerStats( hSteamuser.Value, hSteamPipe.Value, pchVersion );
return new SteamGameServerStats( steamworks, interface_pointer );
}
// IntPtr
public IntPtr GetISteamGenericInterface( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
return platform.ISteamClient_GetISteamGenericInterface( hSteamUser.Value, hSteamPipe.Value, pchVersion );
}
// ISteamHTMLSurface *
public SteamHTMLSurface GetISteamHTMLSurface( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamHTMLSurface( hSteamuser.Value, hSteamPipe.Value, pchVersion );
return new SteamHTMLSurface( steamworks, interface_pointer );
}
// ISteamHTTP *
public SteamHTTP GetISteamHTTP( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamHTTP( hSteamuser.Value, hSteamPipe.Value, pchVersion );
return new SteamHTTP( steamworks, interface_pointer );
}
// ISteamInventory *
public SteamInventory GetISteamInventory( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamInventory( hSteamuser.Value, hSteamPipe.Value, pchVersion );
return new SteamInventory( steamworks, interface_pointer );
}
// ISteamMatchmaking *
public SteamMatchmaking GetISteamMatchmaking( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamMatchmaking( hSteamUser.Value, hSteamPipe.Value, pchVersion );
return new SteamMatchmaking( steamworks, interface_pointer );
}
// ISteamMatchmakingServers *
public SteamMatchmakingServers GetISteamMatchmakingServers( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamMatchmakingServers( hSteamUser.Value, hSteamPipe.Value, pchVersion );
return new SteamMatchmakingServers( steamworks, interface_pointer );
}
// ISteamMusic *
public SteamMusic GetISteamMusic( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamMusic( hSteamuser.Value, hSteamPipe.Value, pchVersion );
return new SteamMusic( steamworks, interface_pointer );
}
// ISteamMusicRemote *
public SteamMusicRemote GetISteamMusicRemote( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamMusicRemote( hSteamuser.Value, hSteamPipe.Value, pchVersion );
return new SteamMusicRemote( steamworks, interface_pointer );
}
// ISteamNetworking *
public SteamNetworking GetISteamNetworking( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamNetworking( hSteamUser.Value, hSteamPipe.Value, pchVersion );
return new SteamNetworking( steamworks, interface_pointer );
}
// ISteamParentalSettings *
public SteamParentalSettings GetISteamParentalSettings( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamParentalSettings( hSteamuser.Value, hSteamPipe.Value, pchVersion );
return new SteamParentalSettings( steamworks, interface_pointer );
}
// ISteamRemoteStorage *
public SteamRemoteStorage GetISteamRemoteStorage( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamRemoteStorage( hSteamuser.Value, hSteamPipe.Value, pchVersion );
return new SteamRemoteStorage( steamworks, interface_pointer );
}
// ISteamScreenshots *
public SteamScreenshots GetISteamScreenshots( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamScreenshots( hSteamuser.Value, hSteamPipe.Value, pchVersion );
return new SteamScreenshots( steamworks, interface_pointer );
}
// ISteamUGC *
public SteamUGC GetISteamUGC( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamUGC( hSteamUser.Value, hSteamPipe.Value, pchVersion );
return new SteamUGC( steamworks, interface_pointer );
}
// ISteamUser *
public SteamUser GetISteamUser( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamUser( hSteamUser.Value, hSteamPipe.Value, pchVersion );
return new SteamUser( steamworks, interface_pointer );
}
// ISteamUserStats *
public SteamUserStats GetISteamUserStats( HSteamUser hSteamUser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamUserStats( hSteamUser.Value, hSteamPipe.Value, pchVersion );
return new SteamUserStats( steamworks, interface_pointer );
}
// ISteamUtils *
public SteamUtils GetISteamUtils( HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamUtils( hSteamPipe.Value, pchVersion );
return new SteamUtils( steamworks, interface_pointer );
}
// ISteamVideo *
public SteamVideo GetISteamVideo( HSteamUser hSteamuser /*HSteamUser*/, HSteamPipe hSteamPipe /*HSteamPipe*/, string pchVersion /*const char **/ )
{
IntPtr interface_pointer;
interface_pointer = platform.ISteamClient_GetISteamVideo( hSteamuser.Value, hSteamPipe.Value, pchVersion );
return new SteamVideo( steamworks, interface_pointer );
}
// void
public void ReleaseUser( HSteamPipe hSteamPipe /*HSteamPipe*/, HSteamUser hUser /*HSteamUser*/ )
{
platform.ISteamClient_ReleaseUser( hSteamPipe.Value, hUser.Value );
}
// void
public void SetLocalIPBinding( uint unIP /*uint32*/, ushort usPort /*uint16*/ )
{
platform.ISteamClient_SetLocalIPBinding( unIP, usPort );
}
// void
public void SetWarningMessageHook( IntPtr pFunction /*SteamAPIWarningMessageHook_t*/ )
{
platform.ISteamClient_SetWarningMessageHook( (IntPtr) pFunction );
}
}
}
@@ -0,0 +1,239 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamController : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamController( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// void
public void ActivateActionSet( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerActionSetHandle_t actionSetHandle /*ControllerActionSetHandle_t*/ )
{
platform.ISteamController_ActivateActionSet( controllerHandle.Value, actionSetHandle.Value );
}
// void
public void ActivateActionSetLayer( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerActionSetHandle_t actionSetLayerHandle /*ControllerActionSetHandle_t*/ )
{
platform.ISteamController_ActivateActionSetLayer( controllerHandle.Value, actionSetLayerHandle.Value );
}
// void
public void DeactivateActionSetLayer( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerActionSetHandle_t actionSetLayerHandle /*ControllerActionSetHandle_t*/ )
{
platform.ISteamController_DeactivateActionSetLayer( controllerHandle.Value, actionSetLayerHandle.Value );
}
// void
public void DeactivateAllActionSetLayers( ControllerHandle_t controllerHandle /*ControllerHandle_t*/ )
{
platform.ISteamController_DeactivateAllActionSetLayers( controllerHandle.Value );
}
// ControllerActionSetHandle_t
public ControllerActionSetHandle_t GetActionSetHandle( string pszActionSetName /*const char **/ )
{
return platform.ISteamController_GetActionSetHandle( pszActionSetName );
}
// int
public int GetActiveActionSetLayers( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, IntPtr handlesOut /*ControllerActionSetHandle_t **/ )
{
return platform.ISteamController_GetActiveActionSetLayers( controllerHandle.Value, (IntPtr) handlesOut );
}
// ControllerAnalogActionData_t
public ControllerAnalogActionData_t GetAnalogActionData( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerAnalogActionHandle_t analogActionHandle /*ControllerAnalogActionHandle_t*/ )
{
return platform.ISteamController_GetAnalogActionData( controllerHandle.Value, analogActionHandle.Value );
}
// ControllerAnalogActionHandle_t
public ControllerAnalogActionHandle_t GetAnalogActionHandle( string pszActionName /*const char **/ )
{
return platform.ISteamController_GetAnalogActionHandle( pszActionName );
}
// int
public int GetAnalogActionOrigins( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerActionSetHandle_t actionSetHandle /*ControllerActionSetHandle_t*/, ControllerAnalogActionHandle_t analogActionHandle /*ControllerAnalogActionHandle_t*/, out ControllerActionOrigin originsOut /*EControllerActionOrigin **/ )
{
return platform.ISteamController_GetAnalogActionOrigins( controllerHandle.Value, actionSetHandle.Value, analogActionHandle.Value, out originsOut );
}
// int
public int GetConnectedControllers( IntPtr handlesOut /*ControllerHandle_t **/ )
{
return platform.ISteamController_GetConnectedControllers( (IntPtr) handlesOut );
}
// ControllerHandle_t
public ControllerHandle_t GetControllerForGamepadIndex( int nIndex /*int*/ )
{
return platform.ISteamController_GetControllerForGamepadIndex( nIndex );
}
// ControllerActionSetHandle_t
public ControllerActionSetHandle_t GetCurrentActionSet( ControllerHandle_t controllerHandle /*ControllerHandle_t*/ )
{
return platform.ISteamController_GetCurrentActionSet( controllerHandle.Value );
}
// ControllerDigitalActionData_t
public ControllerDigitalActionData_t GetDigitalActionData( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerDigitalActionHandle_t digitalActionHandle /*ControllerDigitalActionHandle_t*/ )
{
return platform.ISteamController_GetDigitalActionData( controllerHandle.Value, digitalActionHandle.Value );
}
// ControllerDigitalActionHandle_t
public ControllerDigitalActionHandle_t GetDigitalActionHandle( string pszActionName /*const char **/ )
{
return platform.ISteamController_GetDigitalActionHandle( pszActionName );
}
// int
public int GetDigitalActionOrigins( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerActionSetHandle_t actionSetHandle /*ControllerActionSetHandle_t*/, ControllerDigitalActionHandle_t digitalActionHandle /*ControllerDigitalActionHandle_t*/, out ControllerActionOrigin originsOut /*EControllerActionOrigin **/ )
{
return platform.ISteamController_GetDigitalActionOrigins( controllerHandle.Value, actionSetHandle.Value, digitalActionHandle.Value, out originsOut );
}
// int
public int GetGamepadIndexForController( ControllerHandle_t ulControllerHandle /*ControllerHandle_t*/ )
{
return platform.ISteamController_GetGamepadIndexForController( ulControllerHandle.Value );
}
// string
// with: Detect_StringReturn
public string GetGlyphForActionOrigin( ControllerActionOrigin eOrigin /*EControllerActionOrigin*/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamController_GetGlyphForActionOrigin( eOrigin );
return Marshal.PtrToStringAnsi( string_pointer );
}
// SteamInputType
public SteamInputType GetInputTypeForHandle( ControllerHandle_t controllerHandle /*ControllerHandle_t*/ )
{
return platform.ISteamController_GetInputTypeForHandle( controllerHandle.Value );
}
// ControllerMotionData_t
public ControllerMotionData_t GetMotionData( ControllerHandle_t controllerHandle /*ControllerHandle_t*/ )
{
return platform.ISteamController_GetMotionData( controllerHandle.Value );
}
// string
// with: Detect_StringReturn
public string GetStringForActionOrigin( ControllerActionOrigin eOrigin /*EControllerActionOrigin*/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamController_GetStringForActionOrigin( eOrigin );
return Marshal.PtrToStringAnsi( string_pointer );
}
// bool
public bool Init()
{
return platform.ISteamController_Init();
}
// void
public void RunFrame()
{
platform.ISteamController_RunFrame();
}
// void
public void SetLEDColor( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, byte nColorR /*uint8*/, byte nColorG /*uint8*/, byte nColorB /*uint8*/, uint nFlags /*unsigned int*/ )
{
platform.ISteamController_SetLEDColor( controllerHandle.Value, nColorR, nColorG, nColorB, nFlags );
}
// bool
public bool ShowAnalogActionOrigins( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerAnalogActionHandle_t analogActionHandle /*ControllerAnalogActionHandle_t*/, float flScale /*float*/, float flXPosition /*float*/, float flYPosition /*float*/ )
{
return platform.ISteamController_ShowAnalogActionOrigins( controllerHandle.Value, analogActionHandle.Value, flScale, flXPosition, flYPosition );
}
// bool
public bool ShowBindingPanel( ControllerHandle_t controllerHandle /*ControllerHandle_t*/ )
{
return platform.ISteamController_ShowBindingPanel( controllerHandle.Value );
}
// bool
public bool ShowDigitalActionOrigins( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerDigitalActionHandle_t digitalActionHandle /*ControllerDigitalActionHandle_t*/, float flScale /*float*/, float flXPosition /*float*/, float flYPosition /*float*/ )
{
return platform.ISteamController_ShowDigitalActionOrigins( controllerHandle.Value, digitalActionHandle.Value, flScale, flXPosition, flYPosition );
}
// bool
public bool Shutdown()
{
return platform.ISteamController_Shutdown();
}
// void
public void StopAnalogActionMomentum( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ControllerAnalogActionHandle_t eAction /*ControllerAnalogActionHandle_t*/ )
{
platform.ISteamController_StopAnalogActionMomentum( controllerHandle.Value, eAction.Value );
}
// void
public void TriggerHapticPulse( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, SteamControllerPad eTargetPad /*ESteamControllerPad*/, ushort usDurationMicroSec /*unsigned short*/ )
{
platform.ISteamController_TriggerHapticPulse( controllerHandle.Value, eTargetPad, usDurationMicroSec );
}
// void
public void TriggerRepeatedHapticPulse( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, SteamControllerPad eTargetPad /*ESteamControllerPad*/, ushort usDurationMicroSec /*unsigned short*/, ushort usOffMicroSec /*unsigned short*/, ushort unRepeat /*unsigned short*/, uint nFlags /*unsigned int*/ )
{
platform.ISteamController_TriggerRepeatedHapticPulse( controllerHandle.Value, eTargetPad, usDurationMicroSec, usOffMicroSec, unRepeat, nFlags );
}
// void
public void TriggerVibration( ControllerHandle_t controllerHandle /*ControllerHandle_t*/, ushort usLeftSpeed /*unsigned short*/, ushort usRightSpeed /*unsigned short*/ )
{
platform.ISteamController_TriggerVibration( controllerHandle.Value, usLeftSpeed, usRightSpeed );
}
}
}
@@ -0,0 +1,542 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamFriends : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamFriends( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// void
public void ActivateGameOverlay( string pchDialog /*const char **/ )
{
platform.ISteamFriends_ActivateGameOverlay( pchDialog );
}
// void
public void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby /*class CSteamID*/ )
{
platform.ISteamFriends_ActivateGameOverlayInviteDialog( steamIDLobby.Value );
}
// void
public void ActivateGameOverlayToStore( AppId_t nAppID /*AppId_t*/, OverlayToStoreFlag eFlag /*EOverlayToStoreFlag*/ )
{
platform.ISteamFriends_ActivateGameOverlayToStore( nAppID.Value, eFlag );
}
// void
public void ActivateGameOverlayToUser( string pchDialog /*const char **/, CSteamID steamID /*class CSteamID*/ )
{
platform.ISteamFriends_ActivateGameOverlayToUser( pchDialog, steamID.Value );
}
// void
public void ActivateGameOverlayToWebPage( string pchURL /*const char **/ )
{
platform.ISteamFriends_ActivateGameOverlayToWebPage( pchURL );
}
// void
public void ClearRichPresence()
{
platform.ISteamFriends_ClearRichPresence();
}
// bool
public bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat /*class CSteamID*/ )
{
return platform.ISteamFriends_CloseClanChatWindowInSteam( steamIDClanChat.Value );
}
// SteamAPICall_t
public SteamAPICall_t DownloadClanActivityCounts( IntPtr psteamIDClans /*class CSteamID **/, int cClansToRequest /*int*/ )
{
return platform.ISteamFriends_DownloadClanActivityCounts( (IntPtr) psteamIDClans, cClansToRequest );
}
// SteamAPICall_t
public CallbackHandle EnumerateFollowingList( uint unStartIndex /*uint32*/, Action<FriendsEnumerateFollowingList_t, bool> CallbackFunction = null /*Action<FriendsEnumerateFollowingList_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamFriends_EnumerateFollowingList( unStartIndex );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return FriendsEnumerateFollowingList_t.CallResult( steamworks, callback, CallbackFunction );
}
// ulong
public ulong GetChatMemberByIndex( CSteamID steamIDClan /*class CSteamID*/, int iUser /*int*/ )
{
return platform.ISteamFriends_GetChatMemberByIndex( steamIDClan.Value, iUser );
}
// bool
public bool GetClanActivityCounts( CSteamID steamIDClan /*class CSteamID*/, out int pnOnline /*int **/, out int pnInGame /*int **/, out int pnChatting /*int **/ )
{
return platform.ISteamFriends_GetClanActivityCounts( steamIDClan.Value, out pnOnline, out pnInGame, out pnChatting );
}
// ulong
public ulong GetClanByIndex( int iClan /*int*/ )
{
return platform.ISteamFriends_GetClanByIndex( iClan );
}
// int
public int GetClanChatMemberCount( CSteamID steamIDClan /*class CSteamID*/ )
{
return platform.ISteamFriends_GetClanChatMemberCount( steamIDClan.Value );
}
// int
public int GetClanChatMessage( CSteamID steamIDClanChat /*class CSteamID*/, int iMessage /*int*/, IntPtr prgchText /*void **/, int cchTextMax /*int*/, out ChatEntryType peChatEntryType /*EChatEntryType **/, out CSteamID psteamidChatter /*class CSteamID **/ )
{
return platform.ISteamFriends_GetClanChatMessage( steamIDClanChat.Value, iMessage, (IntPtr) prgchText, cchTextMax, out peChatEntryType, out psteamidChatter.Value );
}
// int
public int GetClanCount()
{
return platform.ISteamFriends_GetClanCount();
}
// string
// with: Detect_StringReturn
public string GetClanName( CSteamID steamIDClan /*class CSteamID*/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamFriends_GetClanName( steamIDClan.Value );
return Marshal.PtrToStringAnsi( string_pointer );
}
// ulong
public ulong GetClanOfficerByIndex( CSteamID steamIDClan /*class CSteamID*/, int iOfficer /*int*/ )
{
return platform.ISteamFriends_GetClanOfficerByIndex( steamIDClan.Value, iOfficer );
}
// int
public int GetClanOfficerCount( CSteamID steamIDClan /*class CSteamID*/ )
{
return platform.ISteamFriends_GetClanOfficerCount( steamIDClan.Value );
}
// ulong
public ulong GetClanOwner( CSteamID steamIDClan /*class CSteamID*/ )
{
return platform.ISteamFriends_GetClanOwner( steamIDClan.Value );
}
// string
// with: Detect_StringReturn
public string GetClanTag( CSteamID steamIDClan /*class CSteamID*/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamFriends_GetClanTag( steamIDClan.Value );
return Marshal.PtrToStringAnsi( string_pointer );
}
// ulong
public ulong GetCoplayFriend( int iCoplayFriend /*int*/ )
{
return platform.ISteamFriends_GetCoplayFriend( iCoplayFriend );
}
// int
public int GetCoplayFriendCount()
{
return platform.ISteamFriends_GetCoplayFriendCount();
}
// SteamAPICall_t
public CallbackHandle GetFollowerCount( CSteamID steamID /*class CSteamID*/, Action<FriendsGetFollowerCount_t, bool> CallbackFunction = null /*Action<FriendsGetFollowerCount_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamFriends_GetFollowerCount( steamID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return FriendsGetFollowerCount_t.CallResult( steamworks, callback, CallbackFunction );
}
// ulong
public ulong GetFriendByIndex( int iFriend /*int*/, int iFriendFlags /*int*/ )
{
return platform.ISteamFriends_GetFriendByIndex( iFriend, iFriendFlags );
}
// AppId_t
public AppId_t GetFriendCoplayGame( CSteamID steamIDFriend /*class CSteamID*/ )
{
return platform.ISteamFriends_GetFriendCoplayGame( steamIDFriend.Value );
}
// int
public int GetFriendCoplayTime( CSteamID steamIDFriend /*class CSteamID*/ )
{
return platform.ISteamFriends_GetFriendCoplayTime( steamIDFriend.Value );
}
// int
public int GetFriendCount( int iFriendFlags /*int*/ )
{
return platform.ISteamFriends_GetFriendCount( iFriendFlags );
}
// int
public int GetFriendCountFromSource( CSteamID steamIDSource /*class CSteamID*/ )
{
return platform.ISteamFriends_GetFriendCountFromSource( steamIDSource.Value );
}
// ulong
public ulong GetFriendFromSourceByIndex( CSteamID steamIDSource /*class CSteamID*/, int iFriend /*int*/ )
{
return platform.ISteamFriends_GetFriendFromSourceByIndex( steamIDSource.Value, iFriend );
}
// bool
public bool GetFriendGamePlayed( CSteamID steamIDFriend /*class CSteamID*/, ref FriendGameInfo_t pFriendGameInfo /*struct FriendGameInfo_t **/ )
{
return platform.ISteamFriends_GetFriendGamePlayed( steamIDFriend.Value, ref pFriendGameInfo );
}
// int
public int GetFriendMessage( CSteamID steamIDFriend /*class CSteamID*/, int iMessageID /*int*/, IntPtr pvData /*void **/, int cubData /*int*/, out ChatEntryType peChatEntryType /*EChatEntryType **/ )
{
return platform.ISteamFriends_GetFriendMessage( steamIDFriend.Value, iMessageID, (IntPtr) pvData, cubData, out peChatEntryType );
}
// string
// with: Detect_StringReturn
public string GetFriendPersonaName( CSteamID steamIDFriend /*class CSteamID*/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamFriends_GetFriendPersonaName( steamIDFriend.Value );
return Marshal.PtrToStringAnsi( string_pointer );
}
// string
// with: Detect_StringReturn
public string GetFriendPersonaNameHistory( CSteamID steamIDFriend /*class CSteamID*/, int iPersonaName /*int*/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamFriends_GetFriendPersonaNameHistory( steamIDFriend.Value, iPersonaName );
return Marshal.PtrToStringAnsi( string_pointer );
}
// PersonaState
public PersonaState GetFriendPersonaState( CSteamID steamIDFriend /*class CSteamID*/ )
{
return platform.ISteamFriends_GetFriendPersonaState( steamIDFriend.Value );
}
// FriendRelationship
public FriendRelationship GetFriendRelationship( CSteamID steamIDFriend /*class CSteamID*/ )
{
return platform.ISteamFriends_GetFriendRelationship( steamIDFriend.Value );
}
// string
// with: Detect_StringReturn
public string GetFriendRichPresence( CSteamID steamIDFriend /*class CSteamID*/, string pchKey /*const char **/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamFriends_GetFriendRichPresence( steamIDFriend.Value, pchKey );
return Marshal.PtrToStringAnsi( string_pointer );
}
// string
// with: Detect_StringReturn
public string GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend /*class CSteamID*/, int iKey /*int*/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamFriends_GetFriendRichPresenceKeyByIndex( steamIDFriend.Value, iKey );
return Marshal.PtrToStringAnsi( string_pointer );
}
// int
public int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend /*class CSteamID*/ )
{
return platform.ISteamFriends_GetFriendRichPresenceKeyCount( steamIDFriend.Value );
}
// int
public int GetFriendsGroupCount()
{
return platform.ISteamFriends_GetFriendsGroupCount();
}
// FriendsGroupID_t
public FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG /*int*/ )
{
return platform.ISteamFriends_GetFriendsGroupIDByIndex( iFG );
}
// int
public int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID /*FriendsGroupID_t*/ )
{
return platform.ISteamFriends_GetFriendsGroupMembersCount( friendsGroupID.Value );
}
// void
public void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID /*FriendsGroupID_t*/, IntPtr pOutSteamIDMembers /*class CSteamID **/, int nMembersCount /*int*/ )
{
platform.ISteamFriends_GetFriendsGroupMembersList( friendsGroupID.Value, (IntPtr) pOutSteamIDMembers, nMembersCount );
}
// string
// with: Detect_StringReturn
public string GetFriendsGroupName( FriendsGroupID_t friendsGroupID /*FriendsGroupID_t*/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamFriends_GetFriendsGroupName( friendsGroupID.Value );
return Marshal.PtrToStringAnsi( string_pointer );
}
// int
public int GetFriendSteamLevel( CSteamID steamIDFriend /*class CSteamID*/ )
{
return platform.ISteamFriends_GetFriendSteamLevel( steamIDFriend.Value );
}
// int
public int GetLargeFriendAvatar( CSteamID steamIDFriend /*class CSteamID*/ )
{
return platform.ISteamFriends_GetLargeFriendAvatar( steamIDFriend.Value );
}
// int
public int GetMediumFriendAvatar( CSteamID steamIDFriend /*class CSteamID*/ )
{
return platform.ISteamFriends_GetMediumFriendAvatar( steamIDFriend.Value );
}
// string
// with: Detect_StringReturn
public string GetPersonaName()
{
IntPtr string_pointer;
string_pointer = platform.ISteamFriends_GetPersonaName();
return Marshal.PtrToStringAnsi( string_pointer );
}
// PersonaState
public PersonaState GetPersonaState()
{
return platform.ISteamFriends_GetPersonaState();
}
// string
// with: Detect_StringReturn
public string GetPlayerNickname( CSteamID steamIDPlayer /*class CSteamID*/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamFriends_GetPlayerNickname( steamIDPlayer.Value );
return Marshal.PtrToStringAnsi( string_pointer );
}
// int
public int GetSmallFriendAvatar( CSteamID steamIDFriend /*class CSteamID*/ )
{
return platform.ISteamFriends_GetSmallFriendAvatar( steamIDFriend.Value );
}
// uint
public uint GetUserRestrictions()
{
return platform.ISteamFriends_GetUserRestrictions();
}
// bool
public bool HasFriend( CSteamID steamIDFriend /*class CSteamID*/, int iFriendFlags /*int*/ )
{
return platform.ISteamFriends_HasFriend( steamIDFriend.Value, iFriendFlags );
}
// bool
public bool InviteUserToGame( CSteamID steamIDFriend /*class CSteamID*/, string pchConnectString /*const char **/ )
{
return platform.ISteamFriends_InviteUserToGame( steamIDFriend.Value, pchConnectString );
}
// bool
public bool IsClanChatAdmin( CSteamID steamIDClanChat /*class CSteamID*/, CSteamID steamIDUser /*class CSteamID*/ )
{
return platform.ISteamFriends_IsClanChatAdmin( steamIDClanChat.Value, steamIDUser.Value );
}
// bool
public bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat /*class CSteamID*/ )
{
return platform.ISteamFriends_IsClanChatWindowOpenInSteam( steamIDClanChat.Value );
}
// bool
public bool IsClanOfficialGameGroup( CSteamID steamIDClan /*class CSteamID*/ )
{
return platform.ISteamFriends_IsClanOfficialGameGroup( steamIDClan.Value );
}
// bool
public bool IsClanPublic( CSteamID steamIDClan /*class CSteamID*/ )
{
return platform.ISteamFriends_IsClanPublic( steamIDClan.Value );
}
// SteamAPICall_t
public CallbackHandle IsFollowing( CSteamID steamID /*class CSteamID*/, Action<FriendsIsFollowing_t, bool> CallbackFunction = null /*Action<FriendsIsFollowing_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamFriends_IsFollowing( steamID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return FriendsIsFollowing_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool IsUserInSource( CSteamID steamIDUser /*class CSteamID*/, CSteamID steamIDSource /*class CSteamID*/ )
{
return platform.ISteamFriends_IsUserInSource( steamIDUser.Value, steamIDSource.Value );
}
// SteamAPICall_t
public CallbackHandle JoinClanChatRoom( CSteamID steamIDClan /*class CSteamID*/, Action<JoinClanChatRoomCompletionResult_t, bool> CallbackFunction = null /*Action<JoinClanChatRoomCompletionResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamFriends_JoinClanChatRoom( steamIDClan.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return JoinClanChatRoomCompletionResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool LeaveClanChatRoom( CSteamID steamIDClan /*class CSteamID*/ )
{
return platform.ISteamFriends_LeaveClanChatRoom( steamIDClan.Value );
}
// bool
public bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat /*class CSteamID*/ )
{
return platform.ISteamFriends_OpenClanChatWindowInSteam( steamIDClanChat.Value );
}
// bool
public bool ReplyToFriendMessage( CSteamID steamIDFriend /*class CSteamID*/, string pchMsgToSend /*const char **/ )
{
return platform.ISteamFriends_ReplyToFriendMessage( steamIDFriend.Value, pchMsgToSend );
}
// SteamAPICall_t
public CallbackHandle RequestClanOfficerList( CSteamID steamIDClan /*class CSteamID*/, Action<ClanOfficerListResponse_t, bool> CallbackFunction = null /*Action<ClanOfficerListResponse_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamFriends_RequestClanOfficerList( steamIDClan.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return ClanOfficerListResponse_t.CallResult( steamworks, callback, CallbackFunction );
}
// void
public void RequestFriendRichPresence( CSteamID steamIDFriend /*class CSteamID*/ )
{
platform.ISteamFriends_RequestFriendRichPresence( steamIDFriend.Value );
}
// bool
public bool RequestUserInformation( CSteamID steamIDUser /*class CSteamID*/, bool bRequireNameOnly /*bool*/ )
{
return platform.ISteamFriends_RequestUserInformation( steamIDUser.Value, bRequireNameOnly );
}
// bool
public bool SendClanChatMessage( CSteamID steamIDClanChat /*class CSteamID*/, string pchText /*const char **/ )
{
return platform.ISteamFriends_SendClanChatMessage( steamIDClanChat.Value, pchText );
}
// void
public void SetInGameVoiceSpeaking( CSteamID steamIDUser /*class CSteamID*/, bool bSpeaking /*bool*/ )
{
platform.ISteamFriends_SetInGameVoiceSpeaking( steamIDUser.Value, bSpeaking );
}
// bool
public bool SetListenForFriendsMessages( bool bInterceptEnabled /*bool*/ )
{
return platform.ISteamFriends_SetListenForFriendsMessages( bInterceptEnabled );
}
// SteamAPICall_t
public CallbackHandle SetPersonaName( string pchPersonaName /*const char **/, Action<SetPersonaNameResponse_t, bool> CallbackFunction = null /*Action<SetPersonaNameResponse_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamFriends_SetPersonaName( pchPersonaName );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return SetPersonaNameResponse_t.CallResult( steamworks, callback, CallbackFunction );
}
// void
public void SetPlayedWith( CSteamID steamIDUserPlayedWith /*class CSteamID*/ )
{
platform.ISteamFriends_SetPlayedWith( steamIDUserPlayedWith.Value );
}
// bool
public bool SetRichPresence( string pchKey /*const char **/, string pchValue /*const char **/ )
{
return platform.ISteamFriends_SetRichPresence( pchKey, pchValue );
}
}
}
@@ -0,0 +1,329 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamGameServer : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamGameServer( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// SteamAPICall_t
public CallbackHandle AssociateWithClan( CSteamID steamIDClan /*class CSteamID*/, Action<AssociateWithClanResult_t, bool> CallbackFunction = null /*Action<AssociateWithClanResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamGameServer_AssociateWithClan( steamIDClan.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return AssociateWithClanResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// BeginAuthSessionResult
public BeginAuthSessionResult BeginAuthSession( IntPtr pAuthTicket /*const void **/, int cbAuthTicket /*int*/, CSteamID steamID /*class CSteamID*/ )
{
return platform.ISteamGameServer_BeginAuthSession( (IntPtr) pAuthTicket, cbAuthTicket, steamID.Value );
}
// bool
public bool BLoggedOn()
{
return platform.ISteamGameServer_BLoggedOn();
}
// bool
public bool BSecure()
{
return platform.ISteamGameServer_BSecure();
}
// bool
public bool BUpdateUserData( CSteamID steamIDUser /*class CSteamID*/, string pchPlayerName /*const char **/, uint uScore /*uint32*/ )
{
return platform.ISteamGameServer_BUpdateUserData( steamIDUser.Value, pchPlayerName, uScore );
}
// void
public void CancelAuthTicket( HAuthTicket hAuthTicket /*HAuthTicket*/ )
{
platform.ISteamGameServer_CancelAuthTicket( hAuthTicket.Value );
}
// void
public void ClearAllKeyValues()
{
platform.ISteamGameServer_ClearAllKeyValues();
}
// SteamAPICall_t
public CallbackHandle ComputeNewPlayerCompatibility( CSteamID steamIDNewPlayer /*class CSteamID*/, Action<ComputeNewPlayerCompatibilityResult_t, bool> CallbackFunction = null /*Action<ComputeNewPlayerCompatibilityResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamGameServer_ComputeNewPlayerCompatibility( steamIDNewPlayer.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return ComputeNewPlayerCompatibilityResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// ulong
public ulong CreateUnauthenticatedUserConnection()
{
return platform.ISteamGameServer_CreateUnauthenticatedUserConnection();
}
// void
public void EnableHeartbeats( bool bActive /*bool*/ )
{
platform.ISteamGameServer_EnableHeartbeats( bActive );
}
// void
public void EndAuthSession( CSteamID steamID /*class CSteamID*/ )
{
platform.ISteamGameServer_EndAuthSession( steamID.Value );
}
// void
public void ForceHeartbeat()
{
platform.ISteamGameServer_ForceHeartbeat();
}
// HAuthTicket
public HAuthTicket GetAuthSessionTicket( IntPtr pTicket /*void **/, int cbMaxTicket /*int*/, out uint pcbTicket /*uint32 **/ )
{
return platform.ISteamGameServer_GetAuthSessionTicket( (IntPtr) pTicket, cbMaxTicket, out pcbTicket );
}
// void
public void GetGameplayStats()
{
platform.ISteamGameServer_GetGameplayStats();
}
// int
public int GetNextOutgoingPacket( IntPtr pOut /*void **/, int cbMaxOut /*int*/, out uint pNetAdr /*uint32 **/, out ushort pPort /*uint16 **/ )
{
return platform.ISteamGameServer_GetNextOutgoingPacket( (IntPtr) pOut, cbMaxOut, out pNetAdr, out pPort );
}
// uint
public uint GetPublicIP()
{
return platform.ISteamGameServer_GetPublicIP();
}
// SteamAPICall_t
public CallbackHandle GetServerReputation( Action<GSReputation_t, bool> CallbackFunction = null /*Action<GSReputation_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamGameServer_GetServerReputation();
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return GSReputation_t.CallResult( steamworks, callback, CallbackFunction );
}
// ulong
public ulong GetSteamID()
{
return platform.ISteamGameServer_GetSteamID();
}
// bool
public bool HandleIncomingPacket( IntPtr pData /*const void **/, int cbData /*int*/, uint srcIP /*uint32*/, ushort srcPort /*uint16*/ )
{
return platform.ISteamGameServer_HandleIncomingPacket( (IntPtr) pData, cbData, srcIP, srcPort );
}
// bool
public bool InitGameServer( uint unIP /*uint32*/, ushort usGamePort /*uint16*/, ushort usQueryPort /*uint16*/, uint unFlags /*uint32*/, AppId_t nGameAppId /*AppId_t*/, string pchVersionString /*const char **/ )
{
return platform.ISteamGameServer_InitGameServer( unIP, usGamePort, usQueryPort, unFlags, nGameAppId.Value, pchVersionString );
}
// void
public void LogOff()
{
platform.ISteamGameServer_LogOff();
}
// void
public void LogOn( string pszToken /*const char **/ )
{
platform.ISteamGameServer_LogOn( pszToken );
}
// void
public void LogOnAnonymous()
{
platform.ISteamGameServer_LogOnAnonymous();
}
// bool
public bool RequestUserGroupStatus( CSteamID steamIDUser /*class CSteamID*/, CSteamID steamIDGroup /*class CSteamID*/ )
{
return platform.ISteamGameServer_RequestUserGroupStatus( steamIDUser.Value, steamIDGroup.Value );
}
// bool
public bool SendUserConnectAndAuthenticate( uint unIPClient /*uint32*/, IntPtr pvAuthBlob /*const void **/, uint cubAuthBlobSize /*uint32*/, out CSteamID pSteamIDUser /*class CSteamID **/ )
{
return platform.ISteamGameServer_SendUserConnectAndAuthenticate( unIPClient, (IntPtr) pvAuthBlob, cubAuthBlobSize, out pSteamIDUser.Value );
}
// void
public void SendUserDisconnect( CSteamID steamIDUser /*class CSteamID*/ )
{
platform.ISteamGameServer_SendUserDisconnect( steamIDUser.Value );
}
// void
public void SetBotPlayerCount( int cBotplayers /*int*/ )
{
platform.ISteamGameServer_SetBotPlayerCount( cBotplayers );
}
// void
public void SetDedicatedServer( bool bDedicated /*bool*/ )
{
platform.ISteamGameServer_SetDedicatedServer( bDedicated );
}
// void
public void SetGameData( string pchGameData /*const char **/ )
{
platform.ISteamGameServer_SetGameData( pchGameData );
}
// void
public void SetGameDescription( string pszGameDescription /*const char **/ )
{
platform.ISteamGameServer_SetGameDescription( pszGameDescription );
}
// void
public void SetGameTags( string pchGameTags /*const char **/ )
{
platform.ISteamGameServer_SetGameTags( pchGameTags );
}
// void
public void SetHeartbeatInterval( int iHeartbeatInterval /*int*/ )
{
platform.ISteamGameServer_SetHeartbeatInterval( iHeartbeatInterval );
}
// void
public void SetKeyValue( string pKey /*const char **/, string pValue /*const char **/ )
{
platform.ISteamGameServer_SetKeyValue( pKey, pValue );
}
// void
public void SetMapName( string pszMapName /*const char **/ )
{
platform.ISteamGameServer_SetMapName( pszMapName );
}
// void
public void SetMaxPlayerCount( int cPlayersMax /*int*/ )
{
platform.ISteamGameServer_SetMaxPlayerCount( cPlayersMax );
}
// void
public void SetModDir( string pszModDir /*const char **/ )
{
platform.ISteamGameServer_SetModDir( pszModDir );
}
// void
public void SetPasswordProtected( bool bPasswordProtected /*bool*/ )
{
platform.ISteamGameServer_SetPasswordProtected( bPasswordProtected );
}
// void
public void SetProduct( string pszProduct /*const char **/ )
{
platform.ISteamGameServer_SetProduct( pszProduct );
}
// void
public void SetRegion( string pszRegion /*const char **/ )
{
platform.ISteamGameServer_SetRegion( pszRegion );
}
// void
public void SetServerName( string pszServerName /*const char **/ )
{
platform.ISteamGameServer_SetServerName( pszServerName );
}
// void
public void SetSpectatorPort( ushort unSpectatorPort /*uint16*/ )
{
platform.ISteamGameServer_SetSpectatorPort( unSpectatorPort );
}
// void
public void SetSpectatorServerName( string pszSpectatorServerName /*const char **/ )
{
platform.ISteamGameServer_SetSpectatorServerName( pszSpectatorServerName );
}
// UserHasLicenseForAppResult
public UserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID /*class CSteamID*/, AppId_t appID /*AppId_t*/ )
{
return platform.ISteamGameServer_UserHasLicenseForApp( steamID.Value, appID.Value );
}
// bool
public bool WasRestartRequested()
{
return platform.ISteamGameServer_WasRestartRequested();
}
}
}
@@ -0,0 +1,119 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamGameServerStats : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamGameServerStats( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// bool
public bool ClearUserAchievement( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/ )
{
return platform.ISteamGameServerStats_ClearUserAchievement( steamIDUser.Value, pchName );
}
// bool
public bool GetUserAchievement( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/, ref bool pbAchieved /*bool **/ )
{
return platform.ISteamGameServerStats_GetUserAchievement( steamIDUser.Value, pchName, ref pbAchieved );
}
// bool
public bool GetUserStat( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/, out int pData /*int32 **/ )
{
return platform.ISteamGameServerStats_GetUserStat( steamIDUser.Value, pchName, out pData );
}
// bool
public bool GetUserStat0( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/, out float pData /*float **/ )
{
return platform.ISteamGameServerStats_GetUserStat0( steamIDUser.Value, pchName, out pData );
}
// SteamAPICall_t
public CallbackHandle RequestUserStats( CSteamID steamIDUser /*class CSteamID*/, Action<GSStatsReceived_t, bool> CallbackFunction = null /*Action<GSStatsReceived_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamGameServerStats_RequestUserStats( steamIDUser.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return GSStatsReceived_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool SetUserAchievement( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/ )
{
return platform.ISteamGameServerStats_SetUserAchievement( steamIDUser.Value, pchName );
}
// bool
public bool SetUserStat( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/, int nData /*int32*/ )
{
return platform.ISteamGameServerStats_SetUserStat( steamIDUser.Value, pchName, nData );
}
// bool
public bool SetUserStat0( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/, float fData /*float*/ )
{
return platform.ISteamGameServerStats_SetUserStat0( steamIDUser.Value, pchName, fData );
}
// SteamAPICall_t
public CallbackHandle StoreUserStats( CSteamID steamIDUser /*class CSteamID*/, Action<GSStatsStored_t, bool> CallbackFunction = null /*Action<GSStatsStored_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamGameServerStats_StoreUserStats( steamIDUser.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return GSStatsStored_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool UpdateUserAvgRateStat( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/, float flCountThisSession /*float*/, double dSessionLength /*double*/ )
{
return platform.ISteamGameServerStats_UpdateUserAvgRateStat( steamIDUser.Value, pchName, flCountThisSession, dSessionLength );
}
}
}
@@ -0,0 +1,269 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamHTMLSurface : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamHTMLSurface( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// void
public void AddHeader( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, string pchKey /*const char **/, string pchValue /*const char **/ )
{
platform.ISteamHTMLSurface_AddHeader( unBrowserHandle.Value, pchKey, pchValue );
}
// void
public void AllowStartRequest( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, bool bAllowed /*bool*/ )
{
platform.ISteamHTMLSurface_AllowStartRequest( unBrowserHandle.Value, bAllowed );
}
// void
public void CopyToClipboard( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/ )
{
platform.ISteamHTMLSurface_CopyToClipboard( unBrowserHandle.Value );
}
// SteamAPICall_t
public CallbackHandle CreateBrowser( string pchUserAgent /*const char **/, string pchUserCSS /*const char **/, Action<HTML_BrowserReady_t, bool> CallbackFunction = null /*Action<HTML_BrowserReady_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamHTMLSurface_CreateBrowser( pchUserAgent, pchUserCSS );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return HTML_BrowserReady_t.CallResult( steamworks, callback, CallbackFunction );
}
// void
public void DestructISteamHTMLSurface()
{
platform.ISteamHTMLSurface_DestructISteamHTMLSurface();
}
// void
public void ExecuteJavascript( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, string pchScript /*const char **/ )
{
platform.ISteamHTMLSurface_ExecuteJavascript( unBrowserHandle.Value, pchScript );
}
// void
public void Find( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, string pchSearchStr /*const char **/, bool bCurrentlyInFind /*bool*/, bool bReverse /*bool*/ )
{
platform.ISteamHTMLSurface_Find( unBrowserHandle.Value, pchSearchStr, bCurrentlyInFind, bReverse );
}
// void
public void GetLinkAtPosition( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, int x /*int*/, int y /*int*/ )
{
platform.ISteamHTMLSurface_GetLinkAtPosition( unBrowserHandle.Value, x, y );
}
// void
public void GoBack( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/ )
{
platform.ISteamHTMLSurface_GoBack( unBrowserHandle.Value );
}
// void
public void GoForward( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/ )
{
platform.ISteamHTMLSurface_GoForward( unBrowserHandle.Value );
}
// bool
public bool Init()
{
return platform.ISteamHTMLSurface_Init();
}
// void
public void JSDialogResponse( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, bool bResult /*bool*/ )
{
platform.ISteamHTMLSurface_JSDialogResponse( unBrowserHandle.Value, bResult );
}
// void
public void KeyChar( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, uint cUnicodeChar /*uint32*/, HTMLKeyModifiers eHTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ )
{
platform.ISteamHTMLSurface_KeyChar( unBrowserHandle.Value, cUnicodeChar, eHTMLKeyModifiers );
}
// void
public void KeyDown( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, uint nNativeKeyCode /*uint32*/, HTMLKeyModifiers eHTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ )
{
platform.ISteamHTMLSurface_KeyDown( unBrowserHandle.Value, nNativeKeyCode, eHTMLKeyModifiers );
}
// void
public void KeyUp( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, uint nNativeKeyCode /*uint32*/, HTMLKeyModifiers eHTMLKeyModifiers /*ISteamHTMLSurface::EHTMLKeyModifiers*/ )
{
platform.ISteamHTMLSurface_KeyUp( unBrowserHandle.Value, nNativeKeyCode, eHTMLKeyModifiers );
}
// void
public void LoadURL( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, string pchURL /*const char **/, string pchPostData /*const char **/ )
{
platform.ISteamHTMLSurface_LoadURL( unBrowserHandle.Value, pchURL, pchPostData );
}
// void
public void MouseDoubleClick( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, HTMLMouseButton eMouseButton /*ISteamHTMLSurface::EHTMLMouseButton*/ )
{
platform.ISteamHTMLSurface_MouseDoubleClick( unBrowserHandle.Value, eMouseButton );
}
// void
public void MouseDown( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, HTMLMouseButton eMouseButton /*ISteamHTMLSurface::EHTMLMouseButton*/ )
{
platform.ISteamHTMLSurface_MouseDown( unBrowserHandle.Value, eMouseButton );
}
// void
public void MouseMove( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, int x /*int*/, int y /*int*/ )
{
platform.ISteamHTMLSurface_MouseMove( unBrowserHandle.Value, x, y );
}
// void
public void MouseUp( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, HTMLMouseButton eMouseButton /*ISteamHTMLSurface::EHTMLMouseButton*/ )
{
platform.ISteamHTMLSurface_MouseUp( unBrowserHandle.Value, eMouseButton );
}
// void
public void MouseWheel( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, int nDelta /*int32*/ )
{
platform.ISteamHTMLSurface_MouseWheel( unBrowserHandle.Value, nDelta );
}
// void
public void PasteFromClipboard( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/ )
{
platform.ISteamHTMLSurface_PasteFromClipboard( unBrowserHandle.Value );
}
// void
public void Reload( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/ )
{
platform.ISteamHTMLSurface_Reload( unBrowserHandle.Value );
}
// void
public void RemoveBrowser( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/ )
{
platform.ISteamHTMLSurface_RemoveBrowser( unBrowserHandle.Value );
}
// void
public void SetBackgroundMode( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, bool bBackgroundMode /*bool*/ )
{
platform.ISteamHTMLSurface_SetBackgroundMode( unBrowserHandle.Value, bBackgroundMode );
}
// void
public void SetCookie( string pchHostname /*const char **/, string pchKey /*const char **/, string pchValue /*const char **/, string pchPath /*const char **/, RTime32 nExpires /*RTime32*/, bool bSecure /*bool*/, bool bHTTPOnly /*bool*/ )
{
platform.ISteamHTMLSurface_SetCookie( pchHostname, pchKey, pchValue, pchPath, nExpires.Value, bSecure, bHTTPOnly );
}
// void
public void SetDPIScalingFactor( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, float flDPIScaling /*float*/ )
{
platform.ISteamHTMLSurface_SetDPIScalingFactor( unBrowserHandle.Value, flDPIScaling );
}
// void
public void SetHorizontalScroll( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, uint nAbsolutePixelScroll /*uint32*/ )
{
platform.ISteamHTMLSurface_SetHorizontalScroll( unBrowserHandle.Value, nAbsolutePixelScroll );
}
// void
public void SetKeyFocus( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, bool bHasKeyFocus /*bool*/ )
{
platform.ISteamHTMLSurface_SetKeyFocus( unBrowserHandle.Value, bHasKeyFocus );
}
// void
public void SetPageScaleFactor( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, float flZoom /*float*/, int nPointX /*int*/, int nPointY /*int*/ )
{
platform.ISteamHTMLSurface_SetPageScaleFactor( unBrowserHandle.Value, flZoom, nPointX, nPointY );
}
// void
public void SetSize( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, uint unWidth /*uint32*/, uint unHeight /*uint32*/ )
{
platform.ISteamHTMLSurface_SetSize( unBrowserHandle.Value, unWidth, unHeight );
}
// void
public void SetVerticalScroll( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/, uint nAbsolutePixelScroll /*uint32*/ )
{
platform.ISteamHTMLSurface_SetVerticalScroll( unBrowserHandle.Value, nAbsolutePixelScroll );
}
// bool
public bool Shutdown()
{
return platform.ISteamHTMLSurface_Shutdown();
}
// void
public void StopFind( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/ )
{
platform.ISteamHTMLSurface_StopFind( unBrowserHandle.Value );
}
// void
public void StopLoad( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/ )
{
platform.ISteamHTMLSurface_StopLoad( unBrowserHandle.Value );
}
// void
public void ViewSource( HHTMLBrowser unBrowserHandle /*HHTMLBrowser*/ )
{
platform.ISteamHTMLSurface_ViewSource( unBrowserHandle.Value );
}
}
}
@@ -0,0 +1,197 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamHTTP : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamHTTP( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// HTTPCookieContainerHandle
public HTTPCookieContainerHandle CreateCookieContainer( bool bAllowResponsesToModify /*bool*/ )
{
return platform.ISteamHTTP_CreateCookieContainer( bAllowResponsesToModify );
}
// HTTPRequestHandle
public HTTPRequestHandle CreateHTTPRequest( HTTPMethod eHTTPRequestMethod /*EHTTPMethod*/, string pchAbsoluteURL /*const char **/ )
{
return platform.ISteamHTTP_CreateHTTPRequest( eHTTPRequestMethod, pchAbsoluteURL );
}
// bool
public bool DeferHTTPRequest( HTTPRequestHandle hRequest /*HTTPRequestHandle*/ )
{
return platform.ISteamHTTP_DeferHTTPRequest( hRequest.Value );
}
// bool
public bool GetHTTPDownloadProgressPct( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, out float pflPercentOut /*float **/ )
{
return platform.ISteamHTTP_GetHTTPDownloadProgressPct( hRequest.Value, out pflPercentOut );
}
// bool
public bool GetHTTPRequestWasTimedOut( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, ref bool pbWasTimedOut /*bool **/ )
{
return platform.ISteamHTTP_GetHTTPRequestWasTimedOut( hRequest.Value, ref pbWasTimedOut );
}
// bool
public bool GetHTTPResponseBodyData( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, out byte pBodyDataBuffer /*uint8 **/, uint unBufferSize /*uint32*/ )
{
return platform.ISteamHTTP_GetHTTPResponseBodyData( hRequest.Value, out pBodyDataBuffer, unBufferSize );
}
// bool
public bool GetHTTPResponseBodySize( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, out uint unBodySize /*uint32 **/ )
{
return platform.ISteamHTTP_GetHTTPResponseBodySize( hRequest.Value, out unBodySize );
}
// bool
public bool GetHTTPResponseHeaderSize( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, string pchHeaderName /*const char **/, out uint unResponseHeaderSize /*uint32 **/ )
{
return platform.ISteamHTTP_GetHTTPResponseHeaderSize( hRequest.Value, pchHeaderName, out unResponseHeaderSize );
}
// bool
public bool GetHTTPResponseHeaderValue( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, string pchHeaderName /*const char **/, out byte pHeaderValueBuffer /*uint8 **/, uint unBufferSize /*uint32*/ )
{
return platform.ISteamHTTP_GetHTTPResponseHeaderValue( hRequest.Value, pchHeaderName, out pHeaderValueBuffer, unBufferSize );
}
// bool
public bool GetHTTPStreamingResponseBodyData( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, uint cOffset /*uint32*/, out byte pBodyDataBuffer /*uint8 **/, uint unBufferSize /*uint32*/ )
{
return platform.ISteamHTTP_GetHTTPStreamingResponseBodyData( hRequest.Value, cOffset, out pBodyDataBuffer, unBufferSize );
}
// bool
public bool PrioritizeHTTPRequest( HTTPRequestHandle hRequest /*HTTPRequestHandle*/ )
{
return platform.ISteamHTTP_PrioritizeHTTPRequest( hRequest.Value );
}
// bool
public bool ReleaseCookieContainer( HTTPCookieContainerHandle hCookieContainer /*HTTPCookieContainerHandle*/ )
{
return platform.ISteamHTTP_ReleaseCookieContainer( hCookieContainer.Value );
}
// bool
public bool ReleaseHTTPRequest( HTTPRequestHandle hRequest /*HTTPRequestHandle*/ )
{
return platform.ISteamHTTP_ReleaseHTTPRequest( hRequest.Value );
}
// bool
public bool SendHTTPRequest( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, ref SteamAPICall_t pCallHandle /*SteamAPICall_t **/ )
{
return platform.ISteamHTTP_SendHTTPRequest( hRequest.Value, ref pCallHandle.Value );
}
// bool
public bool SendHTTPRequestAndStreamResponse( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, ref SteamAPICall_t pCallHandle /*SteamAPICall_t **/ )
{
return platform.ISteamHTTP_SendHTTPRequestAndStreamResponse( hRequest.Value, ref pCallHandle.Value );
}
// bool
public bool SetCookie( HTTPCookieContainerHandle hCookieContainer /*HTTPCookieContainerHandle*/, string pchHost /*const char **/, string pchUrl /*const char **/, string pchCookie /*const char **/ )
{
return platform.ISteamHTTP_SetCookie( hCookieContainer.Value, pchHost, pchUrl, pchCookie );
}
// bool
public bool SetHTTPRequestAbsoluteTimeoutMS( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, uint unMilliseconds /*uint32*/ )
{
return platform.ISteamHTTP_SetHTTPRequestAbsoluteTimeoutMS( hRequest.Value, unMilliseconds );
}
// bool
public bool SetHTTPRequestContextValue( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, ulong ulContextValue /*uint64*/ )
{
return platform.ISteamHTTP_SetHTTPRequestContextValue( hRequest.Value, ulContextValue );
}
// bool
public bool SetHTTPRequestCookieContainer( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, HTTPCookieContainerHandle hCookieContainer /*HTTPCookieContainerHandle*/ )
{
return platform.ISteamHTTP_SetHTTPRequestCookieContainer( hRequest.Value, hCookieContainer.Value );
}
// bool
public bool SetHTTPRequestGetOrPostParameter( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, string pchParamName /*const char **/, string pchParamValue /*const char **/ )
{
return platform.ISteamHTTP_SetHTTPRequestGetOrPostParameter( hRequest.Value, pchParamName, pchParamValue );
}
// bool
public bool SetHTTPRequestHeaderValue( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, string pchHeaderName /*const char **/, string pchHeaderValue /*const char **/ )
{
return platform.ISteamHTTP_SetHTTPRequestHeaderValue( hRequest.Value, pchHeaderName, pchHeaderValue );
}
// bool
public bool SetHTTPRequestNetworkActivityTimeout( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, uint unTimeoutSeconds /*uint32*/ )
{
return platform.ISteamHTTP_SetHTTPRequestNetworkActivityTimeout( hRequest.Value, unTimeoutSeconds );
}
// bool
public bool SetHTTPRequestRawPostBody( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, string pchContentType /*const char **/, out byte pubBody /*uint8 **/, uint unBodyLen /*uint32*/ )
{
return platform.ISteamHTTP_SetHTTPRequestRawPostBody( hRequest.Value, pchContentType, out pubBody, unBodyLen );
}
// bool
public bool SetHTTPRequestRequiresVerifiedCertificate( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, bool bRequireVerifiedCertificate /*bool*/ )
{
return platform.ISteamHTTP_SetHTTPRequestRequiresVerifiedCertificate( hRequest.Value, bRequireVerifiedCertificate );
}
// bool
public bool SetHTTPRequestUserAgentInfo( HTTPRequestHandle hRequest /*HTTPRequestHandle*/, string pchUserAgentInfo /*const char **/ )
{
return platform.ISteamHTTP_SetHTTPRequestUserAgentInfo( hRequest.Value, pchUserAgentInfo );
}
}
}
@@ -0,0 +1,342 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamInventory : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamInventory( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// bool
public bool AddPromoItem( ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/, SteamItemDef_t itemDef /*SteamItemDef_t*/ )
{
return platform.ISteamInventory_AddPromoItem( ref pResultHandle.Value, itemDef.Value );
}
// bool
public bool AddPromoItems( ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/, SteamItemDef_t[] pArrayItemDefs /*const SteamItemDef_t **/, uint unArrayLength /*uint32*/ )
{
return platform.ISteamInventory_AddPromoItems( ref pResultHandle.Value, pArrayItemDefs.Select( x => x.Value ).ToArray(), unArrayLength );
}
// bool
public bool CheckResultSteamID( SteamInventoryResult_t resultHandle /*SteamInventoryResult_t*/, CSteamID steamIDExpected /*class CSteamID*/ )
{
return platform.ISteamInventory_CheckResultSteamID( resultHandle.Value, steamIDExpected.Value );
}
// bool
public bool ConsumeItem( ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/, SteamItemInstanceID_t itemConsume /*SteamItemInstanceID_t*/, uint unQuantity /*uint32*/ )
{
return platform.ISteamInventory_ConsumeItem( ref pResultHandle.Value, itemConsume.Value, unQuantity );
}
// bool
public bool DeserializeResult( ref SteamInventoryResult_t pOutResultHandle /*SteamInventoryResult_t **/, IntPtr pBuffer /*const void **/, uint unBufferSize /*uint32*/, bool bRESERVED_MUST_BE_FALSE /*bool*/ )
{
return platform.ISteamInventory_DeserializeResult( ref pOutResultHandle.Value, (IntPtr) pBuffer, unBufferSize, bRESERVED_MUST_BE_FALSE );
}
// void
public void DestroyResult( SteamInventoryResult_t resultHandle /*SteamInventoryResult_t*/ )
{
platform.ISteamInventory_DestroyResult( resultHandle.Value );
}
// bool
public bool ExchangeItems( ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/, SteamItemDef_t[] pArrayGenerate /*const SteamItemDef_t **/, uint[] punArrayGenerateQuantity /*const uint32 **/, uint unArrayGenerateLength /*uint32*/, SteamItemInstanceID_t[] pArrayDestroy /*const SteamItemInstanceID_t **/, uint[] punArrayDestroyQuantity /*const uint32 **/, uint unArrayDestroyLength /*uint32*/ )
{
return platform.ISteamInventory_ExchangeItems( ref pResultHandle.Value, pArrayGenerate.Select( x => x.Value ).ToArray(), punArrayGenerateQuantity, unArrayGenerateLength, pArrayDestroy.Select( x => x.Value ).ToArray(), punArrayDestroyQuantity, unArrayDestroyLength );
}
// bool
public bool GenerateItems( ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/, SteamItemDef_t[] pArrayItemDefs /*const SteamItemDef_t **/, uint[] punArrayQuantity /*const uint32 **/, uint unArrayLength /*uint32*/ )
{
return platform.ISteamInventory_GenerateItems( ref pResultHandle.Value, pArrayItemDefs.Select( x => x.Value ).ToArray(), punArrayQuantity, unArrayLength );
}
// bool
public bool GetAllItems( ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/ )
{
return platform.ISteamInventory_GetAllItems( ref pResultHandle.Value );
}
// bool
// using: Detect_MultiSizeArrayReturn
public SteamItemDef_t[] GetEligiblePromoItemDefinitionIDs( CSteamID steamID /*class CSteamID*/ )
{
uint punItemDefIDsArraySize = 0;
bool success = false;
success = platform.ISteamInventory_GetEligiblePromoItemDefinitionIDs( steamID.Value, IntPtr.Zero, out punItemDefIDsArraySize );
if ( !success || punItemDefIDsArraySize == 0) return null;
var pItemDefIDs = new SteamItemDef_t[punItemDefIDsArraySize];
fixed ( void* pItemDefIDs_ptr = pItemDefIDs )
{
success = platform.ISteamInventory_GetEligiblePromoItemDefinitionIDs( steamID.Value, (IntPtr) pItemDefIDs_ptr, out punItemDefIDsArraySize );
if ( !success ) return null;
return pItemDefIDs;
}
}
// bool
// using: Detect_MultiSizeArrayReturn
public SteamItemDef_t[] GetItemDefinitionIDs()
{
uint punItemDefIDsArraySize = 0;
bool success = false;
success = platform.ISteamInventory_GetItemDefinitionIDs( IntPtr.Zero, out punItemDefIDsArraySize );
if ( !success || punItemDefIDsArraySize == 0) return null;
var pItemDefIDs = new SteamItemDef_t[punItemDefIDsArraySize];
fixed ( void* pItemDefIDs_ptr = pItemDefIDs )
{
success = platform.ISteamInventory_GetItemDefinitionIDs( (IntPtr) pItemDefIDs_ptr, out punItemDefIDsArraySize );
if ( !success ) return null;
return pItemDefIDs;
}
}
// bool
// with: Detect_StringFetch False
public bool GetItemDefinitionProperty( SteamItemDef_t iDefinition /*SteamItemDef_t*/, string pchPropertyName /*const char **/, out string pchValueBuffer /*char **/ )
{
bool bSuccess = default( bool );
pchValueBuffer = string.Empty;
System.Text.StringBuilder pchValueBuffer_sb = Helpers.TakeStringBuilder();
uint punValueBufferSizeOut = 4096;
bSuccess = platform.ISteamInventory_GetItemDefinitionProperty( iDefinition.Value, pchPropertyName, pchValueBuffer_sb, out punValueBufferSizeOut );
if ( !bSuccess ) return bSuccess;
pchValueBuffer = pchValueBuffer_sb.ToString();
return bSuccess;
}
// bool
public bool GetItemPrice( SteamItemDef_t iDefinition /*SteamItemDef_t*/, out ulong pPrice /*uint64 **/ )
{
return platform.ISteamInventory_GetItemPrice( iDefinition.Value, out pPrice );
}
// bool
public bool GetItemsByID( ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/, SteamItemInstanceID_t[] pInstanceIDs /*const SteamItemInstanceID_t **/, uint unCountInstanceIDs /*uint32*/ )
{
return platform.ISteamInventory_GetItemsByID( ref pResultHandle.Value, pInstanceIDs.Select( x => x.Value ).ToArray(), unCountInstanceIDs );
}
// bool
public bool GetItemsWithPrices( IntPtr pArrayItemDefs /*SteamItemDef_t **/, IntPtr pPrices /*uint64 **/, uint unArrayLength /*uint32*/ )
{
return platform.ISteamInventory_GetItemsWithPrices( (IntPtr) pArrayItemDefs, (IntPtr) pPrices, unArrayLength );
}
// uint
public uint GetNumItemsWithPrices()
{
return platform.ISteamInventory_GetNumItemsWithPrices();
}
// bool
// with: Detect_StringFetch False
public bool GetResultItemProperty( SteamInventoryResult_t resultHandle /*SteamInventoryResult_t*/, uint unItemIndex /*uint32*/, string pchPropertyName /*const char **/, out string pchValueBuffer /*char **/ )
{
bool bSuccess = default( bool );
pchValueBuffer = string.Empty;
System.Text.StringBuilder pchValueBuffer_sb = Helpers.TakeStringBuilder();
uint punValueBufferSizeOut = 4096;
bSuccess = platform.ISteamInventory_GetResultItemProperty( resultHandle.Value, unItemIndex, pchPropertyName, pchValueBuffer_sb, out punValueBufferSizeOut );
if ( !bSuccess ) return bSuccess;
pchValueBuffer = pchValueBuffer_sb.ToString();
return bSuccess;
}
// bool
// using: Detect_MultiSizeArrayReturn
public SteamItemDetails_t[] GetResultItems( SteamInventoryResult_t resultHandle /*SteamInventoryResult_t*/ )
{
uint punOutItemsArraySize = 0;
bool success = false;
success = platform.ISteamInventory_GetResultItems( resultHandle.Value, IntPtr.Zero, out punOutItemsArraySize );
if ( !success || punOutItemsArraySize == 0) return null;
var pOutItemsArray = new SteamItemDetails_t[punOutItemsArraySize];
fixed ( void* pOutItemsArray_ptr = pOutItemsArray )
{
success = platform.ISteamInventory_GetResultItems( resultHandle.Value, (IntPtr) pOutItemsArray_ptr, out punOutItemsArraySize );
if ( !success ) return null;
return pOutItemsArray;
}
}
// Result
public Result GetResultStatus( SteamInventoryResult_t resultHandle /*SteamInventoryResult_t*/ )
{
return platform.ISteamInventory_GetResultStatus( resultHandle.Value );
}
// uint
public uint GetResultTimestamp( SteamInventoryResult_t resultHandle /*SteamInventoryResult_t*/ )
{
return platform.ISteamInventory_GetResultTimestamp( resultHandle.Value );
}
// bool
public bool GrantPromoItems( ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/ )
{
return platform.ISteamInventory_GrantPromoItems( ref pResultHandle.Value );
}
// bool
public bool LoadItemDefinitions()
{
return platform.ISteamInventory_LoadItemDefinitions();
}
// bool
public bool RemoveProperty( SteamInventoryUpdateHandle_t handle /*SteamInventoryUpdateHandle_t*/, SteamItemInstanceID_t nItemID /*SteamItemInstanceID_t*/, string pchPropertyName /*const char **/ )
{
return platform.ISteamInventory_RemoveProperty( handle.Value, nItemID.Value, pchPropertyName );
}
// SteamAPICall_t
public CallbackHandle RequestEligiblePromoItemDefinitionsIDs( CSteamID steamID /*class CSteamID*/, Action<SteamInventoryEligiblePromoItemDefIDs_t, bool> CallbackFunction = null /*Action<SteamInventoryEligiblePromoItemDefIDs_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamInventory_RequestEligiblePromoItemDefinitionsIDs( steamID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return SteamInventoryEligiblePromoItemDefIDs_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle RequestPrices( Action<SteamInventoryRequestPricesResult_t, bool> CallbackFunction = null /*Action<SteamInventoryRequestPricesResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamInventory_RequestPrices();
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return SteamInventoryRequestPricesResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// void
public void SendItemDropHeartbeat()
{
platform.ISteamInventory_SendItemDropHeartbeat();
}
// bool
public bool SerializeResult( SteamInventoryResult_t resultHandle /*SteamInventoryResult_t*/, IntPtr pOutBuffer /*void **/, out uint punOutBufferSize /*uint32 **/ )
{
return platform.ISteamInventory_SerializeResult( resultHandle.Value, (IntPtr) pOutBuffer, out punOutBufferSize );
}
// bool
public bool SetProperty( SteamInventoryUpdateHandle_t handle /*SteamInventoryUpdateHandle_t*/, SteamItemInstanceID_t nItemID /*SteamItemInstanceID_t*/, string pchPropertyName /*const char **/, string pchPropertyValue /*const char **/ )
{
return platform.ISteamInventory_SetProperty( handle.Value, nItemID.Value, pchPropertyName, pchPropertyValue );
}
// bool
public bool SetProperty0( SteamInventoryUpdateHandle_t handle /*SteamInventoryUpdateHandle_t*/, SteamItemInstanceID_t nItemID /*SteamItemInstanceID_t*/, string pchPropertyName /*const char **/, bool bValue /*bool*/ )
{
return platform.ISteamInventory_SetProperty0( handle.Value, nItemID.Value, pchPropertyName, bValue );
}
// bool
public bool SetProperty1( SteamInventoryUpdateHandle_t handle /*SteamInventoryUpdateHandle_t*/, SteamItemInstanceID_t nItemID /*SteamItemInstanceID_t*/, string pchPropertyName /*const char **/, long nValue /*int64*/ )
{
return platform.ISteamInventory_SetProperty0( handle.Value, nItemID.Value, pchPropertyName, nValue );
}
// bool
public bool SetProperty2( SteamInventoryUpdateHandle_t handle /*SteamInventoryUpdateHandle_t*/, SteamItemInstanceID_t nItemID /*SteamItemInstanceID_t*/, string pchPropertyName /*const char **/, float flValue /*float*/ )
{
return platform.ISteamInventory_SetProperty0( handle.Value, nItemID.Value, pchPropertyName, flValue );
}
// SteamAPICall_t
public CallbackHandle StartPurchase( SteamItemDef_t[] pArrayItemDefs /*const SteamItemDef_t **/, uint[] punArrayQuantity /*const uint32 **/, uint unArrayLength /*uint32*/, Action<SteamInventoryStartPurchaseResult_t, bool> CallbackFunction = null /*Action<SteamInventoryStartPurchaseResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamInventory_StartPurchase( pArrayItemDefs.Select( x => x.Value ).ToArray(), punArrayQuantity, unArrayLength );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return SteamInventoryStartPurchaseResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamInventoryUpdateHandle_t
public SteamInventoryUpdateHandle_t StartUpdateProperties()
{
return platform.ISteamInventory_StartUpdateProperties();
}
// bool
public bool SubmitUpdateProperties( SteamInventoryUpdateHandle_t handle /*SteamInventoryUpdateHandle_t*/, ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/ )
{
return platform.ISteamInventory_SubmitUpdateProperties( handle.Value, ref pResultHandle.Value );
}
// bool
public bool TradeItems( ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/, CSteamID steamIDTradePartner /*class CSteamID*/, SteamItemInstanceID_t[] pArrayGive /*const SteamItemInstanceID_t **/, uint[] pArrayGiveQuantity /*const uint32 **/, uint nArrayGiveLength /*uint32*/, SteamItemInstanceID_t[] pArrayGet /*const SteamItemInstanceID_t **/, uint[] pArrayGetQuantity /*const uint32 **/, uint nArrayGetLength /*uint32*/ )
{
return platform.ISteamInventory_TradeItems( ref pResultHandle.Value, steamIDTradePartner.Value, pArrayGive.Select( x => x.Value ).ToArray(), pArrayGiveQuantity, nArrayGiveLength, pArrayGet.Select( x => x.Value ).ToArray(), pArrayGetQuantity, nArrayGetLength );
}
// bool
public bool TransferItemQuantity( ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/, SteamItemInstanceID_t itemIdSource /*SteamItemInstanceID_t*/, uint unQuantity /*uint32*/, SteamItemInstanceID_t itemIdDest /*SteamItemInstanceID_t*/ )
{
return platform.ISteamInventory_TransferItemQuantity( ref pResultHandle.Value, itemIdSource.Value, unQuantity, itemIdDest.Value );
}
// bool
public bool TriggerItemDrop( ref SteamInventoryResult_t pResultHandle /*SteamInventoryResult_t **/, SteamItemDef_t dropListDefinition /*SteamItemDef_t*/ )
{
return platform.ISteamInventory_TriggerItemDrop( ref pResultHandle.Value, dropListDefinition.Value );
}
}
}
@@ -0,0 +1,313 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamMatchmaking : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamMatchmaking( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// int
public int AddFavoriteGame( AppId_t nAppID /*AppId_t*/, uint nIP /*uint32*/, ushort nConnPort /*uint16*/, ushort nQueryPort /*uint16*/, uint unFlags /*uint32*/, uint rTime32LastPlayedOnServer /*uint32*/ )
{
return platform.ISteamMatchmaking_AddFavoriteGame( nAppID.Value, nIP, nConnPort, nQueryPort, unFlags, rTime32LastPlayedOnServer );
}
// void
public void AddRequestLobbyListCompatibleMembersFilter( CSteamID steamIDLobby /*class CSteamID*/ )
{
platform.ISteamMatchmaking_AddRequestLobbyListCompatibleMembersFilter( steamIDLobby.Value );
}
// void
public void AddRequestLobbyListDistanceFilter( LobbyDistanceFilter eLobbyDistanceFilter /*ELobbyDistanceFilter*/ )
{
platform.ISteamMatchmaking_AddRequestLobbyListDistanceFilter( eLobbyDistanceFilter );
}
// void
public void AddRequestLobbyListFilterSlotsAvailable( int nSlotsAvailable /*int*/ )
{
platform.ISteamMatchmaking_AddRequestLobbyListFilterSlotsAvailable( nSlotsAvailable );
}
// void
public void AddRequestLobbyListNearValueFilter( string pchKeyToMatch /*const char **/, int nValueToBeCloseTo /*int*/ )
{
platform.ISteamMatchmaking_AddRequestLobbyListNearValueFilter( pchKeyToMatch, nValueToBeCloseTo );
}
// void
public void AddRequestLobbyListNumericalFilter( string pchKeyToMatch /*const char **/, int nValueToMatch /*int*/, LobbyComparison eComparisonType /*ELobbyComparison*/ )
{
platform.ISteamMatchmaking_AddRequestLobbyListNumericalFilter( pchKeyToMatch, nValueToMatch, eComparisonType );
}
// void
public void AddRequestLobbyListResultCountFilter( int cMaxResults /*int*/ )
{
platform.ISteamMatchmaking_AddRequestLobbyListResultCountFilter( cMaxResults );
}
// void
public void AddRequestLobbyListStringFilter( string pchKeyToMatch /*const char **/, string pchValueToMatch /*const char **/, LobbyComparison eComparisonType /*ELobbyComparison*/ )
{
platform.ISteamMatchmaking_AddRequestLobbyListStringFilter( pchKeyToMatch, pchValueToMatch, eComparisonType );
}
// SteamAPICall_t
public CallbackHandle CreateLobby( LobbyType eLobbyType /*ELobbyType*/, int cMaxMembers /*int*/, Action<LobbyCreated_t, bool> CallbackFunction = null /*Action<LobbyCreated_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamMatchmaking_CreateLobby( eLobbyType, cMaxMembers );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return LobbyCreated_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool DeleteLobbyData( CSteamID steamIDLobby /*class CSteamID*/, string pchKey /*const char **/ )
{
return platform.ISteamMatchmaking_DeleteLobbyData( steamIDLobby.Value, pchKey );
}
// bool
public bool GetFavoriteGame( int iGame /*int*/, ref AppId_t pnAppID /*AppId_t **/, out uint pnIP /*uint32 **/, out ushort pnConnPort /*uint16 **/, out ushort pnQueryPort /*uint16 **/, out uint punFlags /*uint32 **/, out uint pRTime32LastPlayedOnServer /*uint32 **/ )
{
return platform.ISteamMatchmaking_GetFavoriteGame( iGame, ref pnAppID.Value, out pnIP, out pnConnPort, out pnQueryPort, out punFlags, out pRTime32LastPlayedOnServer );
}
// int
public int GetFavoriteGameCount()
{
return platform.ISteamMatchmaking_GetFavoriteGameCount();
}
// ulong
public ulong GetLobbyByIndex( int iLobby /*int*/ )
{
return platform.ISteamMatchmaking_GetLobbyByIndex( iLobby );
}
// int
public int GetLobbyChatEntry( CSteamID steamIDLobby /*class CSteamID*/, int iChatID /*int*/, out CSteamID pSteamIDUser /*class CSteamID **/, IntPtr pvData /*void **/, int cubData /*int*/, out ChatEntryType peChatEntryType /*EChatEntryType **/ )
{
return platform.ISteamMatchmaking_GetLobbyChatEntry( steamIDLobby.Value, iChatID, out pSteamIDUser.Value, (IntPtr) pvData, cubData, out peChatEntryType );
}
// string
// with: Detect_StringReturn
public string GetLobbyData( CSteamID steamIDLobby /*class CSteamID*/, string pchKey /*const char **/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamMatchmaking_GetLobbyData( steamIDLobby.Value, pchKey );
return Marshal.PtrToStringAnsi( string_pointer );
}
// bool
// with: Detect_StringFetch False
// with: Detect_StringFetch False
public bool GetLobbyDataByIndex( CSteamID steamIDLobby /*class CSteamID*/, int iLobbyData /*int*/, out string pchKey /*char **/, out string pchValue /*char **/ )
{
bool bSuccess = default( bool );
pchKey = string.Empty;
System.Text.StringBuilder pchKey_sb = Helpers.TakeStringBuilder();
int cchKeyBufferSize = 4096;
pchValue = string.Empty;
System.Text.StringBuilder pchValue_sb = Helpers.TakeStringBuilder();
int cchValueBufferSize = 4096;
bSuccess = platform.ISteamMatchmaking_GetLobbyDataByIndex( steamIDLobby.Value, iLobbyData, pchKey_sb, cchKeyBufferSize, pchValue_sb, cchValueBufferSize );
if ( !bSuccess ) return bSuccess;
pchValue = pchValue_sb.ToString();
if ( !bSuccess ) return bSuccess;
pchKey = pchKey_sb.ToString();
return bSuccess;
}
// int
public int GetLobbyDataCount( CSteamID steamIDLobby /*class CSteamID*/ )
{
return platform.ISteamMatchmaking_GetLobbyDataCount( steamIDLobby.Value );
}
// bool
public bool GetLobbyGameServer( CSteamID steamIDLobby /*class CSteamID*/, out uint punGameServerIP /*uint32 **/, out ushort punGameServerPort /*uint16 **/, out CSteamID psteamIDGameServer /*class CSteamID **/ )
{
return platform.ISteamMatchmaking_GetLobbyGameServer( steamIDLobby.Value, out punGameServerIP, out punGameServerPort, out psteamIDGameServer.Value );
}
// ulong
public ulong GetLobbyMemberByIndex( CSteamID steamIDLobby /*class CSteamID*/, int iMember /*int*/ )
{
return platform.ISteamMatchmaking_GetLobbyMemberByIndex( steamIDLobby.Value, iMember );
}
// string
// with: Detect_StringReturn
public string GetLobbyMemberData( CSteamID steamIDLobby /*class CSteamID*/, CSteamID steamIDUser /*class CSteamID*/, string pchKey /*const char **/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamMatchmaking_GetLobbyMemberData( steamIDLobby.Value, steamIDUser.Value, pchKey );
return Marshal.PtrToStringAnsi( string_pointer );
}
// int
public int GetLobbyMemberLimit( CSteamID steamIDLobby /*class CSteamID*/ )
{
return platform.ISteamMatchmaking_GetLobbyMemberLimit( steamIDLobby.Value );
}
// ulong
public ulong GetLobbyOwner( CSteamID steamIDLobby /*class CSteamID*/ )
{
return platform.ISteamMatchmaking_GetLobbyOwner( steamIDLobby.Value );
}
// int
public int GetNumLobbyMembers( CSteamID steamIDLobby /*class CSteamID*/ )
{
return platform.ISteamMatchmaking_GetNumLobbyMembers( steamIDLobby.Value );
}
// bool
public bool InviteUserToLobby( CSteamID steamIDLobby /*class CSteamID*/, CSteamID steamIDInvitee /*class CSteamID*/ )
{
return platform.ISteamMatchmaking_InviteUserToLobby( steamIDLobby.Value, steamIDInvitee.Value );
}
// SteamAPICall_t
public CallbackHandle JoinLobby( CSteamID steamIDLobby /*class CSteamID*/, Action<LobbyEnter_t, bool> CallbackFunction = null /*Action<LobbyEnter_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamMatchmaking_JoinLobby( steamIDLobby.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return LobbyEnter_t.CallResult( steamworks, callback, CallbackFunction );
}
// void
public void LeaveLobby( CSteamID steamIDLobby /*class CSteamID*/ )
{
platform.ISteamMatchmaking_LeaveLobby( steamIDLobby.Value );
}
// bool
public bool RemoveFavoriteGame( AppId_t nAppID /*AppId_t*/, uint nIP /*uint32*/, ushort nConnPort /*uint16*/, ushort nQueryPort /*uint16*/, uint unFlags /*uint32*/ )
{
return platform.ISteamMatchmaking_RemoveFavoriteGame( nAppID.Value, nIP, nConnPort, nQueryPort, unFlags );
}
// bool
public bool RequestLobbyData( CSteamID steamIDLobby /*class CSteamID*/ )
{
return platform.ISteamMatchmaking_RequestLobbyData( steamIDLobby.Value );
}
// SteamAPICall_t
public CallbackHandle RequestLobbyList( Action<LobbyMatchList_t, bool> CallbackFunction = null /*Action<LobbyMatchList_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamMatchmaking_RequestLobbyList();
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return LobbyMatchList_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool SendLobbyChatMsg( CSteamID steamIDLobby /*class CSteamID*/, IntPtr pvMsgBody /*const void **/, int cubMsgBody /*int*/ )
{
return platform.ISteamMatchmaking_SendLobbyChatMsg( steamIDLobby.Value, (IntPtr) pvMsgBody, cubMsgBody );
}
// bool
public bool SetLinkedLobby( CSteamID steamIDLobby /*class CSteamID*/, CSteamID steamIDLobbyDependent /*class CSteamID*/ )
{
return platform.ISteamMatchmaking_SetLinkedLobby( steamIDLobby.Value, steamIDLobbyDependent.Value );
}
// bool
public bool SetLobbyData( CSteamID steamIDLobby /*class CSteamID*/, string pchKey /*const char **/, string pchValue /*const char **/ )
{
return platform.ISteamMatchmaking_SetLobbyData( steamIDLobby.Value, pchKey, pchValue );
}
// void
public void SetLobbyGameServer( CSteamID steamIDLobby /*class CSteamID*/, uint unGameServerIP /*uint32*/, ushort unGameServerPort /*uint16*/, CSteamID steamIDGameServer /*class CSteamID*/ )
{
platform.ISteamMatchmaking_SetLobbyGameServer( steamIDLobby.Value, unGameServerIP, unGameServerPort, steamIDGameServer.Value );
}
// bool
public bool SetLobbyJoinable( CSteamID steamIDLobby /*class CSteamID*/, bool bLobbyJoinable /*bool*/ )
{
return platform.ISteamMatchmaking_SetLobbyJoinable( steamIDLobby.Value, bLobbyJoinable );
}
// void
public void SetLobbyMemberData( CSteamID steamIDLobby /*class CSteamID*/, string pchKey /*const char **/, string pchValue /*const char **/ )
{
platform.ISteamMatchmaking_SetLobbyMemberData( steamIDLobby.Value, pchKey, pchValue );
}
// bool
public bool SetLobbyMemberLimit( CSteamID steamIDLobby /*class CSteamID*/, int cMaxMembers /*int*/ )
{
return platform.ISteamMatchmaking_SetLobbyMemberLimit( steamIDLobby.Value, cMaxMembers );
}
// bool
public bool SetLobbyOwner( CSteamID steamIDLobby /*class CSteamID*/, CSteamID steamIDNewOwner /*class CSteamID*/ )
{
return platform.ISteamMatchmaking_SetLobbyOwner( steamIDLobby.Value, steamIDNewOwner.Value );
}
// bool
public bool SetLobbyType( CSteamID steamIDLobby /*class CSteamID*/, LobbyType eLobbyType /*ELobbyType*/ )
{
return platform.ISteamMatchmaking_SetLobbyType( steamIDLobby.Value, eLobbyType );
}
}
}
@@ -0,0 +1,158 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamMatchmakingServers : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamMatchmakingServers( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// void
public void CancelQuery( HServerListRequest hRequest /*HServerListRequest*/ )
{
platform.ISteamMatchmakingServers_CancelQuery( hRequest.Value );
}
// void
public void CancelServerQuery( HServerQuery hServerQuery /*HServerQuery*/ )
{
platform.ISteamMatchmakingServers_CancelServerQuery( hServerQuery.Value );
}
// int
public int GetServerCount( HServerListRequest hRequest /*HServerListRequest*/ )
{
return platform.ISteamMatchmakingServers_GetServerCount( hRequest.Value );
}
// gameserveritem_t *
// with: Detect_ReturningStruct
public gameserveritem_t GetServerDetails( HServerListRequest hRequest /*HServerListRequest*/, int iServer /*int*/ )
{
IntPtr struct_pointer;
struct_pointer = platform.ISteamMatchmakingServers_GetServerDetails( hRequest.Value, iServer );
if ( struct_pointer == IntPtr.Zero ) return default(gameserveritem_t);
return gameserveritem_t.FromPointer( struct_pointer );
}
// bool
public bool IsRefreshing( HServerListRequest hRequest /*HServerListRequest*/ )
{
return platform.ISteamMatchmakingServers_IsRefreshing( hRequest.Value );
}
// HServerQuery
public HServerQuery PingServer( uint unIP /*uint32*/, ushort usPort /*uint16*/, IntPtr pRequestServersResponse /*class ISteamMatchmakingPingResponse **/ )
{
return platform.ISteamMatchmakingServers_PingServer( unIP, usPort, (IntPtr) pRequestServersResponse );
}
// HServerQuery
public HServerQuery PlayerDetails( uint unIP /*uint32*/, ushort usPort /*uint16*/, IntPtr pRequestServersResponse /*class ISteamMatchmakingPlayersResponse **/ )
{
return platform.ISteamMatchmakingServers_PlayerDetails( unIP, usPort, (IntPtr) pRequestServersResponse );
}
// void
public void RefreshQuery( HServerListRequest hRequest /*HServerListRequest*/ )
{
platform.ISteamMatchmakingServers_RefreshQuery( hRequest.Value );
}
// void
public void RefreshServer( HServerListRequest hRequest /*HServerListRequest*/, int iServer /*int*/ )
{
platform.ISteamMatchmakingServers_RefreshServer( hRequest.Value, iServer );
}
// void
public void ReleaseRequest( HServerListRequest hServerListRequest /*HServerListRequest*/ )
{
platform.ISteamMatchmakingServers_ReleaseRequest( hServerListRequest.Value );
}
// HServerListRequest
// with: Detect_MatchmakingFilters
public HServerListRequest RequestFavoritesServerList( AppId_t iApp /*AppId_t*/, IntPtr ppchFilters /*struct MatchMakingKeyValuePair_t ***/, uint nFilters /*uint32*/, IntPtr pRequestServersResponse /*class ISteamMatchmakingServerListResponse **/ )
{
return platform.ISteamMatchmakingServers_RequestFavoritesServerList( iApp.Value, (IntPtr) ppchFilters, nFilters, (IntPtr) pRequestServersResponse );
}
// HServerListRequest
// with: Detect_MatchmakingFilters
public HServerListRequest RequestFriendsServerList( AppId_t iApp /*AppId_t*/, IntPtr ppchFilters /*struct MatchMakingKeyValuePair_t ***/, uint nFilters /*uint32*/, IntPtr pRequestServersResponse /*class ISteamMatchmakingServerListResponse **/ )
{
return platform.ISteamMatchmakingServers_RequestFriendsServerList( iApp.Value, (IntPtr) ppchFilters, nFilters, (IntPtr) pRequestServersResponse );
}
// HServerListRequest
// with: Detect_MatchmakingFilters
public HServerListRequest RequestHistoryServerList( AppId_t iApp /*AppId_t*/, IntPtr ppchFilters /*struct MatchMakingKeyValuePair_t ***/, uint nFilters /*uint32*/, IntPtr pRequestServersResponse /*class ISteamMatchmakingServerListResponse **/ )
{
return platform.ISteamMatchmakingServers_RequestHistoryServerList( iApp.Value, (IntPtr) ppchFilters, nFilters, (IntPtr) pRequestServersResponse );
}
// HServerListRequest
// with: Detect_MatchmakingFilters
public HServerListRequest RequestInternetServerList( AppId_t iApp /*AppId_t*/, IntPtr ppchFilters /*struct MatchMakingKeyValuePair_t ***/, uint nFilters /*uint32*/, IntPtr pRequestServersResponse /*class ISteamMatchmakingServerListResponse **/ )
{
return platform.ISteamMatchmakingServers_RequestInternetServerList( iApp.Value, (IntPtr) ppchFilters, nFilters, (IntPtr) pRequestServersResponse );
}
// HServerListRequest
public HServerListRequest RequestLANServerList( AppId_t iApp /*AppId_t*/, IntPtr pRequestServersResponse /*class ISteamMatchmakingServerListResponse **/ )
{
return platform.ISteamMatchmakingServers_RequestLANServerList( iApp.Value, (IntPtr) pRequestServersResponse );
}
// HServerListRequest
// with: Detect_MatchmakingFilters
public HServerListRequest RequestSpectatorServerList( AppId_t iApp /*AppId_t*/, IntPtr ppchFilters /*struct MatchMakingKeyValuePair_t ***/, uint nFilters /*uint32*/, IntPtr pRequestServersResponse /*class ISteamMatchmakingServerListResponse **/ )
{
return platform.ISteamMatchmakingServers_RequestSpectatorServerList( iApp.Value, (IntPtr) ppchFilters, nFilters, (IntPtr) pRequestServersResponse );
}
// HServerQuery
public HServerQuery ServerRules( uint unIP /*uint32*/, ushort usPort /*uint16*/, IntPtr pRequestServersResponse /*class ISteamMatchmakingRulesResponse **/ )
{
return platform.ISteamMatchmakingServers_ServerRules( unIP, usPort, (IntPtr) pRequestServersResponse );
}
}
}
@@ -0,0 +1,101 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamMusic : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamMusic( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// bool
public bool BIsEnabled()
{
return platform.ISteamMusic_BIsEnabled();
}
// bool
public bool BIsPlaying()
{
return platform.ISteamMusic_BIsPlaying();
}
// AudioPlayback_Status
public AudioPlayback_Status GetPlaybackStatus()
{
return platform.ISteamMusic_GetPlaybackStatus();
}
// float
public float GetVolume()
{
return platform.ISteamMusic_GetVolume();
}
// void
public void Pause()
{
platform.ISteamMusic_Pause();
}
// void
public void Play()
{
platform.ISteamMusic_Play();
}
// void
public void PlayNext()
{
platform.ISteamMusic_PlayNext();
}
// void
public void PlayPrevious()
{
platform.ISteamMusic_PlayPrevious();
}
// void
public void SetVolume( float flVolume /*float*/ )
{
platform.ISteamMusic_SetVolume( flVolume );
}
}
}
@@ -0,0 +1,239 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamMusicRemote : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamMusicRemote( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// bool
public bool BActivationSuccess( bool bValue /*bool*/ )
{
return platform.ISteamMusicRemote_BActivationSuccess( bValue );
}
// bool
public bool BIsCurrentMusicRemote()
{
return platform.ISteamMusicRemote_BIsCurrentMusicRemote();
}
// bool
public bool CurrentEntryDidChange()
{
return platform.ISteamMusicRemote_CurrentEntryDidChange();
}
// bool
public bool CurrentEntryIsAvailable( bool bAvailable /*bool*/ )
{
return platform.ISteamMusicRemote_CurrentEntryIsAvailable( bAvailable );
}
// bool
public bool CurrentEntryWillChange()
{
return platform.ISteamMusicRemote_CurrentEntryWillChange();
}
// bool
public bool DeregisterSteamMusicRemote()
{
return platform.ISteamMusicRemote_DeregisterSteamMusicRemote();
}
// bool
public bool EnableLooped( bool bValue /*bool*/ )
{
return platform.ISteamMusicRemote_EnableLooped( bValue );
}
// bool
public bool EnablePlaylists( bool bValue /*bool*/ )
{
return platform.ISteamMusicRemote_EnablePlaylists( bValue );
}
// bool
public bool EnablePlayNext( bool bValue /*bool*/ )
{
return platform.ISteamMusicRemote_EnablePlayNext( bValue );
}
// bool
public bool EnablePlayPrevious( bool bValue /*bool*/ )
{
return platform.ISteamMusicRemote_EnablePlayPrevious( bValue );
}
// bool
public bool EnableQueue( bool bValue /*bool*/ )
{
return platform.ISteamMusicRemote_EnableQueue( bValue );
}
// bool
public bool EnableShuffled( bool bValue /*bool*/ )
{
return platform.ISteamMusicRemote_EnableShuffled( bValue );
}
// bool
public bool PlaylistDidChange()
{
return platform.ISteamMusicRemote_PlaylistDidChange();
}
// bool
public bool PlaylistWillChange()
{
return platform.ISteamMusicRemote_PlaylistWillChange();
}
// bool
public bool QueueDidChange()
{
return platform.ISteamMusicRemote_QueueDidChange();
}
// bool
public bool QueueWillChange()
{
return platform.ISteamMusicRemote_QueueWillChange();
}
// bool
public bool RegisterSteamMusicRemote( string pchName /*const char **/ )
{
return platform.ISteamMusicRemote_RegisterSteamMusicRemote( pchName );
}
// bool
public bool ResetPlaylistEntries()
{
return platform.ISteamMusicRemote_ResetPlaylistEntries();
}
// bool
public bool ResetQueueEntries()
{
return platform.ISteamMusicRemote_ResetQueueEntries();
}
// bool
public bool SetCurrentPlaylistEntry( int nID /*int*/ )
{
return platform.ISteamMusicRemote_SetCurrentPlaylistEntry( nID );
}
// bool
public bool SetCurrentQueueEntry( int nID /*int*/ )
{
return platform.ISteamMusicRemote_SetCurrentQueueEntry( nID );
}
// bool
public bool SetDisplayName( string pchDisplayName /*const char **/ )
{
return platform.ISteamMusicRemote_SetDisplayName( pchDisplayName );
}
// bool
public bool SetPlaylistEntry( int nID /*int*/, int nPosition /*int*/, string pchEntryText /*const char **/ )
{
return platform.ISteamMusicRemote_SetPlaylistEntry( nID, nPosition, pchEntryText );
}
// bool
public bool SetPNGIcon_64x64( IntPtr pvBuffer /*void **/, uint cbBufferLength /*uint32*/ )
{
return platform.ISteamMusicRemote_SetPNGIcon_64x64( (IntPtr) pvBuffer, cbBufferLength );
}
// bool
public bool SetQueueEntry( int nID /*int*/, int nPosition /*int*/, string pchEntryText /*const char **/ )
{
return platform.ISteamMusicRemote_SetQueueEntry( nID, nPosition, pchEntryText );
}
// bool
public bool UpdateCurrentEntryCoverArt( IntPtr pvBuffer /*void **/, uint cbBufferLength /*uint32*/ )
{
return platform.ISteamMusicRemote_UpdateCurrentEntryCoverArt( (IntPtr) pvBuffer, cbBufferLength );
}
// bool
public bool UpdateCurrentEntryElapsedSeconds( int nValue /*int*/ )
{
return platform.ISteamMusicRemote_UpdateCurrentEntryElapsedSeconds( nValue );
}
// bool
public bool UpdateCurrentEntryText( string pchText /*const char **/ )
{
return platform.ISteamMusicRemote_UpdateCurrentEntryText( pchText );
}
// bool
public bool UpdateLooped( bool bValue /*bool*/ )
{
return platform.ISteamMusicRemote_UpdateLooped( bValue );
}
// bool
public bool UpdatePlaybackStatus( AudioPlayback_Status nStatus /*AudioPlayback_Status*/ )
{
return platform.ISteamMusicRemote_UpdatePlaybackStatus( nStatus );
}
// bool
public bool UpdateShuffled( bool bValue /*bool*/ )
{
return platform.ISteamMusicRemote_UpdateShuffled( bValue );
}
// bool
public bool UpdateVolume( float flValue /*float*/ )
{
return platform.ISteamMusicRemote_UpdateVolume( flValue );
}
}
}
@@ -0,0 +1,179 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamNetworking : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamNetworking( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// bool
public bool AcceptP2PSessionWithUser( CSteamID steamIDRemote /*class CSteamID*/ )
{
return platform.ISteamNetworking_AcceptP2PSessionWithUser( steamIDRemote.Value );
}
// bool
public bool AllowP2PPacketRelay( bool bAllow /*bool*/ )
{
return platform.ISteamNetworking_AllowP2PPacketRelay( bAllow );
}
// bool
public bool CloseP2PChannelWithUser( CSteamID steamIDRemote /*class CSteamID*/, int nChannel /*int*/ )
{
return platform.ISteamNetworking_CloseP2PChannelWithUser( steamIDRemote.Value, nChannel );
}
// bool
public bool CloseP2PSessionWithUser( CSteamID steamIDRemote /*class CSteamID*/ )
{
return platform.ISteamNetworking_CloseP2PSessionWithUser( steamIDRemote.Value );
}
// SNetSocket_t
public SNetSocket_t CreateConnectionSocket( uint nIP /*uint32*/, ushort nPort /*uint16*/, int nTimeoutSec /*int*/ )
{
return platform.ISteamNetworking_CreateConnectionSocket( nIP, nPort, nTimeoutSec );
}
// SNetListenSocket_t
public SNetListenSocket_t CreateListenSocket( int nVirtualP2PPort /*int*/, uint nIP /*uint32*/, ushort nPort /*uint16*/, bool bAllowUseOfPacketRelay /*bool*/ )
{
return platform.ISteamNetworking_CreateListenSocket( nVirtualP2PPort, nIP, nPort, bAllowUseOfPacketRelay );
}
// SNetSocket_t
public SNetSocket_t CreateP2PConnectionSocket( CSteamID steamIDTarget /*class CSteamID*/, int nVirtualPort /*int*/, int nTimeoutSec /*int*/, bool bAllowUseOfPacketRelay /*bool*/ )
{
return platform.ISteamNetworking_CreateP2PConnectionSocket( steamIDTarget.Value, nVirtualPort, nTimeoutSec, bAllowUseOfPacketRelay );
}
// bool
public bool DestroyListenSocket( SNetListenSocket_t hSocket /*SNetListenSocket_t*/, bool bNotifyRemoteEnd /*bool*/ )
{
return platform.ISteamNetworking_DestroyListenSocket( hSocket.Value, bNotifyRemoteEnd );
}
// bool
public bool DestroySocket( SNetSocket_t hSocket /*SNetSocket_t*/, bool bNotifyRemoteEnd /*bool*/ )
{
return platform.ISteamNetworking_DestroySocket( hSocket.Value, bNotifyRemoteEnd );
}
// bool
public bool GetListenSocketInfo( SNetListenSocket_t hListenSocket /*SNetListenSocket_t*/, out uint pnIP /*uint32 **/, out ushort pnPort /*uint16 **/ )
{
return platform.ISteamNetworking_GetListenSocketInfo( hListenSocket.Value, out pnIP, out pnPort );
}
// int
public int GetMaxPacketSize( SNetSocket_t hSocket /*SNetSocket_t*/ )
{
return platform.ISteamNetworking_GetMaxPacketSize( hSocket.Value );
}
// bool
public bool GetP2PSessionState( CSteamID steamIDRemote /*class CSteamID*/, ref P2PSessionState_t pConnectionState /*struct P2PSessionState_t **/ )
{
return platform.ISteamNetworking_GetP2PSessionState( steamIDRemote.Value, ref pConnectionState );
}
// SNetSocketConnectionType
public SNetSocketConnectionType GetSocketConnectionType( SNetSocket_t hSocket /*SNetSocket_t*/ )
{
return platform.ISteamNetworking_GetSocketConnectionType( hSocket.Value );
}
// bool
public bool GetSocketInfo( SNetSocket_t hSocket /*SNetSocket_t*/, out CSteamID pSteamIDRemote /*class CSteamID **/, IntPtr peSocketStatus /*int **/, out uint punIPRemote /*uint32 **/, out ushort punPortRemote /*uint16 **/ )
{
return platform.ISteamNetworking_GetSocketInfo( hSocket.Value, out pSteamIDRemote.Value, (IntPtr) peSocketStatus, out punIPRemote, out punPortRemote );
}
// bool
public bool IsDataAvailable( SNetListenSocket_t hListenSocket /*SNetListenSocket_t*/, out uint pcubMsgSize /*uint32 **/, ref SNetSocket_t phSocket /*SNetSocket_t **/ )
{
return platform.ISteamNetworking_IsDataAvailable( hListenSocket.Value, out pcubMsgSize, ref phSocket.Value );
}
// bool
public bool IsDataAvailableOnSocket( SNetSocket_t hSocket /*SNetSocket_t*/, out uint pcubMsgSize /*uint32 **/ )
{
return platform.ISteamNetworking_IsDataAvailableOnSocket( hSocket.Value, out pcubMsgSize );
}
// bool
public bool IsP2PPacketAvailable( out uint pcubMsgSize /*uint32 **/, int nChannel /*int*/ )
{
return platform.ISteamNetworking_IsP2PPacketAvailable( out pcubMsgSize, nChannel );
}
// bool
public bool ReadP2PPacket( IntPtr pubDest /*void **/, uint cubDest /*uint32*/, out uint pcubMsgSize /*uint32 **/, out CSteamID psteamIDRemote /*class CSteamID **/, int nChannel /*int*/ )
{
return platform.ISteamNetworking_ReadP2PPacket( (IntPtr) pubDest, cubDest, out pcubMsgSize, out psteamIDRemote.Value, nChannel );
}
// bool
public bool RetrieveData( SNetListenSocket_t hListenSocket /*SNetListenSocket_t*/, IntPtr pubDest /*void **/, uint cubDest /*uint32*/, out uint pcubMsgSize /*uint32 **/, ref SNetSocket_t phSocket /*SNetSocket_t **/ )
{
return platform.ISteamNetworking_RetrieveData( hListenSocket.Value, (IntPtr) pubDest, cubDest, out pcubMsgSize, ref phSocket.Value );
}
// bool
public bool RetrieveDataFromSocket( SNetSocket_t hSocket /*SNetSocket_t*/, IntPtr pubDest /*void **/, uint cubDest /*uint32*/, out uint pcubMsgSize /*uint32 **/ )
{
return platform.ISteamNetworking_RetrieveDataFromSocket( hSocket.Value, (IntPtr) pubDest, cubDest, out pcubMsgSize );
}
// bool
public bool SendDataOnSocket( SNetSocket_t hSocket /*SNetSocket_t*/, IntPtr pubData /*void **/, uint cubData /*uint32*/, bool bReliable /*bool*/ )
{
return platform.ISteamNetworking_SendDataOnSocket( hSocket.Value, (IntPtr) pubData, cubData, bReliable );
}
// bool
public bool SendP2PPacket( CSteamID steamIDRemote /*class CSteamID*/, IntPtr pubData /*const void **/, uint cubData /*uint32*/, P2PSend eP2PSendType /*EP2PSend*/, int nChannel /*int*/ )
{
return platform.ISteamNetworking_SendP2PPacket( steamIDRemote.Value, (IntPtr) pubData, cubData, eP2PSendType, nChannel );
}
}
}
@@ -0,0 +1,83 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamParentalSettings : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamParentalSettings( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// bool
public bool BIsAppBlocked( AppId_t nAppID /*AppId_t*/ )
{
return platform.ISteamParentalSettings_BIsAppBlocked( nAppID.Value );
}
// bool
public bool BIsAppInBlockList( AppId_t nAppID /*AppId_t*/ )
{
return platform.ISteamParentalSettings_BIsAppInBlockList( nAppID.Value );
}
// bool
public bool BIsFeatureBlocked( ParentalFeature eFeature /*EParentalFeature*/ )
{
return platform.ISteamParentalSettings_BIsFeatureBlocked( eFeature );
}
// bool
public bool BIsFeatureInBlockList( ParentalFeature eFeature /*EParentalFeature*/ )
{
return platform.ISteamParentalSettings_BIsFeatureInBlockList( eFeature );
}
// bool
public bool BIsParentalLockEnabled()
{
return platform.ISteamParentalSettings_BIsParentalLockEnabled();
}
// bool
public bool BIsParentalLockLocked()
{
return platform.ISteamParentalSettings_BIsParentalLockLocked();
}
}
}
@@ -0,0 +1,644 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamRemoteStorage : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamRemoteStorage( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// SteamAPICall_t
public CallbackHandle CommitPublishedFileUpdate( PublishedFileUpdateHandle_t updateHandle /*PublishedFileUpdateHandle_t*/, Action<RemoteStorageUpdatePublishedFileResult_t, bool> CallbackFunction = null /*Action<RemoteStorageUpdatePublishedFileResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_CommitPublishedFileUpdate( updateHandle.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageUpdatePublishedFileResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// PublishedFileUpdateHandle_t
public PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId /*PublishedFileId_t*/ )
{
return platform.ISteamRemoteStorage_CreatePublishedFileUpdateRequest( unPublishedFileId.Value );
}
// SteamAPICall_t
public CallbackHandle DeletePublishedFile( PublishedFileId_t unPublishedFileId /*PublishedFileId_t*/, Action<RemoteStorageDeletePublishedFileResult_t, bool> CallbackFunction = null /*Action<RemoteStorageDeletePublishedFileResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_DeletePublishedFile( unPublishedFileId.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageDeletePublishedFileResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle EnumeratePublishedFilesByUserAction( WorkshopFileAction eAction /*EWorkshopFileAction*/, uint unStartIndex /*uint32*/, Action<RemoteStorageEnumeratePublishedFilesByUserActionResult_t, bool> CallbackFunction = null /*Action<RemoteStorageEnumeratePublishedFilesByUserActionResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_EnumeratePublishedFilesByUserAction( eAction, unStartIndex );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageEnumeratePublishedFilesByUserActionResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
// using: Detect_StringArray
public CallbackHandle EnumeratePublishedWorkshopFiles( WorkshopEnumerationType eEnumerationType /*EWorkshopEnumerationType*/, uint unStartIndex /*uint32*/, uint unCount /*uint32*/, uint unDays /*uint32*/, string[] pTags /*struct SteamParamStringArray_t **/, ref SteamParamStringArray_t pUserTags /*struct SteamParamStringArray_t **/, Action<RemoteStorageEnumerateWorkshopFilesResult_t, bool> CallbackFunction = null /*Action<RemoteStorageEnumerateWorkshopFilesResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
// Create strings
var nativeStrings = new IntPtr[pTags.Length];
for ( int i = 0; i < pTags.Length; i++ )
{
nativeStrings[i] = Marshal.StringToHGlobalAnsi( pTags[i] );
}
try
{
// Create string array
var size = Marshal.SizeOf( typeof( IntPtr ) ) * nativeStrings.Length;
var nativeArray = Marshal.AllocHGlobal( size );
Marshal.Copy( nativeStrings, 0, nativeArray, nativeStrings.Length );
// Create SteamParamStringArray_t
var tags = new SteamParamStringArray_t();
tags.Strings = nativeArray;
tags.NumStrings = pTags.Length;
callback = platform.ISteamRemoteStorage_EnumeratePublishedWorkshopFiles( eEnumerationType, unStartIndex, unCount, unDays, ref tags, ref pUserTags );
}
finally
{
foreach ( var x in nativeStrings )
Marshal.FreeHGlobal( x );
}
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageEnumerateWorkshopFilesResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle EnumerateUserPublishedFiles( uint unStartIndex /*uint32*/, Action<RemoteStorageEnumerateUserPublishedFilesResult_t, bool> CallbackFunction = null /*Action<RemoteStorageEnumerateUserPublishedFilesResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_EnumerateUserPublishedFiles( unStartIndex );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageEnumerateUserPublishedFilesResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
// using: Detect_StringArray
public CallbackHandle EnumerateUserSharedWorkshopFiles( CSteamID steamId /*class CSteamID*/, uint unStartIndex /*uint32*/, string[] pRequiredTags /*struct SteamParamStringArray_t **/, ref SteamParamStringArray_t pExcludedTags /*struct SteamParamStringArray_t **/, Action<RemoteStorageEnumerateUserPublishedFilesResult_t, bool> CallbackFunction = null /*Action<RemoteStorageEnumerateUserPublishedFilesResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
// Create strings
var nativeStrings = new IntPtr[pRequiredTags.Length];
for ( int i = 0; i < pRequiredTags.Length; i++ )
{
nativeStrings[i] = Marshal.StringToHGlobalAnsi( pRequiredTags[i] );
}
try
{
// Create string array
var size = Marshal.SizeOf( typeof( IntPtr ) ) * nativeStrings.Length;
var nativeArray = Marshal.AllocHGlobal( size );
Marshal.Copy( nativeStrings, 0, nativeArray, nativeStrings.Length );
// Create SteamParamStringArray_t
var tags = new SteamParamStringArray_t();
tags.Strings = nativeArray;
tags.NumStrings = pRequiredTags.Length;
callback = platform.ISteamRemoteStorage_EnumerateUserSharedWorkshopFiles( steamId.Value, unStartIndex, ref tags, ref pExcludedTags );
}
finally
{
foreach ( var x in nativeStrings )
Marshal.FreeHGlobal( x );
}
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageEnumerateUserPublishedFilesResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle EnumerateUserSubscribedFiles( uint unStartIndex /*uint32*/, Action<RemoteStorageEnumerateUserSubscribedFilesResult_t, bool> CallbackFunction = null /*Action<RemoteStorageEnumerateUserSubscribedFilesResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_EnumerateUserSubscribedFiles( unStartIndex );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageEnumerateUserSubscribedFilesResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool FileDelete( string pchFile /*const char **/ )
{
return platform.ISteamRemoteStorage_FileDelete( pchFile );
}
// bool
public bool FileExists( string pchFile /*const char **/ )
{
return platform.ISteamRemoteStorage_FileExists( pchFile );
}
// bool
public bool FileForget( string pchFile /*const char **/ )
{
return platform.ISteamRemoteStorage_FileForget( pchFile );
}
// bool
public bool FilePersisted( string pchFile /*const char **/ )
{
return platform.ISteamRemoteStorage_FilePersisted( pchFile );
}
// int
public int FileRead( string pchFile /*const char **/, IntPtr pvData /*void **/, int cubDataToRead /*int32*/ )
{
return platform.ISteamRemoteStorage_FileRead( pchFile, (IntPtr) pvData, cubDataToRead );
}
// SteamAPICall_t
public CallbackHandle FileReadAsync( string pchFile /*const char **/, uint nOffset /*uint32*/, uint cubToRead /*uint32*/, Action<RemoteStorageFileReadAsyncComplete_t, bool> CallbackFunction = null /*Action<RemoteStorageFileReadAsyncComplete_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_FileReadAsync( pchFile, nOffset, cubToRead );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageFileReadAsyncComplete_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool FileReadAsyncComplete( SteamAPICall_t hReadCall /*SteamAPICall_t*/, IntPtr pvBuffer /*void **/, uint cubToRead /*uint32*/ )
{
return platform.ISteamRemoteStorage_FileReadAsyncComplete( hReadCall.Value, (IntPtr) pvBuffer, cubToRead );
}
// SteamAPICall_t
public CallbackHandle FileShare( string pchFile /*const char **/, Action<RemoteStorageFileShareResult_t, bool> CallbackFunction = null /*Action<RemoteStorageFileShareResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_FileShare( pchFile );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageFileShareResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool FileWrite( string pchFile /*const char **/, IntPtr pvData /*const void **/, int cubData /*int32*/ )
{
return platform.ISteamRemoteStorage_FileWrite( pchFile, (IntPtr) pvData, cubData );
}
// SteamAPICall_t
public CallbackHandle FileWriteAsync( string pchFile /*const char **/, IntPtr pvData /*const void **/, uint cubData /*uint32*/, Action<RemoteStorageFileWriteAsyncComplete_t, bool> CallbackFunction = null /*Action<RemoteStorageFileWriteAsyncComplete_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_FileWriteAsync( pchFile, (IntPtr) pvData, cubData );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageFileWriteAsyncComplete_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle /*UGCFileWriteStreamHandle_t*/ )
{
return platform.ISteamRemoteStorage_FileWriteStreamCancel( writeHandle.Value );
}
// bool
public bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle /*UGCFileWriteStreamHandle_t*/ )
{
return platform.ISteamRemoteStorage_FileWriteStreamClose( writeHandle.Value );
}
// UGCFileWriteStreamHandle_t
public UGCFileWriteStreamHandle_t FileWriteStreamOpen( string pchFile /*const char **/ )
{
return platform.ISteamRemoteStorage_FileWriteStreamOpen( pchFile );
}
// bool
public bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle /*UGCFileWriteStreamHandle_t*/, IntPtr pvData /*const void **/, int cubData /*int32*/ )
{
return platform.ISteamRemoteStorage_FileWriteStreamWriteChunk( writeHandle.Value, (IntPtr) pvData, cubData );
}
// int
public int GetCachedUGCCount()
{
return platform.ISteamRemoteStorage_GetCachedUGCCount();
}
// UGCHandle_t
public UGCHandle_t GetCachedUGCHandle( int iCachedContent /*int32*/ )
{
return platform.ISteamRemoteStorage_GetCachedUGCHandle( iCachedContent );
}
// int
public int GetFileCount()
{
return platform.ISteamRemoteStorage_GetFileCount();
}
// string
// with: Detect_StringReturn
public string GetFileNameAndSize( int iFile /*int*/, out int pnFileSizeInBytes /*int32 **/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamRemoteStorage_GetFileNameAndSize( iFile, out pnFileSizeInBytes );
return Marshal.PtrToStringAnsi( string_pointer );
}
// int
public int GetFileSize( string pchFile /*const char **/ )
{
return platform.ISteamRemoteStorage_GetFileSize( pchFile );
}
// long
public long GetFileTimestamp( string pchFile /*const char **/ )
{
return platform.ISteamRemoteStorage_GetFileTimestamp( pchFile );
}
// SteamAPICall_t
public CallbackHandle GetPublishedFileDetails( PublishedFileId_t unPublishedFileId /*PublishedFileId_t*/, uint unMaxSecondsOld /*uint32*/, Action<RemoteStorageGetPublishedFileDetailsResult_t, bool> CallbackFunction = null /*Action<RemoteStorageGetPublishedFileDetailsResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_GetPublishedFileDetails( unPublishedFileId.Value, unMaxSecondsOld );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageGetPublishedFileDetailsResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId /*PublishedFileId_t*/, Action<RemoteStorageGetPublishedItemVoteDetailsResult_t, bool> CallbackFunction = null /*Action<RemoteStorageGetPublishedItemVoteDetailsResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_GetPublishedItemVoteDetails( unPublishedFileId.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageGetPublishedItemVoteDetailsResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool GetQuota( out ulong pnTotalBytes /*uint64 **/, out ulong puAvailableBytes /*uint64 **/ )
{
return platform.ISteamRemoteStorage_GetQuota( out pnTotalBytes, out puAvailableBytes );
}
// RemoteStoragePlatform
public RemoteStoragePlatform GetSyncPlatforms( string pchFile /*const char **/ )
{
return platform.ISteamRemoteStorage_GetSyncPlatforms( pchFile );
}
// bool
// with: Detect_StringFetch False
public bool GetUGCDetails( UGCHandle_t hContent /*UGCHandle_t*/, ref AppId_t pnAppID /*AppId_t **/, out string ppchName /*char ***/, out CSteamID pSteamIDOwner /*class CSteamID **/ )
{
bool bSuccess = default( bool );
ppchName = string.Empty;
System.Text.StringBuilder ppchName_sb = Helpers.TakeStringBuilder();
int pnFileSizeInBytes = 4096;
bSuccess = platform.ISteamRemoteStorage_GetUGCDetails( hContent.Value, ref pnAppID.Value, ppchName_sb, out pnFileSizeInBytes, out pSteamIDOwner.Value );
if ( !bSuccess ) return bSuccess;
ppchName = ppchName_sb.ToString();
return bSuccess;
}
// bool
public bool GetUGCDownloadProgress( UGCHandle_t hContent /*UGCHandle_t*/, out int pnBytesDownloaded /*int32 **/, out int pnBytesExpected /*int32 **/ )
{
return platform.ISteamRemoteStorage_GetUGCDownloadProgress( hContent.Value, out pnBytesDownloaded, out pnBytesExpected );
}
// SteamAPICall_t
public CallbackHandle GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId /*PublishedFileId_t*/, Action<RemoteStorageGetPublishedItemVoteDetailsResult_t, bool> CallbackFunction = null /*Action<RemoteStorageGetPublishedItemVoteDetailsResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_GetUserPublishedItemVoteDetails( unPublishedFileId.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageGetPublishedItemVoteDetailsResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool IsCloudEnabledForAccount()
{
return platform.ISteamRemoteStorage_IsCloudEnabledForAccount();
}
// bool
public bool IsCloudEnabledForApp()
{
return platform.ISteamRemoteStorage_IsCloudEnabledForApp();
}
// SteamAPICall_t
// using: Detect_StringArray
public CallbackHandle PublishVideo( WorkshopVideoProvider eVideoProvider /*EWorkshopVideoProvider*/, string pchVideoAccount /*const char **/, string pchVideoIdentifier /*const char **/, string pchPreviewFile /*const char **/, AppId_t nConsumerAppId /*AppId_t*/, string pchTitle /*const char **/, string pchDescription /*const char **/, RemoteStoragePublishedFileVisibility eVisibility /*ERemoteStoragePublishedFileVisibility*/, string[] pTags /*struct SteamParamStringArray_t **/, Action<RemoteStoragePublishFileProgress_t, bool> CallbackFunction = null /*Action<RemoteStoragePublishFileProgress_t, bool>*/ )
{
SteamAPICall_t callback = 0;
// Create strings
var nativeStrings = new IntPtr[pTags.Length];
for ( int i = 0; i < pTags.Length; i++ )
{
nativeStrings[i] = Marshal.StringToHGlobalAnsi( pTags[i] );
}
try
{
// Create string array
var size = Marshal.SizeOf( typeof( IntPtr ) ) * nativeStrings.Length;
var nativeArray = Marshal.AllocHGlobal( size );
Marshal.Copy( nativeStrings, 0, nativeArray, nativeStrings.Length );
// Create SteamParamStringArray_t
var tags = new SteamParamStringArray_t();
tags.Strings = nativeArray;
tags.NumStrings = pTags.Length;
callback = platform.ISteamRemoteStorage_PublishVideo( eVideoProvider, pchVideoAccount, pchVideoIdentifier, pchPreviewFile, nConsumerAppId.Value, pchTitle, pchDescription, eVisibility, ref tags );
}
finally
{
foreach ( var x in nativeStrings )
Marshal.FreeHGlobal( x );
}
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStoragePublishFileProgress_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
// using: Detect_StringArray
public CallbackHandle PublishWorkshopFile( string pchFile /*const char **/, string pchPreviewFile /*const char **/, AppId_t nConsumerAppId /*AppId_t*/, string pchTitle /*const char **/, string pchDescription /*const char **/, RemoteStoragePublishedFileVisibility eVisibility /*ERemoteStoragePublishedFileVisibility*/, string[] pTags /*struct SteamParamStringArray_t **/, WorkshopFileType eWorkshopFileType /*EWorkshopFileType*/, Action<RemoteStoragePublishFileProgress_t, bool> CallbackFunction = null /*Action<RemoteStoragePublishFileProgress_t, bool>*/ )
{
SteamAPICall_t callback = 0;
// Create strings
var nativeStrings = new IntPtr[pTags.Length];
for ( int i = 0; i < pTags.Length; i++ )
{
nativeStrings[i] = Marshal.StringToHGlobalAnsi( pTags[i] );
}
try
{
// Create string array
var size = Marshal.SizeOf( typeof( IntPtr ) ) * nativeStrings.Length;
var nativeArray = Marshal.AllocHGlobal( size );
Marshal.Copy( nativeStrings, 0, nativeArray, nativeStrings.Length );
// Create SteamParamStringArray_t
var tags = new SteamParamStringArray_t();
tags.Strings = nativeArray;
tags.NumStrings = pTags.Length;
callback = platform.ISteamRemoteStorage_PublishWorkshopFile( pchFile, pchPreviewFile, nConsumerAppId.Value, pchTitle, pchDescription, eVisibility, ref tags, eWorkshopFileType );
}
finally
{
foreach ( var x in nativeStrings )
Marshal.FreeHGlobal( x );
}
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStoragePublishFileProgress_t.CallResult( steamworks, callback, CallbackFunction );
}
// void
public void SetCloudEnabledForApp( bool bEnabled /*bool*/ )
{
platform.ISteamRemoteStorage_SetCloudEnabledForApp( bEnabled );
}
// bool
public bool SetSyncPlatforms( string pchFile /*const char **/, RemoteStoragePlatform eRemoteStoragePlatform /*ERemoteStoragePlatform*/ )
{
return platform.ISteamRemoteStorage_SetSyncPlatforms( pchFile, eRemoteStoragePlatform );
}
// SteamAPICall_t
public CallbackHandle SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId /*PublishedFileId_t*/, WorkshopFileAction eAction /*EWorkshopFileAction*/, Action<RemoteStorageSetUserPublishedFileActionResult_t, bool> CallbackFunction = null /*Action<RemoteStorageSetUserPublishedFileActionResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_SetUserPublishedFileAction( unPublishedFileId.Value, eAction );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageSetUserPublishedFileActionResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle SubscribePublishedFile( PublishedFileId_t unPublishedFileId /*PublishedFileId_t*/, Action<RemoteStorageSubscribePublishedFileResult_t, bool> CallbackFunction = null /*Action<RemoteStorageSubscribePublishedFileResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_SubscribePublishedFile( unPublishedFileId.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageSubscribePublishedFileResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle UGCDownload( UGCHandle_t hContent /*UGCHandle_t*/, uint unPriority /*uint32*/, Action<RemoteStorageDownloadUGCResult_t, bool> CallbackFunction = null /*Action<RemoteStorageDownloadUGCResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_UGCDownload( hContent.Value, unPriority );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageDownloadUGCResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle UGCDownloadToLocation( UGCHandle_t hContent /*UGCHandle_t*/, string pchLocation /*const char **/, uint unPriority /*uint32*/, Action<RemoteStorageDownloadUGCResult_t, bool> CallbackFunction = null /*Action<RemoteStorageDownloadUGCResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_UGCDownloadToLocation( hContent.Value, pchLocation, unPriority );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageDownloadUGCResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// int
public int UGCRead( UGCHandle_t hContent /*UGCHandle_t*/, IntPtr pvData /*void **/, int cubDataToRead /*int32*/, uint cOffset /*uint32*/, UGCReadAction eAction /*EUGCReadAction*/ )
{
return platform.ISteamRemoteStorage_UGCRead( hContent.Value, (IntPtr) pvData, cubDataToRead, cOffset, eAction );
}
// SteamAPICall_t
public CallbackHandle UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId /*PublishedFileId_t*/, Action<RemoteStorageUnsubscribePublishedFileResult_t, bool> CallbackFunction = null /*Action<RemoteStorageUnsubscribePublishedFileResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_UnsubscribePublishedFile( unPublishedFileId.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageUnsubscribePublishedFileResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool UpdatePublishedFileDescription( PublishedFileUpdateHandle_t updateHandle /*PublishedFileUpdateHandle_t*/, string pchDescription /*const char **/ )
{
return platform.ISteamRemoteStorage_UpdatePublishedFileDescription( updateHandle.Value, pchDescription );
}
// bool
public bool UpdatePublishedFileFile( PublishedFileUpdateHandle_t updateHandle /*PublishedFileUpdateHandle_t*/, string pchFile /*const char **/ )
{
return platform.ISteamRemoteStorage_UpdatePublishedFileFile( updateHandle.Value, pchFile );
}
// bool
public bool UpdatePublishedFilePreviewFile( PublishedFileUpdateHandle_t updateHandle /*PublishedFileUpdateHandle_t*/, string pchPreviewFile /*const char **/ )
{
return platform.ISteamRemoteStorage_UpdatePublishedFilePreviewFile( updateHandle.Value, pchPreviewFile );
}
// bool
public bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle /*PublishedFileUpdateHandle_t*/, string pchChangeDescription /*const char **/ )
{
return platform.ISteamRemoteStorage_UpdatePublishedFileSetChangeDescription( updateHandle.Value, pchChangeDescription );
}
// bool
// using: Detect_StringArray
public bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle /*PublishedFileUpdateHandle_t*/, string[] pTags /*struct SteamParamStringArray_t **/ )
{
// Create strings
var nativeStrings = new IntPtr[pTags.Length];
for ( int i = 0; i < pTags.Length; i++ )
{
nativeStrings[i] = Marshal.StringToHGlobalAnsi( pTags[i] );
}
try
{
// Create string array
var size = Marshal.SizeOf( typeof( IntPtr ) ) * nativeStrings.Length;
var nativeArray = Marshal.AllocHGlobal( size );
Marshal.Copy( nativeStrings, 0, nativeArray, nativeStrings.Length );
// Create SteamParamStringArray_t
var tags = new SteamParamStringArray_t();
tags.Strings = nativeArray;
tags.NumStrings = pTags.Length;
return platform.ISteamRemoteStorage_UpdatePublishedFileTags( updateHandle.Value, ref tags );
}
finally
{
foreach ( var x in nativeStrings )
Marshal.FreeHGlobal( x );
}
}
// bool
public bool UpdatePublishedFileTitle( PublishedFileUpdateHandle_t updateHandle /*PublishedFileUpdateHandle_t*/, string pchTitle /*const char **/ )
{
return platform.ISteamRemoteStorage_UpdatePublishedFileTitle( updateHandle.Value, pchTitle );
}
// bool
public bool UpdatePublishedFileVisibility( PublishedFileUpdateHandle_t updateHandle /*PublishedFileUpdateHandle_t*/, RemoteStoragePublishedFileVisibility eVisibility /*ERemoteStoragePublishedFileVisibility*/ )
{
return platform.ISteamRemoteStorage_UpdatePublishedFileVisibility( updateHandle.Value, eVisibility );
}
// SteamAPICall_t
public CallbackHandle UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId /*PublishedFileId_t*/, bool bVoteUp /*bool*/, Action<RemoteStorageUpdateUserPublishedItemVoteResult_t, bool> CallbackFunction = null /*Action<RemoteStorageUpdateUserPublishedItemVoteResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamRemoteStorage_UpdateUserPublishedItemVote( unPublishedFileId.Value, bVoteUp );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageUpdateUserPublishedItemVoteResult_t.CallResult( steamworks, callback, CallbackFunction );
}
}
}
@@ -0,0 +1,101 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamScreenshots : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamScreenshots( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// ScreenshotHandle
public ScreenshotHandle AddScreenshotToLibrary( string pchFilename /*const char **/, string pchThumbnailFilename /*const char **/, int nWidth /*int*/, int nHeight /*int*/ )
{
return platform.ISteamScreenshots_AddScreenshotToLibrary( pchFilename, pchThumbnailFilename, nWidth, nHeight );
}
// ScreenshotHandle
public ScreenshotHandle AddVRScreenshotToLibrary( VRScreenshotType eType /*EVRScreenshotType*/, string pchFilename /*const char **/, string pchVRFilename /*const char **/ )
{
return platform.ISteamScreenshots_AddVRScreenshotToLibrary( eType, pchFilename, pchVRFilename );
}
// void
public void HookScreenshots( bool bHook /*bool*/ )
{
platform.ISteamScreenshots_HookScreenshots( bHook );
}
// bool
public bool IsScreenshotsHooked()
{
return platform.ISteamScreenshots_IsScreenshotsHooked();
}
// bool
public bool SetLocation( ScreenshotHandle hScreenshot /*ScreenshotHandle*/, string pchLocation /*const char **/ )
{
return platform.ISteamScreenshots_SetLocation( hScreenshot.Value, pchLocation );
}
// bool
public bool TagPublishedFile( ScreenshotHandle hScreenshot /*ScreenshotHandle*/, PublishedFileId_t unPublishedFileID /*PublishedFileId_t*/ )
{
return platform.ISteamScreenshots_TagPublishedFile( hScreenshot.Value, unPublishedFileID.Value );
}
// bool
public bool TagUser( ScreenshotHandle hScreenshot /*ScreenshotHandle*/, CSteamID steamID /*class CSteamID*/ )
{
return platform.ISteamScreenshots_TagUser( hScreenshot.Value, steamID.Value );
}
// void
public void TriggerScreenshot()
{
platform.ISteamScreenshots_TriggerScreenshot();
}
// ScreenshotHandle
public ScreenshotHandle WriteScreenshot( IntPtr pubRGB /*void **/, uint cubRGB /*uint32*/, int nWidth /*int*/, int nHeight /*int*/ )
{
return platform.ISteamScreenshots_WriteScreenshot( (IntPtr) pubRGB, cubRGB, nWidth, nHeight );
}
}
}
@@ -0,0 +1,692 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamUGC : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamUGC( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// SteamAPICall_t
public CallbackHandle AddAppDependency( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, AppId_t nAppID /*AppId_t*/, Action<AddAppDependencyResult_t, bool> CallbackFunction = null /*Action<AddAppDependencyResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_AddAppDependency( nPublishedFileID.Value, nAppID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return AddAppDependencyResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle AddDependency( PublishedFileId_t nParentPublishedFileID /*PublishedFileId_t*/, PublishedFileId_t nChildPublishedFileID /*PublishedFileId_t*/, Action<AddUGCDependencyResult_t, bool> CallbackFunction = null /*Action<AddUGCDependencyResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_AddDependency( nParentPublishedFileID.Value, nChildPublishedFileID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return AddUGCDependencyResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool AddExcludedTag( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, string pTagName /*const char **/ )
{
return platform.ISteamUGC_AddExcludedTag( handle.Value, pTagName );
}
// bool
public bool AddItemKeyValueTag( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, string pchKey /*const char **/, string pchValue /*const char **/ )
{
return platform.ISteamUGC_AddItemKeyValueTag( handle.Value, pchKey, pchValue );
}
// bool
public bool AddItemPreviewFile( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, string pszPreviewFile /*const char **/, ItemPreviewType type /*EItemPreviewType*/ )
{
return platform.ISteamUGC_AddItemPreviewFile( handle.Value, pszPreviewFile, type );
}
// bool
public bool AddItemPreviewVideo( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, string pszVideoID /*const char **/ )
{
return platform.ISteamUGC_AddItemPreviewVideo( handle.Value, pszVideoID );
}
// SteamAPICall_t
public CallbackHandle AddItemToFavorites( AppId_t nAppId /*AppId_t*/, PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, Action<UserFavoriteItemsListChanged_t, bool> CallbackFunction = null /*Action<UserFavoriteItemsListChanged_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_AddItemToFavorites( nAppId.Value, nPublishedFileID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return UserFavoriteItemsListChanged_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool AddRequiredKeyValueTag( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, string pKey /*const char **/, string pValue /*const char **/ )
{
return platform.ISteamUGC_AddRequiredKeyValueTag( handle.Value, pKey, pValue );
}
// bool
public bool AddRequiredTag( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, string pTagName /*const char **/ )
{
return platform.ISteamUGC_AddRequiredTag( handle.Value, pTagName );
}
// bool
public bool BInitWorkshopForGameServer( DepotId_t unWorkshopDepotID /*DepotId_t*/, string pszFolder /*const char **/ )
{
return platform.ISteamUGC_BInitWorkshopForGameServer( unWorkshopDepotID.Value, pszFolder );
}
// SteamAPICall_t
public CallbackHandle CreateItem( AppId_t nConsumerAppId /*AppId_t*/, WorkshopFileType eFileType /*EWorkshopFileType*/, Action<CreateItemResult_t, bool> CallbackFunction = null /*Action<CreateItemResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_CreateItem( nConsumerAppId.Value, eFileType );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return CreateItemResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// UGCQueryHandle_t
public UGCQueryHandle_t CreateQueryAllUGCRequest( UGCQuery eQueryType /*EUGCQuery*/, UGCMatchingUGCType eMatchingeMatchingUGCTypeFileType /*EUGCMatchingUGCType*/, AppId_t nCreatorAppID /*AppId_t*/, AppId_t nConsumerAppID /*AppId_t*/, uint unPage /*uint32*/ )
{
return platform.ISteamUGC_CreateQueryAllUGCRequest( eQueryType, eMatchingeMatchingUGCTypeFileType, nCreatorAppID.Value, nConsumerAppID.Value, unPage );
}
// with: Detect_VectorReturn
// UGCQueryHandle_t
public UGCQueryHandle_t CreateQueryUGCDetailsRequest( PublishedFileId_t[] pvecPublishedFileID /*PublishedFileId_t **/ )
{
var unNumPublishedFileIDs = (uint) pvecPublishedFileID.Length;
fixed ( PublishedFileId_t* pvecPublishedFileID_ptr = pvecPublishedFileID )
{
return platform.ISteamUGC_CreateQueryUGCDetailsRequest( (IntPtr) pvecPublishedFileID_ptr, unNumPublishedFileIDs );
}
}
// UGCQueryHandle_t
public UGCQueryHandle_t CreateQueryUserUGCRequest( AccountID_t unAccountID /*AccountID_t*/, UserUGCList eListType /*EUserUGCList*/, UGCMatchingUGCType eMatchingUGCType /*EUGCMatchingUGCType*/, UserUGCListSortOrder eSortOrder /*EUserUGCListSortOrder*/, AppId_t nCreatorAppID /*AppId_t*/, AppId_t nConsumerAppID /*AppId_t*/, uint unPage /*uint32*/ )
{
return platform.ISteamUGC_CreateQueryUserUGCRequest( unAccountID.Value, eListType, eMatchingUGCType, eSortOrder, nCreatorAppID.Value, nConsumerAppID.Value, unPage );
}
// SteamAPICall_t
public CallbackHandle DeleteItem( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, Action<DeleteItemResult_t, bool> CallbackFunction = null /*Action<DeleteItemResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_DeleteItem( nPublishedFileID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return DeleteItemResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool DownloadItem( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, bool bHighPriority /*bool*/ )
{
return platform.ISteamUGC_DownloadItem( nPublishedFileID.Value, bHighPriority );
}
// SteamAPICall_t
public CallbackHandle GetAppDependencies( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, Action<GetAppDependenciesResult_t, bool> CallbackFunction = null /*Action<GetAppDependenciesResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_GetAppDependencies( nPublishedFileID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return GetAppDependenciesResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool GetItemDownloadInfo( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, out ulong punBytesDownloaded /*uint64 **/, out ulong punBytesTotal /*uint64 **/ )
{
return platform.ISteamUGC_GetItemDownloadInfo( nPublishedFileID.Value, out punBytesDownloaded, out punBytesTotal );
}
// bool
// with: Detect_StringFetch False
public bool GetItemInstallInfo( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, out ulong punSizeOnDisk /*uint64 **/, out string pchFolder /*char **/, out uint punTimeStamp /*uint32 **/ )
{
bool bSuccess = default( bool );
pchFolder = string.Empty;
System.Text.StringBuilder pchFolder_sb = Helpers.TakeStringBuilder();
uint cchFolderSize = 4096;
bSuccess = platform.ISteamUGC_GetItemInstallInfo( nPublishedFileID.Value, out punSizeOnDisk, pchFolder_sb, cchFolderSize, out punTimeStamp );
if ( !bSuccess ) return bSuccess;
pchFolder = pchFolder_sb.ToString();
return bSuccess;
}
// uint
public uint GetItemState( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/ )
{
return platform.ISteamUGC_GetItemState( nPublishedFileID.Value );
}
// ItemUpdateStatus
public ItemUpdateStatus GetItemUpdateProgress( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, out ulong punBytesProcessed /*uint64 **/, out ulong punBytesTotal /*uint64 **/ )
{
return platform.ISteamUGC_GetItemUpdateProgress( handle.Value, out punBytesProcessed, out punBytesTotal );
}
// uint
public uint GetNumSubscribedItems()
{
return platform.ISteamUGC_GetNumSubscribedItems();
}
// bool
// with: Detect_StringFetch False
// with: Detect_StringFetch False
public bool GetQueryUGCAdditionalPreview( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint index /*uint32*/, uint previewIndex /*uint32*/, out string pchURLOrVideoID /*char **/, out string pchOriginalFileName /*char **/, out ItemPreviewType pPreviewType /*EItemPreviewType **/ )
{
bool bSuccess = default( bool );
pchURLOrVideoID = string.Empty;
System.Text.StringBuilder pchURLOrVideoID_sb = Helpers.TakeStringBuilder();
uint cchURLSize = 4096;
pchOriginalFileName = string.Empty;
System.Text.StringBuilder pchOriginalFileName_sb = Helpers.TakeStringBuilder();
uint cchOriginalFileNameSize = 4096;
bSuccess = platform.ISteamUGC_GetQueryUGCAdditionalPreview( handle.Value, index, previewIndex, pchURLOrVideoID_sb, cchURLSize, pchOriginalFileName_sb, cchOriginalFileNameSize, out pPreviewType );
if ( !bSuccess ) return bSuccess;
pchOriginalFileName = pchOriginalFileName_sb.ToString();
if ( !bSuccess ) return bSuccess;
pchURLOrVideoID = pchURLOrVideoID_sb.ToString();
return bSuccess;
}
// bool
public bool GetQueryUGCChildren( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint index /*uint32*/, PublishedFileId_t* pvecPublishedFileID /*PublishedFileId_t **/, uint cMaxEntries /*uint32*/ )
{
return platform.ISteamUGC_GetQueryUGCChildren( handle.Value, index, (IntPtr) pvecPublishedFileID, cMaxEntries );
}
// bool
// with: Detect_StringFetch False
// with: Detect_StringFetch False
public bool GetQueryUGCKeyValueTag( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint index /*uint32*/, uint keyValueTagIndex /*uint32*/, out string pchKey /*char **/, out string pchValue /*char **/ )
{
bool bSuccess = default( bool );
pchKey = string.Empty;
System.Text.StringBuilder pchKey_sb = Helpers.TakeStringBuilder();
uint cchKeySize = 4096;
pchValue = string.Empty;
System.Text.StringBuilder pchValue_sb = Helpers.TakeStringBuilder();
uint cchValueSize = 4096;
bSuccess = platform.ISteamUGC_GetQueryUGCKeyValueTag( handle.Value, index, keyValueTagIndex, pchKey_sb, cchKeySize, pchValue_sb, cchValueSize );
if ( !bSuccess ) return bSuccess;
pchValue = pchValue_sb.ToString();
if ( !bSuccess ) return bSuccess;
pchKey = pchKey_sb.ToString();
return bSuccess;
}
// bool
// with: Detect_StringFetch False
public bool GetQueryUGCMetadata( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint index /*uint32*/, out string pchMetadata /*char **/ )
{
bool bSuccess = default( bool );
pchMetadata = string.Empty;
System.Text.StringBuilder pchMetadata_sb = Helpers.TakeStringBuilder();
uint cchMetadatasize = 4096;
bSuccess = platform.ISteamUGC_GetQueryUGCMetadata( handle.Value, index, pchMetadata_sb, cchMetadatasize );
if ( !bSuccess ) return bSuccess;
pchMetadata = pchMetadata_sb.ToString();
return bSuccess;
}
// uint
public uint GetQueryUGCNumAdditionalPreviews( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint index /*uint32*/ )
{
return platform.ISteamUGC_GetQueryUGCNumAdditionalPreviews( handle.Value, index );
}
// uint
public uint GetQueryUGCNumKeyValueTags( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint index /*uint32*/ )
{
return platform.ISteamUGC_GetQueryUGCNumKeyValueTags( handle.Value, index );
}
// bool
// with: Detect_StringFetch False
public bool GetQueryUGCPreviewURL( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint index /*uint32*/, out string pchURL /*char **/ )
{
bool bSuccess = default( bool );
pchURL = string.Empty;
System.Text.StringBuilder pchURL_sb = Helpers.TakeStringBuilder();
uint cchURLSize = 4096;
bSuccess = platform.ISteamUGC_GetQueryUGCPreviewURL( handle.Value, index, pchURL_sb, cchURLSize );
if ( !bSuccess ) return bSuccess;
pchURL = pchURL_sb.ToString();
return bSuccess;
}
// bool
public bool GetQueryUGCResult( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint index /*uint32*/, ref SteamUGCDetails_t pDetails /*struct SteamUGCDetails_t **/ )
{
return platform.ISteamUGC_GetQueryUGCResult( handle.Value, index, ref pDetails );
}
// bool
public bool GetQueryUGCStatistic( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint index /*uint32*/, ItemStatistic eStatType /*EItemStatistic*/, out ulong pStatValue /*uint64 **/ )
{
return platform.ISteamUGC_GetQueryUGCStatistic( handle.Value, index, eStatType, out pStatValue );
}
// uint
public uint GetSubscribedItems( PublishedFileId_t* pvecPublishedFileID /*PublishedFileId_t **/, uint cMaxEntries /*uint32*/ )
{
return platform.ISteamUGC_GetSubscribedItems( (IntPtr) pvecPublishedFileID, cMaxEntries );
}
// SteamAPICall_t
public CallbackHandle GetUserItemVote( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, Action<GetUserItemVoteResult_t, bool> CallbackFunction = null /*Action<GetUserItemVoteResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_GetUserItemVote( nPublishedFileID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return GetUserItemVoteResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool ReleaseQueryUGCRequest( UGCQueryHandle_t handle /*UGCQueryHandle_t*/ )
{
return platform.ISteamUGC_ReleaseQueryUGCRequest( handle.Value );
}
// SteamAPICall_t
public CallbackHandle RemoveAppDependency( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, AppId_t nAppID /*AppId_t*/, Action<RemoveAppDependencyResult_t, bool> CallbackFunction = null /*Action<RemoveAppDependencyResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_RemoveAppDependency( nPublishedFileID.Value, nAppID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoveAppDependencyResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle RemoveDependency( PublishedFileId_t nParentPublishedFileID /*PublishedFileId_t*/, PublishedFileId_t nChildPublishedFileID /*PublishedFileId_t*/, Action<RemoveUGCDependencyResult_t, bool> CallbackFunction = null /*Action<RemoveUGCDependencyResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_RemoveDependency( nParentPublishedFileID.Value, nChildPublishedFileID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoveUGCDependencyResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle RemoveItemFromFavorites( AppId_t nAppId /*AppId_t*/, PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, Action<UserFavoriteItemsListChanged_t, bool> CallbackFunction = null /*Action<UserFavoriteItemsListChanged_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_RemoveItemFromFavorites( nAppId.Value, nPublishedFileID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return UserFavoriteItemsListChanged_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool RemoveItemKeyValueTags( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, string pchKey /*const char **/ )
{
return platform.ISteamUGC_RemoveItemKeyValueTags( handle.Value, pchKey );
}
// bool
public bool RemoveItemPreview( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, uint index /*uint32*/ )
{
return platform.ISteamUGC_RemoveItemPreview( handle.Value, index );
}
// SteamAPICall_t
public SteamAPICall_t RequestUGCDetails( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, uint unMaxAgeSeconds /*uint32*/ )
{
return platform.ISteamUGC_RequestUGCDetails( nPublishedFileID.Value, unMaxAgeSeconds );
}
// SteamAPICall_t
public CallbackHandle SendQueryUGCRequest( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, Action<SteamUGCQueryCompleted_t, bool> CallbackFunction = null /*Action<SteamUGCQueryCompleted_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_SendQueryUGCRequest( handle.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return SteamUGCQueryCompleted_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool SetAllowCachedResponse( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint unMaxAgeSeconds /*uint32*/ )
{
return platform.ISteamUGC_SetAllowCachedResponse( handle.Value, unMaxAgeSeconds );
}
// bool
public bool SetCloudFileNameFilter( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, string pMatchCloudFileName /*const char **/ )
{
return platform.ISteamUGC_SetCloudFileNameFilter( handle.Value, pMatchCloudFileName );
}
// bool
public bool SetItemContent( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, string pszContentFolder /*const char **/ )
{
return platform.ISteamUGC_SetItemContent( handle.Value, pszContentFolder );
}
// bool
public bool SetItemDescription( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, string pchDescription /*const char **/ )
{
return platform.ISteamUGC_SetItemDescription( handle.Value, pchDescription );
}
// bool
public bool SetItemMetadata( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, string pchMetaData /*const char **/ )
{
return platform.ISteamUGC_SetItemMetadata( handle.Value, pchMetaData );
}
// bool
public bool SetItemPreview( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, string pszPreviewFile /*const char **/ )
{
return platform.ISteamUGC_SetItemPreview( handle.Value, pszPreviewFile );
}
// bool
// using: Detect_StringArray
public bool SetItemTags( UGCUpdateHandle_t updateHandle /*UGCUpdateHandle_t*/, string[] pTags /*const struct SteamParamStringArray_t **/ )
{
// Create strings
var nativeStrings = new IntPtr[pTags.Length];
for ( int i = 0; i < pTags.Length; i++ )
{
nativeStrings[i] = Marshal.StringToHGlobalAnsi( pTags[i] );
}
try
{
// Create string array
var size = Marshal.SizeOf( typeof( IntPtr ) ) * nativeStrings.Length;
var nativeArray = Marshal.AllocHGlobal( size );
Marshal.Copy( nativeStrings, 0, nativeArray, nativeStrings.Length );
// Create SteamParamStringArray_t
var tags = new SteamParamStringArray_t();
tags.Strings = nativeArray;
tags.NumStrings = pTags.Length;
return platform.ISteamUGC_SetItemTags( updateHandle.Value, ref tags );
}
finally
{
foreach ( var x in nativeStrings )
Marshal.FreeHGlobal( x );
}
}
// bool
public bool SetItemTitle( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, string pchTitle /*const char **/ )
{
return platform.ISteamUGC_SetItemTitle( handle.Value, pchTitle );
}
// bool
public bool SetItemUpdateLanguage( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, string pchLanguage /*const char **/ )
{
return platform.ISteamUGC_SetItemUpdateLanguage( handle.Value, pchLanguage );
}
// bool
public bool SetItemVisibility( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, RemoteStoragePublishedFileVisibility eVisibility /*ERemoteStoragePublishedFileVisibility*/ )
{
return platform.ISteamUGC_SetItemVisibility( handle.Value, eVisibility );
}
// bool
public bool SetLanguage( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, string pchLanguage /*const char **/ )
{
return platform.ISteamUGC_SetLanguage( handle.Value, pchLanguage );
}
// bool
public bool SetMatchAnyTag( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, bool bMatchAnyTag /*bool*/ )
{
return platform.ISteamUGC_SetMatchAnyTag( handle.Value, bMatchAnyTag );
}
// bool
public bool SetRankedByTrendDays( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint unDays /*uint32*/ )
{
return platform.ISteamUGC_SetRankedByTrendDays( handle.Value, unDays );
}
// bool
public bool SetReturnAdditionalPreviews( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, bool bReturnAdditionalPreviews /*bool*/ )
{
return platform.ISteamUGC_SetReturnAdditionalPreviews( handle.Value, bReturnAdditionalPreviews );
}
// bool
public bool SetReturnChildren( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, bool bReturnChildren /*bool*/ )
{
return platform.ISteamUGC_SetReturnChildren( handle.Value, bReturnChildren );
}
// bool
public bool SetReturnKeyValueTags( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, bool bReturnKeyValueTags /*bool*/ )
{
return platform.ISteamUGC_SetReturnKeyValueTags( handle.Value, bReturnKeyValueTags );
}
// bool
public bool SetReturnLongDescription( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, bool bReturnLongDescription /*bool*/ )
{
return platform.ISteamUGC_SetReturnLongDescription( handle.Value, bReturnLongDescription );
}
// bool
public bool SetReturnMetadata( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, bool bReturnMetadata /*bool*/ )
{
return platform.ISteamUGC_SetReturnMetadata( handle.Value, bReturnMetadata );
}
// bool
public bool SetReturnOnlyIDs( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, bool bReturnOnlyIDs /*bool*/ )
{
return platform.ISteamUGC_SetReturnOnlyIDs( handle.Value, bReturnOnlyIDs );
}
// bool
public bool SetReturnPlaytimeStats( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, uint unDays /*uint32*/ )
{
return platform.ISteamUGC_SetReturnPlaytimeStats( handle.Value, unDays );
}
// bool
public bool SetReturnTotalOnly( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, bool bReturnTotalOnly /*bool*/ )
{
return platform.ISteamUGC_SetReturnTotalOnly( handle.Value, bReturnTotalOnly );
}
// bool
public bool SetSearchText( UGCQueryHandle_t handle /*UGCQueryHandle_t*/, string pSearchText /*const char **/ )
{
return platform.ISteamUGC_SetSearchText( handle.Value, pSearchText );
}
// SteamAPICall_t
public CallbackHandle SetUserItemVote( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, bool bVoteUp /*bool*/, Action<SetUserItemVoteResult_t, bool> CallbackFunction = null /*Action<SetUserItemVoteResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_SetUserItemVote( nPublishedFileID.Value, bVoteUp );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return SetUserItemVoteResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// UGCUpdateHandle_t
public UGCUpdateHandle_t StartItemUpdate( AppId_t nConsumerAppId /*AppId_t*/, PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/ )
{
return platform.ISteamUGC_StartItemUpdate( nConsumerAppId.Value, nPublishedFileID.Value );
}
// with: Detect_VectorReturn
// SteamAPICall_t
public CallbackHandle StartPlaytimeTracking( PublishedFileId_t[] pvecPublishedFileID /*PublishedFileId_t **/, Action<StartPlaytimeTrackingResult_t, bool> CallbackFunction = null /*Action<StartPlaytimeTrackingResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
var unNumPublishedFileIDs = (uint) pvecPublishedFileID.Length;
fixed ( PublishedFileId_t* pvecPublishedFileID_ptr = pvecPublishedFileID )
{
callback = platform.ISteamUGC_StartPlaytimeTracking( (IntPtr) pvecPublishedFileID_ptr, unNumPublishedFileIDs );
}
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return StartPlaytimeTrackingResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// with: Detect_VectorReturn
// SteamAPICall_t
public CallbackHandle StopPlaytimeTracking( PublishedFileId_t[] pvecPublishedFileID /*PublishedFileId_t **/, Action<StopPlaytimeTrackingResult_t, bool> CallbackFunction = null /*Action<StopPlaytimeTrackingResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
var unNumPublishedFileIDs = (uint) pvecPublishedFileID.Length;
fixed ( PublishedFileId_t* pvecPublishedFileID_ptr = pvecPublishedFileID )
{
callback = platform.ISteamUGC_StopPlaytimeTracking( (IntPtr) pvecPublishedFileID_ptr, unNumPublishedFileIDs );
}
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return StopPlaytimeTrackingResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle StopPlaytimeTrackingForAllItems( Action<StopPlaytimeTrackingResult_t, bool> CallbackFunction = null /*Action<StopPlaytimeTrackingResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_StopPlaytimeTrackingForAllItems();
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return StopPlaytimeTrackingResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle SubmitItemUpdate( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, string pchChangeNote /*const char **/, Action<SubmitItemUpdateResult_t, bool> CallbackFunction = null /*Action<SubmitItemUpdateResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_SubmitItemUpdate( handle.Value, pchChangeNote );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return SubmitItemUpdateResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle SubscribeItem( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, Action<RemoteStorageSubscribePublishedFileResult_t, bool> CallbackFunction = null /*Action<RemoteStorageSubscribePublishedFileResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_SubscribeItem( nPublishedFileID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageSubscribePublishedFileResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// void
public void SuspendDownloads( bool bSuspend /*bool*/ )
{
platform.ISteamUGC_SuspendDownloads( bSuspend );
}
// SteamAPICall_t
public CallbackHandle UnsubscribeItem( PublishedFileId_t nPublishedFileID /*PublishedFileId_t*/, Action<RemoteStorageUnsubscribePublishedFileResult_t, bool> CallbackFunction = null /*Action<RemoteStorageUnsubscribePublishedFileResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUGC_UnsubscribeItem( nPublishedFileID.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return RemoteStorageUnsubscribePublishedFileResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool UpdateItemPreviewFile( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, uint index /*uint32*/, string pszPreviewFile /*const char **/ )
{
return platform.ISteamUGC_UpdateItemPreviewFile( handle.Value, index, pszPreviewFile );
}
// bool
public bool UpdateItemPreviewVideo( UGCUpdateHandle_t handle /*UGCUpdateHandle_t*/, uint index /*uint32*/, string pszVideoID /*const char **/ )
{
return platform.ISteamUGC_UpdateItemPreviewVideo( handle.Value, index, pszVideoID );
}
}
}
@@ -0,0 +1,239 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamUser : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamUser( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// void
public void AdvertiseGame( CSteamID steamIDGameServer /*class CSteamID*/, uint unIPServer /*uint32*/, ushort usPortServer /*uint16*/ )
{
platform.ISteamUser_AdvertiseGame( steamIDGameServer.Value, unIPServer, usPortServer );
}
// BeginAuthSessionResult
public BeginAuthSessionResult BeginAuthSession( IntPtr pAuthTicket /*const void **/, int cbAuthTicket /*int*/, CSteamID steamID /*class CSteamID*/ )
{
return platform.ISteamUser_BeginAuthSession( (IntPtr) pAuthTicket, cbAuthTicket, steamID.Value );
}
// bool
public bool BIsBehindNAT()
{
return platform.ISteamUser_BIsBehindNAT();
}
// bool
public bool BIsPhoneIdentifying()
{
return platform.ISteamUser_BIsPhoneIdentifying();
}
// bool
public bool BIsPhoneRequiringVerification()
{
return platform.ISteamUser_BIsPhoneRequiringVerification();
}
// bool
public bool BIsPhoneVerified()
{
return platform.ISteamUser_BIsPhoneVerified();
}
// bool
public bool BIsTwoFactorEnabled()
{
return platform.ISteamUser_BIsTwoFactorEnabled();
}
// bool
public bool BLoggedOn()
{
return platform.ISteamUser_BLoggedOn();
}
// void
public void CancelAuthTicket( HAuthTicket hAuthTicket /*HAuthTicket*/ )
{
platform.ISteamUser_CancelAuthTicket( hAuthTicket.Value );
}
// VoiceResult
public VoiceResult DecompressVoice( IntPtr pCompressed /*const void **/, uint cbCompressed /*uint32*/, IntPtr pDestBuffer /*void **/, uint cbDestBufferSize /*uint32*/, out uint nBytesWritten /*uint32 **/, uint nDesiredSampleRate /*uint32*/ )
{
return platform.ISteamUser_DecompressVoice( (IntPtr) pCompressed, cbCompressed, (IntPtr) pDestBuffer, cbDestBufferSize, out nBytesWritten, nDesiredSampleRate );
}
// void
public void EndAuthSession( CSteamID steamID /*class CSteamID*/ )
{
platform.ISteamUser_EndAuthSession( steamID.Value );
}
// HAuthTicket
public HAuthTicket GetAuthSessionTicket( IntPtr pTicket /*void **/, int cbMaxTicket /*int*/, out uint pcbTicket /*uint32 **/ )
{
return platform.ISteamUser_GetAuthSessionTicket( (IntPtr) pTicket, cbMaxTicket, out pcbTicket );
}
// VoiceResult
public VoiceResult GetAvailableVoice( out uint pcbCompressed /*uint32 **/, out uint pcbUncompressed_Deprecated /*uint32 **/, uint nUncompressedVoiceDesiredSampleRate_Deprecated /*uint32*/ )
{
return platform.ISteamUser_GetAvailableVoice( out pcbCompressed, out pcbUncompressed_Deprecated, nUncompressedVoiceDesiredSampleRate_Deprecated );
}
// bool
public bool GetEncryptedAppTicket( IntPtr pTicket /*void **/, int cbMaxTicket /*int*/, out uint pcbTicket /*uint32 **/ )
{
return platform.ISteamUser_GetEncryptedAppTicket( (IntPtr) pTicket, cbMaxTicket, out pcbTicket );
}
// int
public int GetGameBadgeLevel( int nSeries /*int*/, bool bFoil /*bool*/ )
{
return platform.ISteamUser_GetGameBadgeLevel( nSeries, bFoil );
}
// HSteamUser
public HSteamUser GetHSteamUser()
{
return platform.ISteamUser_GetHSteamUser();
}
// int
public int GetPlayerSteamLevel()
{
return platform.ISteamUser_GetPlayerSteamLevel();
}
// ulong
public ulong GetSteamID()
{
return platform.ISteamUser_GetSteamID();
}
// bool
// with: Detect_StringFetch True
public string GetUserDataFolder()
{
bool bSuccess = default( bool );
System.Text.StringBuilder pchBuffer_sb = Helpers.TakeStringBuilder();
int cubBuffer = 4096;
bSuccess = platform.ISteamUser_GetUserDataFolder( pchBuffer_sb, cubBuffer );
if ( !bSuccess ) return null;
return pchBuffer_sb.ToString();
}
// VoiceResult
public VoiceResult GetVoice( bool bWantCompressed /*bool*/, IntPtr pDestBuffer /*void **/, uint cbDestBufferSize /*uint32*/, out uint nBytesWritten /*uint32 **/, bool bWantUncompressed_Deprecated /*bool*/, IntPtr pUncompressedDestBuffer_Deprecated /*void **/, uint cbUncompressedDestBufferSize_Deprecated /*uint32*/, out uint nUncompressBytesWritten_Deprecated /*uint32 **/, uint nUncompressedVoiceDesiredSampleRate_Deprecated /*uint32*/ )
{
return platform.ISteamUser_GetVoice( bWantCompressed, (IntPtr) pDestBuffer, cbDestBufferSize, out nBytesWritten, bWantUncompressed_Deprecated, (IntPtr) pUncompressedDestBuffer_Deprecated, cbUncompressedDestBufferSize_Deprecated, out nUncompressBytesWritten_Deprecated, nUncompressedVoiceDesiredSampleRate_Deprecated );
}
// uint
public uint GetVoiceOptimalSampleRate()
{
return platform.ISteamUser_GetVoiceOptimalSampleRate();
}
// int
public int InitiateGameConnection( IntPtr pAuthBlob /*void **/, int cbMaxAuthBlob /*int*/, CSteamID steamIDGameServer /*class CSteamID*/, uint unIPServer /*uint32*/, ushort usPortServer /*uint16*/, bool bSecure /*bool*/ )
{
return platform.ISteamUser_InitiateGameConnection( (IntPtr) pAuthBlob, cbMaxAuthBlob, steamIDGameServer.Value, unIPServer, usPortServer, bSecure );
}
// SteamAPICall_t
public CallbackHandle RequestEncryptedAppTicket( IntPtr pDataToInclude /*void **/, int cbDataToInclude /*int*/, Action<EncryptedAppTicketResponse_t, bool> CallbackFunction = null /*Action<EncryptedAppTicketResponse_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUser_RequestEncryptedAppTicket( (IntPtr) pDataToInclude, cbDataToInclude );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return EncryptedAppTicketResponse_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle RequestStoreAuthURL( string pchRedirectURL /*const char **/, Action<StoreAuthURLResponse_t, bool> CallbackFunction = null /*Action<StoreAuthURLResponse_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUser_RequestStoreAuthURL( pchRedirectURL );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return StoreAuthURLResponse_t.CallResult( steamworks, callback, CallbackFunction );
}
// void
public void StartVoiceRecording()
{
platform.ISteamUser_StartVoiceRecording();
}
// void
public void StopVoiceRecording()
{
platform.ISteamUser_StopVoiceRecording();
}
// void
public void TerminateGameConnection( uint unIPServer /*uint32*/, ushort usPortServer /*uint16*/ )
{
platform.ISteamUser_TerminateGameConnection( unIPServer, usPortServer );
}
// void
public void TrackAppUsageEvent( CGameID gameID /*class CGameID*/, int eAppUsageEvent /*int*/, string pchExtraInfo /*const char **/ )
{
platform.ISteamUser_TrackAppUsageEvent( gameID.Value, eAppUsageEvent, pchExtraInfo );
}
// UserHasLicenseForAppResult
public UserHasLicenseForAppResult UserHasLicenseForApp( CSteamID steamID /*class CSteamID*/, AppId_t appID /*AppId_t*/ )
{
return platform.ISteamUser_UserHasLicenseForApp( steamID.Value, appID.Value );
}
}
}
@@ -0,0 +1,390 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamUserStats : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamUserStats( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// SteamAPICall_t
public CallbackHandle AttachLeaderboardUGC( SteamLeaderboard_t hSteamLeaderboard /*SteamLeaderboard_t*/, UGCHandle_t hUGC /*UGCHandle_t*/, Action<LeaderboardUGCSet_t, bool> CallbackFunction = null /*Action<LeaderboardUGCSet_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUserStats_AttachLeaderboardUGC( hSteamLeaderboard.Value, hUGC.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return LeaderboardUGCSet_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool ClearAchievement( string pchName /*const char **/ )
{
return platform.ISteamUserStats_ClearAchievement( pchName );
}
// SteamAPICall_t
public CallbackHandle DownloadLeaderboardEntries( SteamLeaderboard_t hSteamLeaderboard /*SteamLeaderboard_t*/, LeaderboardDataRequest eLeaderboardDataRequest /*ELeaderboardDataRequest*/, int nRangeStart /*int*/, int nRangeEnd /*int*/, Action<LeaderboardScoresDownloaded_t, bool> CallbackFunction = null /*Action<LeaderboardScoresDownloaded_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUserStats_DownloadLeaderboardEntries( hSteamLeaderboard.Value, eLeaderboardDataRequest, nRangeStart, nRangeEnd );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return LeaderboardScoresDownloaded_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle DownloadLeaderboardEntriesForUsers( SteamLeaderboard_t hSteamLeaderboard /*SteamLeaderboard_t*/, IntPtr prgUsers /*class CSteamID **/, int cUsers /*int*/, Action<LeaderboardScoresDownloaded_t, bool> CallbackFunction = null /*Action<LeaderboardScoresDownloaded_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUserStats_DownloadLeaderboardEntriesForUsers( hSteamLeaderboard.Value, (IntPtr) prgUsers, cUsers );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return LeaderboardScoresDownloaded_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle FindLeaderboard( string pchLeaderboardName /*const char **/, Action<LeaderboardFindResult_t, bool> CallbackFunction = null /*Action<LeaderboardFindResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUserStats_FindLeaderboard( pchLeaderboardName );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return LeaderboardFindResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle FindOrCreateLeaderboard( string pchLeaderboardName /*const char **/, LeaderboardSortMethod eLeaderboardSortMethod /*ELeaderboardSortMethod*/, LeaderboardDisplayType eLeaderboardDisplayType /*ELeaderboardDisplayType*/, Action<LeaderboardFindResult_t, bool> CallbackFunction = null /*Action<LeaderboardFindResult_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUserStats_FindOrCreateLeaderboard( pchLeaderboardName, eLeaderboardSortMethod, eLeaderboardDisplayType );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return LeaderboardFindResult_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool GetAchievement( string pchName /*const char **/, ref bool pbAchieved /*bool **/ )
{
return platform.ISteamUserStats_GetAchievement( pchName, ref pbAchieved );
}
// bool
public bool GetAchievementAchievedPercent( string pchName /*const char **/, out float pflPercent /*float **/ )
{
return platform.ISteamUserStats_GetAchievementAchievedPercent( pchName, out pflPercent );
}
// bool
public bool GetAchievementAndUnlockTime( string pchName /*const char **/, ref bool pbAchieved /*bool **/, out uint punUnlockTime /*uint32 **/ )
{
return platform.ISteamUserStats_GetAchievementAndUnlockTime( pchName, ref pbAchieved, out punUnlockTime );
}
// string
// with: Detect_StringReturn
public string GetAchievementDisplayAttribute( string pchName /*const char **/, string pchKey /*const char **/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamUserStats_GetAchievementDisplayAttribute( pchName, pchKey );
return Marshal.PtrToStringAnsi( string_pointer );
}
// int
public int GetAchievementIcon( string pchName /*const char **/ )
{
return platform.ISteamUserStats_GetAchievementIcon( pchName );
}
// string
// with: Detect_StringReturn
public string GetAchievementName( uint iAchievement /*uint32*/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamUserStats_GetAchievementName( iAchievement );
return Marshal.PtrToStringAnsi( string_pointer );
}
// bool
public bool GetDownloadedLeaderboardEntry( SteamLeaderboardEntries_t hSteamLeaderboardEntries /*SteamLeaderboardEntries_t*/, int index /*int*/, ref LeaderboardEntry_t pLeaderboardEntry /*struct LeaderboardEntry_t **/, IntPtr pDetails /*int32 **/, int cDetailsMax /*int*/ )
{
return platform.ISteamUserStats_GetDownloadedLeaderboardEntry( hSteamLeaderboardEntries.Value, index, ref pLeaderboardEntry, (IntPtr) pDetails, cDetailsMax );
}
// bool
public bool GetGlobalStat( string pchStatName /*const char **/, out long pData /*int64 **/ )
{
return platform.ISteamUserStats_GetGlobalStat( pchStatName, out pData );
}
// bool
public bool GetGlobalStat0( string pchStatName /*const char **/, out double pData /*double **/ )
{
return platform.ISteamUserStats_GetGlobalStat0( pchStatName, out pData );
}
// int
public int GetGlobalStatHistory( string pchStatName /*const char **/, out long pData /*int64 **/, uint cubData /*uint32*/ )
{
return platform.ISteamUserStats_GetGlobalStatHistory( pchStatName, out pData, cubData );
}
// int
public int GetGlobalStatHistory0( string pchStatName /*const char **/, out double pData /*double **/, uint cubData /*uint32*/ )
{
return platform.ISteamUserStats_GetGlobalStatHistory0( pchStatName, out pData, cubData );
}
// LeaderboardDisplayType
public LeaderboardDisplayType GetLeaderboardDisplayType( SteamLeaderboard_t hSteamLeaderboard /*SteamLeaderboard_t*/ )
{
return platform.ISteamUserStats_GetLeaderboardDisplayType( hSteamLeaderboard.Value );
}
// int
public int GetLeaderboardEntryCount( SteamLeaderboard_t hSteamLeaderboard /*SteamLeaderboard_t*/ )
{
return platform.ISteamUserStats_GetLeaderboardEntryCount( hSteamLeaderboard.Value );
}
// string
// with: Detect_StringReturn
public string GetLeaderboardName( SteamLeaderboard_t hSteamLeaderboard /*SteamLeaderboard_t*/ )
{
IntPtr string_pointer;
string_pointer = platform.ISteamUserStats_GetLeaderboardName( hSteamLeaderboard.Value );
return Marshal.PtrToStringAnsi( string_pointer );
}
// LeaderboardSortMethod
public LeaderboardSortMethod GetLeaderboardSortMethod( SteamLeaderboard_t hSteamLeaderboard /*SteamLeaderboard_t*/ )
{
return platform.ISteamUserStats_GetLeaderboardSortMethod( hSteamLeaderboard.Value );
}
// int
// with: Detect_StringFetch False
public int GetMostAchievedAchievementInfo( out string pchName /*char **/, out float pflPercent /*float **/, ref bool pbAchieved /*bool **/ )
{
int bSuccess = default( int );
pchName = string.Empty;
System.Text.StringBuilder pchName_sb = Helpers.TakeStringBuilder();
uint unNameBufLen = 4096;
bSuccess = platform.ISteamUserStats_GetMostAchievedAchievementInfo( pchName_sb, unNameBufLen, out pflPercent, ref pbAchieved );
if ( bSuccess <= 0 ) return bSuccess;
pchName = pchName_sb.ToString();
return bSuccess;
}
// int
// with: Detect_StringFetch False
public int GetNextMostAchievedAchievementInfo( int iIteratorPrevious /*int*/, out string pchName /*char **/, out float pflPercent /*float **/, ref bool pbAchieved /*bool **/ )
{
int bSuccess = default( int );
pchName = string.Empty;
System.Text.StringBuilder pchName_sb = Helpers.TakeStringBuilder();
uint unNameBufLen = 4096;
bSuccess = platform.ISteamUserStats_GetNextMostAchievedAchievementInfo( iIteratorPrevious, pchName_sb, unNameBufLen, out pflPercent, ref pbAchieved );
if ( bSuccess <= 0 ) return bSuccess;
pchName = pchName_sb.ToString();
return bSuccess;
}
// uint
public uint GetNumAchievements()
{
return platform.ISteamUserStats_GetNumAchievements();
}
// SteamAPICall_t
public CallbackHandle GetNumberOfCurrentPlayers( Action<NumberOfCurrentPlayers_t, bool> CallbackFunction = null /*Action<NumberOfCurrentPlayers_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUserStats_GetNumberOfCurrentPlayers();
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return NumberOfCurrentPlayers_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool GetStat( string pchName /*const char **/, out int pData /*int32 **/ )
{
return platform.ISteamUserStats_GetStat( pchName, out pData );
}
// bool
public bool GetStat0( string pchName /*const char **/, out float pData /*float **/ )
{
return platform.ISteamUserStats_GetStat0( pchName, out pData );
}
// bool
public bool GetUserAchievement( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/, ref bool pbAchieved /*bool **/ )
{
return platform.ISteamUserStats_GetUserAchievement( steamIDUser.Value, pchName, ref pbAchieved );
}
// bool
public bool GetUserAchievementAndUnlockTime( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/, ref bool pbAchieved /*bool **/, out uint punUnlockTime /*uint32 **/ )
{
return platform.ISteamUserStats_GetUserAchievementAndUnlockTime( steamIDUser.Value, pchName, ref pbAchieved, out punUnlockTime );
}
// bool
public bool GetUserStat( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/, out int pData /*int32 **/ )
{
return platform.ISteamUserStats_GetUserStat( steamIDUser.Value, pchName, out pData );
}
// bool
public bool GetUserStat0( CSteamID steamIDUser /*class CSteamID*/, string pchName /*const char **/, out float pData /*float **/ )
{
return platform.ISteamUserStats_GetUserStat0( steamIDUser.Value, pchName, out pData );
}
// bool
public bool IndicateAchievementProgress( string pchName /*const char **/, uint nCurProgress /*uint32*/, uint nMaxProgress /*uint32*/ )
{
return platform.ISteamUserStats_IndicateAchievementProgress( pchName, nCurProgress, nMaxProgress );
}
// bool
public bool RequestCurrentStats()
{
return platform.ISteamUserStats_RequestCurrentStats();
}
// SteamAPICall_t
public CallbackHandle RequestGlobalAchievementPercentages( Action<GlobalAchievementPercentagesReady_t, bool> CallbackFunction = null /*Action<GlobalAchievementPercentagesReady_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUserStats_RequestGlobalAchievementPercentages();
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return GlobalAchievementPercentagesReady_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle RequestGlobalStats( int nHistoryDays /*int*/, Action<GlobalStatsReceived_t, bool> CallbackFunction = null /*Action<GlobalStatsReceived_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUserStats_RequestGlobalStats( nHistoryDays );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return GlobalStatsReceived_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICall_t
public CallbackHandle RequestUserStats( CSteamID steamIDUser /*class CSteamID*/, Action<UserStatsReceived_t, bool> CallbackFunction = null /*Action<UserStatsReceived_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUserStats_RequestUserStats( steamIDUser.Value );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return UserStatsReceived_t.CallResult( steamworks, callback, CallbackFunction );
}
// bool
public bool ResetAllStats( bool bAchievementsToo /*bool*/ )
{
return platform.ISteamUserStats_ResetAllStats( bAchievementsToo );
}
// bool
public bool SetAchievement( string pchName /*const char **/ )
{
return platform.ISteamUserStats_SetAchievement( pchName );
}
// bool
public bool SetStat( string pchName /*const char **/, int nData /*int32*/ )
{
return platform.ISteamUserStats_SetStat( pchName, nData );
}
// bool
public bool SetStat0( string pchName /*const char **/, float fData /*float*/ )
{
return platform.ISteamUserStats_SetStat0( pchName, fData );
}
// bool
public bool StoreStats()
{
return platform.ISteamUserStats_StoreStats();
}
// bool
public bool UpdateAvgRateStat( string pchName /*const char **/, float flCountThisSession /*float*/, double dSessionLength /*double*/ )
{
return platform.ISteamUserStats_UpdateAvgRateStat( pchName, flCountThisSession, dSessionLength );
}
// SteamAPICall_t
public CallbackHandle UploadLeaderboardScore( SteamLeaderboard_t hSteamLeaderboard /*SteamLeaderboard_t*/, LeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod /*ELeaderboardUploadScoreMethod*/, int nScore /*int32*/, int[] pScoreDetails /*const int32 **/, int cScoreDetailsCount /*int*/, Action<LeaderboardScoreUploaded_t, bool> CallbackFunction = null /*Action<LeaderboardScoreUploaded_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUserStats_UploadLeaderboardScore( hSteamLeaderboard.Value, eLeaderboardUploadScoreMethod, nScore, pScoreDetails, cScoreDetailsCount );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return LeaderboardScoreUploaded_t.CallResult( steamworks, callback, CallbackFunction );
}
}
}
@@ -0,0 +1,239 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamUtils : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamUtils( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// bool
public bool BOverlayNeedsPresent()
{
return platform.ISteamUtils_BOverlayNeedsPresent();
}
// SteamAPICall_t
public CallbackHandle CheckFileSignature( string szFileName /*const char **/, Action<CheckFileSignature_t, bool> CallbackFunction = null /*Action<CheckFileSignature_t, bool>*/ )
{
SteamAPICall_t callback = 0;
callback = platform.ISteamUtils_CheckFileSignature( szFileName );
if ( CallbackFunction == null ) return null;
if ( callback == 0 ) return null;
return CheckFileSignature_t.CallResult( steamworks, callback, CallbackFunction );
}
// SteamAPICallFailure
public SteamAPICallFailure GetAPICallFailureReason( SteamAPICall_t hSteamAPICall /*SteamAPICall_t*/ )
{
return platform.ISteamUtils_GetAPICallFailureReason( hSteamAPICall.Value );
}
// bool
public bool GetAPICallResult( SteamAPICall_t hSteamAPICall /*SteamAPICall_t*/, IntPtr pCallback /*void **/, int cubCallback /*int*/, int iCallbackExpected /*int*/, ref bool pbFailed /*bool **/ )
{
return platform.ISteamUtils_GetAPICallResult( hSteamAPICall.Value, (IntPtr) pCallback, cubCallback, iCallbackExpected, ref pbFailed );
}
// uint
public uint GetAppID()
{
return platform.ISteamUtils_GetAppID();
}
// Universe
public Universe GetConnectedUniverse()
{
return platform.ISteamUtils_GetConnectedUniverse();
}
// bool
public bool GetCSERIPPort( out uint unIP /*uint32 **/, out ushort usPort /*uint16 **/ )
{
return platform.ISteamUtils_GetCSERIPPort( out unIP, out usPort );
}
// byte
public byte GetCurrentBatteryPower()
{
return platform.ISteamUtils_GetCurrentBatteryPower();
}
// bool
// with: Detect_StringFetch True
public string GetEnteredGamepadTextInput()
{
bool bSuccess = default( bool );
System.Text.StringBuilder pchText_sb = Helpers.TakeStringBuilder();
uint cchText = 4096;
bSuccess = platform.ISteamUtils_GetEnteredGamepadTextInput( pchText_sb, cchText );
if ( !bSuccess ) return null;
return pchText_sb.ToString();
}
// uint
public uint GetEnteredGamepadTextLength()
{
return platform.ISteamUtils_GetEnteredGamepadTextLength();
}
// bool
public bool GetImageRGBA( int iImage /*int*/, IntPtr pubDest /*uint8 **/, int nDestBufferSize /*int*/ )
{
return platform.ISteamUtils_GetImageRGBA( iImage, (IntPtr) pubDest, nDestBufferSize );
}
// bool
public bool GetImageSize( int iImage /*int*/, out uint pnWidth /*uint32 **/, out uint pnHeight /*uint32 **/ )
{
return platform.ISteamUtils_GetImageSize( iImage, out pnWidth, out pnHeight );
}
// uint
public uint GetIPCCallCount()
{
return platform.ISteamUtils_GetIPCCallCount();
}
// string
// with: Detect_StringReturn
public string GetIPCountry()
{
IntPtr string_pointer;
string_pointer = platform.ISteamUtils_GetIPCountry();
return Marshal.PtrToStringAnsi( string_pointer );
}
// uint
public uint GetSecondsSinceAppActive()
{
return platform.ISteamUtils_GetSecondsSinceAppActive();
}
// uint
public uint GetSecondsSinceComputerActive()
{
return platform.ISteamUtils_GetSecondsSinceComputerActive();
}
// uint
public uint GetServerRealTime()
{
return platform.ISteamUtils_GetServerRealTime();
}
// string
// with: Detect_StringReturn
public string GetSteamUILanguage()
{
IntPtr string_pointer;
string_pointer = platform.ISteamUtils_GetSteamUILanguage();
return Marshal.PtrToStringAnsi( string_pointer );
}
// bool
public bool IsAPICallCompleted( SteamAPICall_t hSteamAPICall /*SteamAPICall_t*/, ref bool pbFailed /*bool **/ )
{
return platform.ISteamUtils_IsAPICallCompleted( hSteamAPICall.Value, ref pbFailed );
}
// bool
public bool IsOverlayEnabled()
{
return platform.ISteamUtils_IsOverlayEnabled();
}
// bool
public bool IsSteamInBigPictureMode()
{
return platform.ISteamUtils_IsSteamInBigPictureMode();
}
// bool
public bool IsSteamRunningInVR()
{
return platform.ISteamUtils_IsSteamRunningInVR();
}
// bool
public bool IsVRHeadsetStreamingEnabled()
{
return platform.ISteamUtils_IsVRHeadsetStreamingEnabled();
}
// void
public void SetOverlayNotificationInset( int nHorizontalInset /*int*/, int nVerticalInset /*int*/ )
{
platform.ISteamUtils_SetOverlayNotificationInset( nHorizontalInset, nVerticalInset );
}
// void
public void SetOverlayNotificationPosition( NotificationPosition eNotificationPosition /*ENotificationPosition*/ )
{
platform.ISteamUtils_SetOverlayNotificationPosition( eNotificationPosition );
}
// void
public void SetVRHeadsetStreamingEnabled( bool bEnabled /*bool*/ )
{
platform.ISteamUtils_SetVRHeadsetStreamingEnabled( bEnabled );
}
// void
public void SetWarningMessageHook( IntPtr pFunction /*SteamAPIWarningMessageHook_t*/ )
{
platform.ISteamUtils_SetWarningMessageHook( (IntPtr) pFunction );
}
// bool
public bool ShowGamepadTextInput( GamepadTextInputMode eInputMode /*EGamepadTextInputMode*/, GamepadTextInputLineMode eLineInputMode /*EGamepadTextInputLineMode*/, string pchDescription /*const char **/, uint unCharMax /*uint32*/, string pchExistingText /*const char **/ )
{
return platform.ISteamUtils_ShowGamepadTextInput( eInputMode, eLineInputMode, pchDescription, unCharMax, pchExistingText );
}
// void
public void StartVRDashboard()
{
platform.ISteamUtils_StartVRDashboard();
}
}
}
@@ -0,0 +1,77 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal unsafe class SteamVideo : IDisposable
{
//
// Holds a platform specific implentation
//
internal Platform.Interface platform;
internal Facepunch.Steamworks.BaseSteamworks steamworks;
//
// Constructor decides which implementation to use based on current platform
//
internal SteamVideo( Facepunch.Steamworks.BaseSteamworks steamworks, IntPtr pointer )
{
this.steamworks = steamworks;
if ( Platform.IsWindows64 ) platform = new Platform.Win64( pointer );
else if ( Platform.IsWindows32 ) platform = new Platform.Win32( pointer );
else if ( Platform.IsLinux32 ) platform = new Platform.Linux32( pointer );
else if ( Platform.IsLinux64 ) platform = new Platform.Linux64( pointer );
else if ( Platform.IsOsx ) platform = new Platform.Mac( pointer );
}
//
// Class is invalid if we don't have a valid implementation
//
public bool IsValid{ get{ return platform != null && platform.IsValid; } }
//
// When shutting down clear all the internals to avoid accidental use
//
public virtual void Dispose()
{
if ( platform != null )
{
platform.Dispose();
platform = null;
}
}
// void
public void GetOPFSettings( AppId_t unVideoAppID /*AppId_t*/ )
{
platform.ISteamVideo_GetOPFSettings( unVideoAppID.Value );
}
// bool
// with: Detect_StringFetch True
public string GetOPFStringForApp( AppId_t unVideoAppID /*AppId_t*/ )
{
bool bSuccess = default( bool );
System.Text.StringBuilder pchBuffer_sb = Helpers.TakeStringBuilder();
int pnBufferSize = 4096;
bSuccess = platform.ISteamVideo_GetOPFStringForApp( unVideoAppID.Value, pchBuffer_sb, out pnBufferSize );
if ( !bSuccess ) return null;
return pchBuffer_sb.ToString();
}
// void
public void GetVideoURL( AppId_t unVideoAppID /*AppId_t*/ )
{
platform.ISteamVideo_GetVideoURL( unVideoAppID.Value );
}
// bool
public bool IsBroadcasting( IntPtr pnNumViewers /*int **/ )
{
return platform.ISteamVideo_IsBroadcasting( (IntPtr) pnNumViewers );
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,712 @@
using System;
using System.Runtime.InteropServices;
using System.Linq;
namespace SteamNative
{
internal struct GID_t
{
public ulong Value;
public static implicit operator GID_t( ulong value )
{
return new GID_t(){ Value = value };
}
public static implicit operator ulong( GID_t value )
{
return value.Value;
}
}
internal struct JobID_t
{
public ulong Value;
public static implicit operator JobID_t( ulong value )
{
return new JobID_t(){ Value = value };
}
public static implicit operator ulong( JobID_t value )
{
return value.Value;
}
}
internal struct TxnID_t
{
public GID_t Value;
public static implicit operator TxnID_t( GID_t value )
{
return new TxnID_t(){ Value = value };
}
public static implicit operator GID_t( TxnID_t value )
{
return value.Value;
}
}
internal struct PackageId_t
{
public uint Value;
public static implicit operator PackageId_t( uint value )
{
return new PackageId_t(){ Value = value };
}
public static implicit operator uint( PackageId_t value )
{
return value.Value;
}
}
internal struct BundleId_t
{
public uint Value;
public static implicit operator BundleId_t( uint value )
{
return new BundleId_t(){ Value = value };
}
public static implicit operator uint( BundleId_t value )
{
return value.Value;
}
}
internal struct AppId_t
{
public uint Value;
public static implicit operator AppId_t( uint value )
{
return new AppId_t(){ Value = value };
}
public static implicit operator uint( AppId_t value )
{
return value.Value;
}
}
internal struct AssetClassId_t
{
public ulong Value;
public static implicit operator AssetClassId_t( ulong value )
{
return new AssetClassId_t(){ Value = value };
}
public static implicit operator ulong( AssetClassId_t value )
{
return value.Value;
}
}
internal struct PhysicalItemId_t
{
public uint Value;
public static implicit operator PhysicalItemId_t( uint value )
{
return new PhysicalItemId_t(){ Value = value };
}
public static implicit operator uint( PhysicalItemId_t value )
{
return value.Value;
}
}
internal struct DepotId_t
{
public uint Value;
public static implicit operator DepotId_t( uint value )
{
return new DepotId_t(){ Value = value };
}
public static implicit operator uint( DepotId_t value )
{
return value.Value;
}
}
internal struct RTime32
{
public uint Value;
public static implicit operator RTime32( uint value )
{
return new RTime32(){ Value = value };
}
public static implicit operator uint( RTime32 value )
{
return value.Value;
}
}
internal struct CellID_t
{
public uint Value;
public static implicit operator CellID_t( uint value )
{
return new CellID_t(){ Value = value };
}
public static implicit operator uint( CellID_t value )
{
return value.Value;
}
}
internal struct SteamAPICall_t
{
public ulong Value;
public static implicit operator SteamAPICall_t( ulong value )
{
return new SteamAPICall_t(){ Value = value };
}
public static implicit operator ulong( SteamAPICall_t value )
{
return value.Value;
}
}
internal struct AccountID_t
{
public uint Value;
public static implicit operator AccountID_t( uint value )
{
return new AccountID_t(){ Value = value };
}
public static implicit operator uint( AccountID_t value )
{
return value.Value;
}
}
internal struct PartnerId_t
{
public uint Value;
public static implicit operator PartnerId_t( uint value )
{
return new PartnerId_t(){ Value = value };
}
public static implicit operator uint( PartnerId_t value )
{
return value.Value;
}
}
internal struct ManifestId_t
{
public ulong Value;
public static implicit operator ManifestId_t( ulong value )
{
return new ManifestId_t(){ Value = value };
}
public static implicit operator ulong( ManifestId_t value )
{
return value.Value;
}
}
internal struct SiteId_t
{
public ulong Value;
public static implicit operator SiteId_t( ulong value )
{
return new SiteId_t(){ Value = value };
}
public static implicit operator ulong( SiteId_t value )
{
return value.Value;
}
}
internal struct HAuthTicket
{
public uint Value;
public static implicit operator HAuthTicket( uint value )
{
return new HAuthTicket(){ Value = value };
}
public static implicit operator uint( HAuthTicket value )
{
return value.Value;
}
}
internal struct BREAKPAD_HANDLE
{
public IntPtr Value;
public static implicit operator BREAKPAD_HANDLE( IntPtr value )
{
return new BREAKPAD_HANDLE(){ Value = value };
}
public static implicit operator IntPtr( BREAKPAD_HANDLE value )
{
return value.Value;
}
}
internal struct HSteamPipe
{
public int Value;
public static implicit operator HSteamPipe( int value )
{
return new HSteamPipe(){ Value = value };
}
public static implicit operator int( HSteamPipe value )
{
return value.Value;
}
}
internal struct HSteamUser
{
public int Value;
public static implicit operator HSteamUser( int value )
{
return new HSteamUser(){ Value = value };
}
public static implicit operator int( HSteamUser value )
{
return value.Value;
}
}
internal struct FriendsGroupID_t
{
public short Value;
public static implicit operator FriendsGroupID_t( short value )
{
return new FriendsGroupID_t(){ Value = value };
}
public static implicit operator short( FriendsGroupID_t value )
{
return value.Value;
}
}
internal struct HServerListRequest
{
public IntPtr Value;
public static implicit operator HServerListRequest( IntPtr value )
{
return new HServerListRequest(){ Value = value };
}
public static implicit operator IntPtr( HServerListRequest value )
{
return value.Value;
}
}
internal struct HServerQuery
{
public int Value;
public static implicit operator HServerQuery( int value )
{
return new HServerQuery(){ Value = value };
}
public static implicit operator int( HServerQuery value )
{
return value.Value;
}
}
internal struct UGCHandle_t
{
public ulong Value;
public static implicit operator UGCHandle_t( ulong value )
{
return new UGCHandle_t(){ Value = value };
}
public static implicit operator ulong( UGCHandle_t value )
{
return value.Value;
}
}
internal struct PublishedFileUpdateHandle_t
{
public ulong Value;
public static implicit operator PublishedFileUpdateHandle_t( ulong value )
{
return new PublishedFileUpdateHandle_t(){ Value = value };
}
public static implicit operator ulong( PublishedFileUpdateHandle_t value )
{
return value.Value;
}
}
internal struct PublishedFileId_t
{
public ulong Value;
public static implicit operator PublishedFileId_t( ulong value )
{
return new PublishedFileId_t(){ Value = value };
}
public static implicit operator ulong( PublishedFileId_t value )
{
return value.Value;
}
}
internal struct UGCFileWriteStreamHandle_t
{
public ulong Value;
public static implicit operator UGCFileWriteStreamHandle_t( ulong value )
{
return new UGCFileWriteStreamHandle_t(){ Value = value };
}
public static implicit operator ulong( UGCFileWriteStreamHandle_t value )
{
return value.Value;
}
}
internal struct SteamLeaderboard_t
{
public ulong Value;
public static implicit operator SteamLeaderboard_t( ulong value )
{
return new SteamLeaderboard_t(){ Value = value };
}
public static implicit operator ulong( SteamLeaderboard_t value )
{
return value.Value;
}
}
internal struct SteamLeaderboardEntries_t
{
public ulong Value;
public static implicit operator SteamLeaderboardEntries_t( ulong value )
{
return new SteamLeaderboardEntries_t(){ Value = value };
}
public static implicit operator ulong( SteamLeaderboardEntries_t value )
{
return value.Value;
}
}
internal struct SNetSocket_t
{
public uint Value;
public static implicit operator SNetSocket_t( uint value )
{
return new SNetSocket_t(){ Value = value };
}
public static implicit operator uint( SNetSocket_t value )
{
return value.Value;
}
}
internal struct SNetListenSocket_t
{
public uint Value;
public static implicit operator SNetListenSocket_t( uint value )
{
return new SNetListenSocket_t(){ Value = value };
}
public static implicit operator uint( SNetListenSocket_t value )
{
return value.Value;
}
}
internal struct ScreenshotHandle
{
public uint Value;
public static implicit operator ScreenshotHandle( uint value )
{
return new ScreenshotHandle(){ Value = value };
}
public static implicit operator uint( ScreenshotHandle value )
{
return value.Value;
}
}
internal struct HTTPRequestHandle
{
public uint Value;
public static implicit operator HTTPRequestHandle( uint value )
{
return new HTTPRequestHandle(){ Value = value };
}
public static implicit operator uint( HTTPRequestHandle value )
{
return value.Value;
}
}
internal struct HTTPCookieContainerHandle
{
public uint Value;
public static implicit operator HTTPCookieContainerHandle( uint value )
{
return new HTTPCookieContainerHandle(){ Value = value };
}
public static implicit operator uint( HTTPCookieContainerHandle value )
{
return value.Value;
}
}
internal struct ControllerHandle_t
{
public ulong Value;
public static implicit operator ControllerHandle_t( ulong value )
{
return new ControllerHandle_t(){ Value = value };
}
public static implicit operator ulong( ControllerHandle_t value )
{
return value.Value;
}
}
internal struct ControllerActionSetHandle_t
{
public ulong Value;
public static implicit operator ControllerActionSetHandle_t( ulong value )
{
return new ControllerActionSetHandle_t(){ Value = value };
}
public static implicit operator ulong( ControllerActionSetHandle_t value )
{
return value.Value;
}
}
internal struct ControllerDigitalActionHandle_t
{
public ulong Value;
public static implicit operator ControllerDigitalActionHandle_t( ulong value )
{
return new ControllerDigitalActionHandle_t(){ Value = value };
}
public static implicit operator ulong( ControllerDigitalActionHandle_t value )
{
return value.Value;
}
}
internal struct ControllerAnalogActionHandle_t
{
public ulong Value;
public static implicit operator ControllerAnalogActionHandle_t( ulong value )
{
return new ControllerAnalogActionHandle_t(){ Value = value };
}
public static implicit operator ulong( ControllerAnalogActionHandle_t value )
{
return value.Value;
}
}
internal struct UGCQueryHandle_t
{
public ulong Value;
public static implicit operator UGCQueryHandle_t( ulong value )
{
return new UGCQueryHandle_t(){ Value = value };
}
public static implicit operator ulong( UGCQueryHandle_t value )
{
return value.Value;
}
}
internal struct UGCUpdateHandle_t
{
public ulong Value;
public static implicit operator UGCUpdateHandle_t( ulong value )
{
return new UGCUpdateHandle_t(){ Value = value };
}
public static implicit operator ulong( UGCUpdateHandle_t value )
{
return value.Value;
}
}
internal struct HHTMLBrowser
{
public uint Value;
public static implicit operator HHTMLBrowser( uint value )
{
return new HHTMLBrowser(){ Value = value };
}
public static implicit operator uint( HHTMLBrowser value )
{
return value.Value;
}
}
internal struct SteamItemInstanceID_t
{
public ulong Value;
public static implicit operator SteamItemInstanceID_t( ulong value )
{
return new SteamItemInstanceID_t(){ Value = value };
}
public static implicit operator ulong( SteamItemInstanceID_t value )
{
return value.Value;
}
}
internal struct SteamItemDef_t
{
public int Value;
public static implicit operator SteamItemDef_t( int value )
{
return new SteamItemDef_t(){ Value = value };
}
public static implicit operator int( SteamItemDef_t value )
{
return value.Value;
}
}
internal struct SteamInventoryResult_t
{
public int Value;
public static implicit operator SteamInventoryResult_t( int value )
{
return new SteamInventoryResult_t(){ Value = value };
}
public static implicit operator int( SteamInventoryResult_t value )
{
return value.Value;
}
}
internal struct SteamInventoryUpdateHandle_t
{
public ulong Value;
public static implicit operator SteamInventoryUpdateHandle_t( ulong value )
{
return new SteamInventoryUpdateHandle_t(){ Value = value };
}
public static implicit operator ulong( SteamInventoryUpdateHandle_t value )
{
return value.Value;
}
}
internal struct CGameID
{
public ulong Value;
public static implicit operator CGameID( ulong value )
{
return new CGameID(){ Value = value };
}
public static implicit operator ulong( CGameID value )
{
return value.Value;
}
}
internal struct CSteamID
{
public ulong Value;
public static implicit operator CSteamID( ulong value )
{
return new CSteamID(){ Value = value };
}
public static implicit operator ulong( CSteamID value )
{
return value.Value;
}
}
}