Generate for new SDK

This commit is contained in:
Garry Newman 2020-08-18 11:30:47 +01:00
parent ce3c395b49
commit 68a1886283
11 changed files with 206 additions and 35 deletions

View File

@ -51,6 +51,7 @@ namespace Steamworks
FriendsEnumerateFollowingList = 346,
SetPersonaNameResponse = 347,
UnreadChatMessagesChanged = 348,
OverlayBrowserProtocolNavigation = 349,
FavoritesListChanged = 502,
LobbyInvite = 503,
LobbyEnter = 504,
@ -74,6 +75,7 @@ namespace Steamworks
NewUrlLaunchParameters = 1014,
AppProofOfPurchaseKeyResponse = 1021,
FileDetailsResult = 1023,
TimedTrialStatus = 1030,
UserStatsReceived = 1101,
UserStatsStored = 1102,
UserAchievementStored = 1103,
@ -261,6 +263,7 @@ namespace Steamworks
{ CallbackType.FriendsEnumerateFollowingList, typeof( FriendsEnumerateFollowingList_t )},
{ CallbackType.SetPersonaNameResponse, typeof( SetPersonaNameResponse_t )},
{ CallbackType.UnreadChatMessagesChanged, typeof( UnreadChatMessagesChanged_t )},
{ CallbackType.OverlayBrowserProtocolNavigation, typeof( OverlayBrowserProtocolNavigation_t )},
{ CallbackType.FavoritesListChanged, typeof( FavoritesListChanged_t )},
{ CallbackType.LobbyInvite, typeof( LobbyInvite_t )},
{ CallbackType.LobbyEnter, typeof( LobbyEnter_t )},
@ -284,6 +287,7 @@ namespace Steamworks
{ CallbackType.NewUrlLaunchParameters, typeof( NewUrlLaunchParameters_t )},
{ CallbackType.AppProofOfPurchaseKeyResponse, typeof( AppProofOfPurchaseKeyResponse_t )},
{ CallbackType.FileDetailsResult, typeof( FileDetailsResult_t )},
{ CallbackType.TimedTrialStatus, typeof( TimedTrialStatus_t )},
{ CallbackType.UserStatsReceived, typeof( UserStatsReceived_t )},
{ CallbackType.UserStatsStored, typeof( UserStatsStored_t )},
{ CallbackType.UserAchievementStored, typeof( UserAchievementStored_t )},

View File

@ -348,5 +348,17 @@ namespace Steamworks
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamApps_BIsTimedTrial", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _BIsTimedTrial( IntPtr self, ref uint punSecondsAllowed, ref uint punSecondsPlayed );
#endregion
internal bool BIsTimedTrial( ref uint punSecondsAllowed, ref uint punSecondsPlayed )
{
var returnValue = _BIsTimedTrial( Self, ref punSecondsAllowed, ref punSecondsPlayed );
return returnValue;
}
}
}

View File

@ -840,5 +840,17 @@ namespace Steamworks
_ActivateGameOverlayRemotePlayTogetherInviteDialog( Self, steamIDLobby );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamFriends_RegisterProtocolInOverlayBrowser", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _RegisterProtocolInOverlayBrowser( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchProtocol );
#endregion
internal bool RegisterProtocolInOverlayBrowser( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchProtocol )
{
var returnValue = _RegisterProtocolInOverlayBrowser( Self, pchProtocol );
return returnValue;
}
}
}

View File

@ -496,5 +496,20 @@ namespace Steamworks
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamInventory_InspectItem", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _InspectItem( IntPtr self, ref SteamInventoryResult_t pResultHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchItemToken );
#endregion
/// <summary>
/// Look up the given token and return a pseudo-Inventory item.
/// </summary>
internal bool InspectItem( ref SteamInventoryResult_t pResultHandle, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchItemToken )
{
var returnValue = _InspectItem( Self, ref pResultHandle, pchItemToken );
return returnValue;
}
}
}

View File

@ -15,9 +15,9 @@ namespace Steamworks
SetupInterface( IsGameServer );
}
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUser_v020", CallingConvention = Platform.CC)]
internal static extern IntPtr SteamAPI_SteamUser_v020();
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUser_v020();
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUser_v021", CallingConvention = Platform.CC)]
internal static extern IntPtr SteamAPI_SteamUser_v021();
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUser_v021();
#region FunctionMeta
@ -364,5 +364,17 @@ namespace Steamworks
return new CallResult<DurationControl_t>( returnValue, IsServer );
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUser_BSetDurationControlOnlineState", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _BSetDurationControlOnlineState( IntPtr self, DurationControlOnlineState eNewState );
#endregion
internal bool BSetDurationControlOnlineState( DurationControlOnlineState eNewState )
{
var returnValue = _BSetDurationControlOnlineState( Self, eNewState );
return returnValue;
}
}
}

View File

@ -15,9 +15,9 @@ namespace Steamworks
SetupInterface( IsGameServer );
}
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUserStats_v011", CallingConvention = Platform.CC)]
internal static extern IntPtr SteamAPI_SteamUserStats_v011();
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUserStats_v011();
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamUserStats_v012", CallingConvention = Platform.CC)]
internal static extern IntPtr SteamAPI_SteamUserStats_v012();
public override IntPtr GetUserInterfacePointer() => SteamAPI_SteamUserStats_v012();
#region FunctionMeta
@ -521,5 +521,29 @@ namespace Steamworks
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementProgressLimitsInt32", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _GetAchievementProgressLimits( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pnMinProgress, ref int pnMaxProgress );
#endregion
internal bool GetAchievementProgressLimits( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref int pnMinProgress, ref int pnMaxProgress )
{
var returnValue = _GetAchievementProgressLimits( Self, pchName, ref pnMinProgress, ref pnMaxProgress );
return returnValue;
}
#region FunctionMeta
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_ISteamUserStats_GetAchievementProgressLimitsFloat", CallingConvention = Platform.CC)]
[return: MarshalAs( UnmanagedType.I1 )]
private static extern bool _GetAchievementProgressLimits( IntPtr self, [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pfMinProgress, ref float pfMaxProgress );
#endregion
internal bool GetAchievementProgressLimits( [MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof( Utf8StringToNative ) )] string pchName, ref float pfMinProgress, ref float pfMaxProgress )
{
var returnValue = _GetAchievementProgressLimits( Self, pchName, ref pfMinProgress, ref pfMaxProgress );
return returnValue;
}
}
}

View File

@ -473,6 +473,20 @@ namespace Steamworks.Data
#endregion
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal struct OverlayBrowserProtocolNavigation_t : ICallbackData
{
internal string RgchURIUTF8() => System.Text.Encoding.UTF8.GetString( RgchURI, 0, System.Array.IndexOf<byte>( RgchURI, 0 ) );
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)] // byte[] rgchURI
internal byte[] RgchURI; // rgchURI char [1024]
#region SteamCallback
public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(OverlayBrowserProtocolNavigation_t) );
public int DataSize => _datasize;
public CallbackType CallbackType => CallbackType.OverlayBrowserProtocolNavigation;
#endregion
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal struct IPCountry_t : ICallbackData
{
@ -1605,6 +1619,22 @@ namespace Steamworks.Data
#endregion
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal struct TimedTrialStatus_t : ICallbackData
{
internal AppId AppID; // m_unAppID AppId_t
[MarshalAs(UnmanagedType.I1)]
internal bool IsOffline; // m_bIsOffline bool
internal uint SecondsAllowed; // m_unSecondsAllowed uint32
internal uint SecondsPlayed; // m_unSecondsPlayed uint32
#region SteamCallback
public static int _datasize = System.Runtime.InteropServices.Marshal.SizeOf( typeof(TimedTrialStatus_t) );
public int DataSize => _datasize;
public CallbackType CallbackType => CallbackType.TimedTrialStatus;
#endregion
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal struct P2PSessionRequest_t : ICallbackData
{

View File

@ -89,6 +89,12 @@ namespace Steamworks.Data
internal static readonly int k_cchMaxSteamNetworkingPingLocationString = 1024;
internal static readonly int k_nSteamNetworkingPing_Failed = - 1;
internal static readonly int k_nSteamNetworkingPing_Unknown = - 2;
internal static readonly int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Default = - 1;
internal static readonly int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Disable = 0;
internal static readonly int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Relay = 1;
internal static readonly int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Private = 2;
internal static readonly int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_Public = 4;
internal static readonly int k_nSteamNetworkingConfig_P2P_Transport_ICE_Enable_All = 0x7fffffff;
internal static readonly SteamNetworkingPOPID k_SteamDatagramPOPID_dev = ( ( uint ) 'd' << 16 ) | ( ( uint ) 'e' << 8 ) | ( uint ) 'v';
internal static readonly uint k_unServerFlagNone = 0x00;
internal static readonly uint k_unServerFlagActive = 0x01;

View File

@ -148,6 +148,7 @@ namespace Steamworks
CantRemoveItem = 113,
AccountDeleted = 114,
ExistingUserCancelledLicense = 115,
CommunityCooldown = 116,
}
//
@ -288,6 +289,7 @@ namespace Steamworks
SiteLicense = 262144,
LegacyFreeSub = 524288,
InvalidOSType = 1048576,
TimedTrial = 2097152,
}
//
@ -551,6 +553,17 @@ namespace Steamworks
ExitSoon_Night = 7,
}
//
// EDurationControlOnlineState
//
internal enum DurationControlOnlineState : int
{
Invalid = 0,
Offline = 1,
Online = 2,
OnlineHighPri = 3,
}
//
// EGameSearchErrorCode_t
//
@ -1083,6 +1096,7 @@ namespace Steamworks
Code417ExpectationFailed = 417,
Code4xxUnknown = 418,
Code429TooManyRequests = 429,
Code444ConnectionClosed = 444,
Code500InternalServerError = 500,
Code501NotImplemented = 501,
Code502BadGateway = 502,
@ -1869,17 +1883,6 @@ namespace Steamworks
Consumed = 512,
}
//
// ESteamTVRegionBehavior
//
internal enum SteamTVRegionBehavior : int
{
Invalid = -1,
Hover = 0,
ClickPopup = 1,
ClickSurroundingRegion = 2,
}
//
// EParentalFeature
//
@ -1980,6 +1983,7 @@ namespace Steamworks
Local_HostedServerPrimaryRelay = 3003,
Local_NetworkConfig = 3004,
Local_Rights = 3005,
Local_P2P_ICE_NoPublicAddresses = 3006,
Local_Max = 3999,
Remote_Min = 4000,
Remote_Timeout = 4001,
@ -1988,6 +1992,7 @@ namespace Steamworks
Remote_NotLoggedIn = 4004,
Remote_NotRunningApp = 4005,
Remote_BadProtocolVersion = 4006,
Remote_P2P_ICE_NoPublicAddresses = 4007,
Remote_Max = 4999,
Misc_Min = 5000,
Misc_Generic = 5001,
@ -1996,9 +2001,26 @@ namespace Steamworks
Misc_RelayConnectivity = 5004,
Misc_SteamConnectivity = 5005,
Misc_NoRelaySessionsToClient = 5006,
Misc_P2P_Rendezvous = 5008,
Misc_P2P_NAT_Firewall = 5009,
Misc_Max = 5999,
}
//
// ESteamNetTransportKind
//
internal enum SteamNetTransportKind : int
{
Unknown = 0,
LoopbackBuffers = 1,
LocalHost = 2,
UDP = 3,
UDPProbablyLocal = 4,
TURN = 5,
SDRP2P = 6,
SDRHostedServer = 7,
}
//
// ESteamNetworkingConfigScope
//
@ -2049,6 +2071,10 @@ namespace Steamworks
MTU_DataSize = 33,
Unencrypted = 34,
EnumerateDevVars = 35,
P2P_STUN_ServerList = 103,
P2P_Transport_ICE_Enable = 104,
P2P_Transport_ICE_Penalty = 105,
P2P_Transport_SDR_Penalty = 106,
SDRClient_ConsecutitivePingTimeoutsFailInitial = 19,
SDRClient_ConsecutitivePingTimeoutsFail = 20,
SDRClient_MinPingsBeforePingAccurate = 21,

View File

@ -156,6 +156,13 @@ namespace Steamworks.Data
}
internal partial struct NetIdentityRender
{
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIdentityRender_c_str", CallingConvention = Platform.CC)]
internal static extern Utf8StringPointer Internalc_str( ref NetIdentityRender self );
}
public partial struct NetAddress
{
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddr_Clear", CallingConvention = Platform.CC)]
@ -198,6 +205,13 @@ namespace Steamworks.Data
}
internal partial struct NetAddressRender
{
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingIPAddrRender_c_str", CallingConvention = Platform.CC)]
internal static extern Utf8StringPointer Internalc_str( ref NetAddressRender self );
}
internal partial struct NetMsg
{
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingMessage_t_Release", CallingConvention = Platform.CC)]
@ -205,4 +219,11 @@ namespace Steamworks.Data
}
internal partial struct SteamNetworkingPOPIDRender
{
[DllImport( Platform.LibraryName, EntryPoint = "SteamAPI_SteamNetworkingPOPIDRender_c_str", CallingConvention = Platform.CC)]
internal static extern Utf8StringPointer Internalc_str( ref SteamNetworkingPOPIDRender self );
}
}

View File

@ -17,14 +17,6 @@ namespace Steamworks.Data
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal struct FriendSessionStateInfo_t
{
internal uint IOnlineSessionInstances; // m_uiOnlineSessionInstances uint32
internal byte IPublishedToFriendsSessionInstance; // m_uiPublishedToFriendsSessionInstance uint8
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal partial struct servernetadr_t
{
@ -168,16 +160,6 @@ namespace Steamworks.Data
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal struct SteamTVRegion_t
{
internal uint UnMinX; // unMinX uint32
internal uint UnMinY; // unMinY uint32
internal uint UnMaxX; // unMaxX uint32
internal uint UnMaxY; // unMaxY uint32
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal struct SteamNetworkingQuickConnectionStatus
{
@ -199,6 +181,33 @@ namespace Steamworks.Data
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal partial struct SteamNetworkingPOPIDRender
{
internal string BufUTF8() => System.Text.Encoding.UTF8.GetString( Buf, 0, System.Array.IndexOf<byte>( Buf, 0 ) );
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] // byte[] buf
internal byte[] Buf; // buf char [8]
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal partial struct NetIdentityRender
{
internal string BufUTF8() => System.Text.Encoding.UTF8.GetString( Buf, 0, System.Array.IndexOf<byte>( Buf, 0 ) );
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] // byte[] buf
internal byte[] Buf; // buf char [128]
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal partial struct NetAddressRender
{
internal string BufUTF8() => System.Text.Encoding.UTF8.GetString( Buf, 0, System.Array.IndexOf<byte>( Buf, 0 ) );
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)] // byte[] buf
internal byte[] Buf; // buf char [48]
}
[StructLayout( LayoutKind.Sequential, Pack = Platform.StructPlatformPackSize )]
internal partial struct SteamDatagramHostedAddress
{