diff --git a/Facepunch.Steamworks/Client/ServerList.cs b/Facepunch.Steamworks/Client/ServerList.cs index b9e118d..ceae9e4 100644 --- a/Facepunch.Steamworks/Client/ServerList.cs +++ b/Facepunch.Steamworks/Client/ServerList.cs @@ -53,73 +53,5 @@ namespace Facepunch.Steamworks { client = null; } - - public class Filter : List> - { - public void Add( string k, string v ) - { - Add( new KeyValuePair( k, v ) ); - } - - internal IntPtr NativeArray; - private IntPtr m_pArrayEntries; - - private int AppId = 0; - - internal void Start() - { - var filters = this.Select( x => - { - if ( x.Key == "appid" ) AppId = int.Parse( x.Value ); - - return new SteamNative.MatchMakingKeyValuePair_t() - { - Key = x.Key, - Value = x.Value - }; - } ).ToArray(); - - int sizeOfMMKVP = Marshal.SizeOf(typeof(SteamNative.MatchMakingKeyValuePair_t)); - NativeArray = Marshal.AllocHGlobal( Marshal.SizeOf( typeof( IntPtr ) ) * filters.Length ); - m_pArrayEntries = Marshal.AllocHGlobal( sizeOfMMKVP * filters.Length ); - - for ( int i = 0; i < filters.Length; ++i ) - { - Marshal.StructureToPtr( filters[i], new IntPtr( m_pArrayEntries.ToInt64() + ( i * sizeOfMMKVP ) ), false ); - } - - Marshal.WriteIntPtr( NativeArray, m_pArrayEntries ); - } - - internal void Free() - { - if ( m_pArrayEntries != IntPtr.Zero ) - { - Marshal.FreeHGlobal( m_pArrayEntries ); - } - - if ( NativeArray != IntPtr.Zero ) - { - Marshal.FreeHGlobal( NativeArray ); - } - } - - internal bool Test( gameserveritem_t info ) - { - if ( AppId != 0 && AppId != info.AppID ) - return false; - - return true; - } - } - - [StructLayout( LayoutKind.Sequential )] - private struct MatchPair - { - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string key; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] - public string value; - } } } diff --git a/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs b/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs new file mode 100644 index 0000000..a768707 --- /dev/null +++ b/Facepunch.Steamworks/Generated/Interfaces/ISteamFriends.cs @@ -0,0 +1,901 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using SteamNative; + + +namespace Steamworks.Internal +{ + public class ISteamFriends : BaseSteamInterface + { + public override string InterfaceName => "SteamFriends017"; + + public override void InitInternals() + { + GetPersonaNameDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 0) ); + SetPersonaNameDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 8) ); + GetPersonaStateDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 16) ); + GetFriendCountDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 24) ); + GetFriendByIndexDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 32) ); + GetFriendRelationshipDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 40) ); + GetFriendPersonaStateDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 48) ); + GetFriendPersonaNameDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 56) ); + GetFriendPersonaNameHistoryDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 64) ); + GetFriendSteamLevelDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 72) ); + GetPlayerNicknameDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 80) ); + GetFriendsGroupCountDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 88) ); + GetFriendsGroupIDByIndexDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 96) ); + GetFriendsGroupNameDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 104) ); + GetFriendsGroupMembersCountDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 112) ); + GetFriendsGroupMembersListDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 120) ); + HasFriendDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 128) ); + GetClanCountDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 136) ); + GetClanByIndexDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 144) ); + GetClanNameDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 152) ); + GetClanTagDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 160) ); + GetClanActivityCountsDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 168) ); + DownloadClanActivityCountsDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 176) ); + GetFriendCountFromSourceDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 184) ); + GetFriendFromSourceByIndexDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 192) ); + IsUserInSourceDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 200) ); + SetInGameVoiceSpeakingDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 208) ); + ActivateGameOverlayDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 216) ); + ActivateGameOverlayToUserDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 224) ); + ActivateGameOverlayToWebPageDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 232) ); + ActivateGameOverlayToStoreDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 240) ); + SetPlayedWithDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 248) ); + ActivateGameOverlayInviteDialogDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 256) ); + GetSmallFriendAvatarDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 264) ); + GetMediumFriendAvatarDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 272) ); + GetLargeFriendAvatarDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 280) ); + RequestUserInformationDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 288) ); + RequestClanOfficerListDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 296) ); + GetClanOwnerDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 304) ); + GetClanOfficerCountDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 312) ); + GetClanOfficerByIndexDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 320) ); + GetUserRestrictionsDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 328) ); + SetRichPresenceDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 336) ); + ClearRichPresenceDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 344) ); + GetFriendRichPresenceDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 352) ); + GetFriendRichPresenceKeyCountDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 360) ); + GetFriendRichPresenceKeyByIndexDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 368) ); + RequestFriendRichPresenceDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 376) ); + InviteUserToGameDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 384) ); + GetCoplayFriendCountDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 392) ); + GetCoplayFriendDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 400) ); + GetFriendCoplayTimeDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 408) ); + GetFriendCoplayGameDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 416) ); + JoinClanChatRoomDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 424) ); + LeaveClanChatRoomDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 432) ); + GetClanChatMemberCountDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 440) ); + GetChatMemberByIndexDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 448) ); + SendClanChatMessageDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 456) ); + IsClanChatAdminDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 464) ); + IsClanChatWindowOpenInSteamDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 472) ); + OpenClanChatWindowInSteamDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 480) ); + CloseClanChatWindowInSteamDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 488) ); + SetListenForFriendsMessagesDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 496) ); + ReplyToFriendMessageDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 504) ); + GetFriendMessageDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 512) ); + GetFollowerCountDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 520) ); + IsFollowingDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 528) ); + EnumerateFollowingListDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 536) ); + IsClanPublicDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 544) ); + IsClanOfficialGameGroupDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 552) ); + GetNumChatsWithUnreadPriorityMessagesDelegatePointer = Marshal.GetDelegateForFunctionPointer( Marshal.ReadIntPtr( VTable, 560) ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate IntPtr GetPersonaNameDelegate( IntPtr self ); + private GetPersonaNameDelegate GetPersonaNameDelegatePointer; + + #endregion + public string GetPersonaName() + { + return GetString( GetPersonaNameDelegatePointer( Self ) ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate SteamAPICall_t SetPersonaNameDelegate( IntPtr self, string pchPersonaName ); + private SetPersonaNameDelegate SetPersonaNameDelegatePointer; + + #endregion + public async Task SetPersonaName( string pchPersonaName ) + { + return await (new Result( SetPersonaNameDelegatePointer( Self, pchPersonaName ) )).GetResult(); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate PersonaState GetPersonaStateDelegate( IntPtr self ); + private GetPersonaStateDelegate GetPersonaStateDelegatePointer; + + #endregion + public PersonaState GetPersonaState() + { + return GetPersonaStateDelegatePointer( Self ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetFriendCountDelegate( IntPtr self, int iFriendFlags ); + private GetFriendCountDelegate GetFriendCountDelegatePointer; + + #endregion + public int GetFriendCount( int iFriendFlags ) + { + return GetFriendCountDelegatePointer( Self, iFriendFlags ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void GetFriendByIndexDelegate( IntPtr self, int iFriend, int iFriendFlags, ref CSteamID retVal ); + private GetFriendByIndexDelegate GetFriendByIndexDelegatePointer; + + #endregion + public CSteamID GetFriendByIndex( int iFriend, int iFriendFlags ) + { + var retVal = default( CSteamID ); + GetFriendByIndexDelegatePointer( Self, iFriend, iFriendFlags, ref retVal ); + return retVal; + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate FriendRelationship GetFriendRelationshipDelegate( IntPtr self, CSteamID steamIDFriend ); + private GetFriendRelationshipDelegate GetFriendRelationshipDelegatePointer; + + #endregion + public FriendRelationship GetFriendRelationship( CSteamID steamIDFriend ) + { + return GetFriendRelationshipDelegatePointer( Self, steamIDFriend ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate PersonaState GetFriendPersonaStateDelegate( IntPtr self, CSteamID steamIDFriend ); + private GetFriendPersonaStateDelegate GetFriendPersonaStateDelegatePointer; + + #endregion + public PersonaState GetFriendPersonaState( CSteamID steamIDFriend ) + { + return GetFriendPersonaStateDelegatePointer( Self, steamIDFriend ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate IntPtr GetFriendPersonaNameDelegate( IntPtr self, CSteamID steamIDFriend ); + private GetFriendPersonaNameDelegate GetFriendPersonaNameDelegatePointer; + + #endregion + public string GetFriendPersonaName( CSteamID steamIDFriend ) + { + return GetString( GetFriendPersonaNameDelegatePointer( Self, steamIDFriend ) ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate IntPtr GetFriendPersonaNameHistoryDelegate( IntPtr self, CSteamID steamIDFriend, int iPersonaName ); + private GetFriendPersonaNameHistoryDelegate GetFriendPersonaNameHistoryDelegatePointer; + + #endregion + public string GetFriendPersonaNameHistory( CSteamID steamIDFriend, int iPersonaName ) + { + return GetString( GetFriendPersonaNameHistoryDelegatePointer( Self, steamIDFriend, iPersonaName ) ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetFriendSteamLevelDelegate( IntPtr self, CSteamID steamIDFriend ); + private GetFriendSteamLevelDelegate GetFriendSteamLevelDelegatePointer; + + #endregion + public int GetFriendSteamLevel( CSteamID steamIDFriend ) + { + return GetFriendSteamLevelDelegatePointer( Self, steamIDFriend ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate IntPtr GetPlayerNicknameDelegate( IntPtr self, CSteamID steamIDPlayer ); + private GetPlayerNicknameDelegate GetPlayerNicknameDelegatePointer; + + #endregion + public string GetPlayerNickname( CSteamID steamIDPlayer ) + { + return GetString( GetPlayerNicknameDelegatePointer( Self, steamIDPlayer ) ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetFriendsGroupCountDelegate( IntPtr self ); + private GetFriendsGroupCountDelegate GetFriendsGroupCountDelegatePointer; + + #endregion + public int GetFriendsGroupCount() + { + return GetFriendsGroupCountDelegatePointer( Self ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate FriendsGroupID_t GetFriendsGroupIDByIndexDelegate( IntPtr self, int iFG ); + private GetFriendsGroupIDByIndexDelegate GetFriendsGroupIDByIndexDelegatePointer; + + #endregion + public FriendsGroupID_t GetFriendsGroupIDByIndex( int iFG ) + { + return GetFriendsGroupIDByIndexDelegatePointer( Self, iFG ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate IntPtr GetFriendsGroupNameDelegate( IntPtr self, FriendsGroupID_t friendsGroupID ); + private GetFriendsGroupNameDelegate GetFriendsGroupNameDelegatePointer; + + #endregion + public string GetFriendsGroupName( FriendsGroupID_t friendsGroupID ) + { + return GetString( GetFriendsGroupNameDelegatePointer( Self, friendsGroupID ) ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetFriendsGroupMembersCountDelegate( IntPtr self, FriendsGroupID_t friendsGroupID ); + private GetFriendsGroupMembersCountDelegate GetFriendsGroupMembersCountDelegatePointer; + + #endregion + public int GetFriendsGroupMembersCount( FriendsGroupID_t friendsGroupID ) + { + return GetFriendsGroupMembersCountDelegatePointer( Self, friendsGroupID ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void GetFriendsGroupMembersListDelegate( IntPtr self, FriendsGroupID_t friendsGroupID, [In,Out] CSteamID[] pOutSteamIDMembers, int nMembersCount ); + private GetFriendsGroupMembersListDelegate GetFriendsGroupMembersListDelegatePointer; + + #endregion + public void GetFriendsGroupMembersList( FriendsGroupID_t friendsGroupID, [In,Out] CSteamID[] pOutSteamIDMembers, int nMembersCount ) + { + GetFriendsGroupMembersListDelegatePointer( Self, friendsGroupID, pOutSteamIDMembers, nMembersCount ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool HasFriendDelegate( IntPtr self, CSteamID steamIDFriend, int iFriendFlags ); + private HasFriendDelegate HasFriendDelegatePointer; + + #endregion + public bool HasFriend( CSteamID steamIDFriend, int iFriendFlags ) + { + return HasFriendDelegatePointer( Self, steamIDFriend, iFriendFlags ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetClanCountDelegate( IntPtr self ); + private GetClanCountDelegate GetClanCountDelegatePointer; + + #endregion + public int GetClanCount() + { + return GetClanCountDelegatePointer( Self ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void GetClanByIndexDelegate( IntPtr self, int iClan, ref CSteamID retVal ); + private GetClanByIndexDelegate GetClanByIndexDelegatePointer; + + #endregion + public CSteamID GetClanByIndex( int iClan ) + { + var retVal = default( CSteamID ); + GetClanByIndexDelegatePointer( Self, iClan, ref retVal ); + return retVal; + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate IntPtr GetClanNameDelegate( IntPtr self, CSteamID steamIDClan ); + private GetClanNameDelegate GetClanNameDelegatePointer; + + #endregion + public string GetClanName( CSteamID steamIDClan ) + { + return GetString( GetClanNameDelegatePointer( Self, steamIDClan ) ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate IntPtr GetClanTagDelegate( IntPtr self, CSteamID steamIDClan ); + private GetClanTagDelegate GetClanTagDelegatePointer; + + #endregion + public string GetClanTag( CSteamID steamIDClan ) + { + return GetString( GetClanTagDelegatePointer( Self, steamIDClan ) ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool GetClanActivityCountsDelegate( IntPtr self, CSteamID steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting ); + private GetClanActivityCountsDelegate GetClanActivityCountsDelegatePointer; + + #endregion + public bool GetClanActivityCounts( CSteamID steamIDClan, ref int pnOnline, ref int pnInGame, ref int pnChatting ) + { + return GetClanActivityCountsDelegatePointer( Self, steamIDClan, ref pnOnline, ref pnInGame, ref pnChatting ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate SteamAPICall_t DownloadClanActivityCountsDelegate( IntPtr self, [In,Out] CSteamID[] psteamIDClans, int cClansToRequest ); + private DownloadClanActivityCountsDelegate DownloadClanActivityCountsDelegatePointer; + + #endregion + public async Task DownloadClanActivityCounts( [In,Out] CSteamID[] psteamIDClans, int cClansToRequest ) + { + return await (new Result( DownloadClanActivityCountsDelegatePointer( Self, psteamIDClans, cClansToRequest ) )).GetResult(); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetFriendCountFromSourceDelegate( IntPtr self, CSteamID steamIDSource ); + private GetFriendCountFromSourceDelegate GetFriendCountFromSourceDelegatePointer; + + #endregion + public int GetFriendCountFromSource( CSteamID steamIDSource ) + { + return GetFriendCountFromSourceDelegatePointer( Self, steamIDSource ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void GetFriendFromSourceByIndexDelegate( IntPtr self, CSteamID steamIDSource, int iFriend, ref CSteamID retVal ); + private GetFriendFromSourceByIndexDelegate GetFriendFromSourceByIndexDelegatePointer; + + #endregion + public CSteamID GetFriendFromSourceByIndex( CSteamID steamIDSource, int iFriend ) + { + var retVal = default( CSteamID ); + GetFriendFromSourceByIndexDelegatePointer( Self, steamIDSource, iFriend, ref retVal ); + return retVal; + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool IsUserInSourceDelegate( IntPtr self, CSteamID steamIDUser, CSteamID steamIDSource ); + private IsUserInSourceDelegate IsUserInSourceDelegatePointer; + + #endregion + public bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource ) + { + return IsUserInSourceDelegatePointer( Self, steamIDUser, steamIDSource ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void SetInGameVoiceSpeakingDelegate( IntPtr self, CSteamID steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking ); + private SetInGameVoiceSpeakingDelegate SetInGameVoiceSpeakingDelegatePointer; + + #endregion + public void SetInGameVoiceSpeaking( CSteamID steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bSpeaking ) + { + SetInGameVoiceSpeakingDelegatePointer( Self, steamIDUser, bSpeaking ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void ActivateGameOverlayDelegate( IntPtr self, string pchDialog ); + private ActivateGameOverlayDelegate ActivateGameOverlayDelegatePointer; + + #endregion + public void ActivateGameOverlay( string pchDialog ) + { + ActivateGameOverlayDelegatePointer( Self, pchDialog ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void ActivateGameOverlayToUserDelegate( IntPtr self, string pchDialog, CSteamID steamID ); + private ActivateGameOverlayToUserDelegate ActivateGameOverlayToUserDelegatePointer; + + #endregion + public void ActivateGameOverlayToUser( string pchDialog, CSteamID steamID ) + { + ActivateGameOverlayToUserDelegatePointer( Self, pchDialog, steamID ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void ActivateGameOverlayToWebPageDelegate( IntPtr self, string pchURL, ActivateGameOverlayToWebPageMode eMode ); + private ActivateGameOverlayToWebPageDelegate ActivateGameOverlayToWebPageDelegatePointer; + + #endregion + public void ActivateGameOverlayToWebPage( string pchURL, ActivateGameOverlayToWebPageMode eMode ) + { + ActivateGameOverlayToWebPageDelegatePointer( Self, pchURL, eMode ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void ActivateGameOverlayToStoreDelegate( IntPtr self, AppId_t nAppID, OverlayToStoreFlag eFlag ); + private ActivateGameOverlayToStoreDelegate ActivateGameOverlayToStoreDelegatePointer; + + #endregion + public void ActivateGameOverlayToStore( AppId_t nAppID, OverlayToStoreFlag eFlag ) + { + ActivateGameOverlayToStoreDelegatePointer( Self, nAppID, eFlag ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void SetPlayedWithDelegate( IntPtr self, CSteamID steamIDUserPlayedWith ); + private SetPlayedWithDelegate SetPlayedWithDelegatePointer; + + #endregion + public void SetPlayedWith( CSteamID steamIDUserPlayedWith ) + { + SetPlayedWithDelegatePointer( Self, steamIDUserPlayedWith ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void ActivateGameOverlayInviteDialogDelegate( IntPtr self, CSteamID steamIDLobby ); + private ActivateGameOverlayInviteDialogDelegate ActivateGameOverlayInviteDialogDelegatePointer; + + #endregion + public void ActivateGameOverlayInviteDialog( CSteamID steamIDLobby ) + { + ActivateGameOverlayInviteDialogDelegatePointer( Self, steamIDLobby ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetSmallFriendAvatarDelegate( IntPtr self, CSteamID steamIDFriend ); + private GetSmallFriendAvatarDelegate GetSmallFriendAvatarDelegatePointer; + + #endregion + public int GetSmallFriendAvatar( CSteamID steamIDFriend ) + { + return GetSmallFriendAvatarDelegatePointer( Self, steamIDFriend ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetMediumFriendAvatarDelegate( IntPtr self, CSteamID steamIDFriend ); + private GetMediumFriendAvatarDelegate GetMediumFriendAvatarDelegatePointer; + + #endregion + public int GetMediumFriendAvatar( CSteamID steamIDFriend ) + { + return GetMediumFriendAvatarDelegatePointer( Self, steamIDFriend ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetLargeFriendAvatarDelegate( IntPtr self, CSteamID steamIDFriend ); + private GetLargeFriendAvatarDelegate GetLargeFriendAvatarDelegatePointer; + + #endregion + public int GetLargeFriendAvatar( CSteamID steamIDFriend ) + { + return GetLargeFriendAvatarDelegatePointer( Self, steamIDFriend ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool RequestUserInformationDelegate( IntPtr self, CSteamID steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly ); + private RequestUserInformationDelegate RequestUserInformationDelegatePointer; + + #endregion + public bool RequestUserInformation( CSteamID steamIDUser, [MarshalAs( UnmanagedType.U1 )] bool bRequireNameOnly ) + { + return RequestUserInformationDelegatePointer( Self, steamIDUser, bRequireNameOnly ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate SteamAPICall_t RequestClanOfficerListDelegate( IntPtr self, CSteamID steamIDClan ); + private RequestClanOfficerListDelegate RequestClanOfficerListDelegatePointer; + + #endregion + public async Task RequestClanOfficerList( CSteamID steamIDClan ) + { + return await (new Result( RequestClanOfficerListDelegatePointer( Self, steamIDClan ) )).GetResult(); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void GetClanOwnerDelegate( IntPtr self, CSteamID steamIDClan, ref CSteamID retVal ); + private GetClanOwnerDelegate GetClanOwnerDelegatePointer; + + #endregion + public CSteamID GetClanOwner( CSteamID steamIDClan ) + { + var retVal = default( CSteamID ); + GetClanOwnerDelegatePointer( Self, steamIDClan, ref retVal ); + return retVal; + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetClanOfficerCountDelegate( IntPtr self, CSteamID steamIDClan ); + private GetClanOfficerCountDelegate GetClanOfficerCountDelegatePointer; + + #endregion + public int GetClanOfficerCount( CSteamID steamIDClan ) + { + return GetClanOfficerCountDelegatePointer( Self, steamIDClan ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void GetClanOfficerByIndexDelegate( IntPtr self, CSteamID steamIDClan, int iOfficer, ref CSteamID retVal ); + private GetClanOfficerByIndexDelegate GetClanOfficerByIndexDelegatePointer; + + #endregion + public CSteamID GetClanOfficerByIndex( CSteamID steamIDClan, int iOfficer ) + { + var retVal = default( CSteamID ); + GetClanOfficerByIndexDelegatePointer( Self, steamIDClan, iOfficer, ref retVal ); + return retVal; + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate uint GetUserRestrictionsDelegate( IntPtr self ); + private GetUserRestrictionsDelegate GetUserRestrictionsDelegatePointer; + + #endregion + public uint GetUserRestrictions() + { + return GetUserRestrictionsDelegatePointer( Self ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool SetRichPresenceDelegate( IntPtr self, string pchKey, string pchValue ); + private SetRichPresenceDelegate SetRichPresenceDelegatePointer; + + #endregion + public bool SetRichPresence( string pchKey, string pchValue ) + { + return SetRichPresenceDelegatePointer( Self, pchKey, pchValue ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void ClearRichPresenceDelegate( IntPtr self ); + private ClearRichPresenceDelegate ClearRichPresenceDelegatePointer; + + #endregion + public void ClearRichPresence() + { + ClearRichPresenceDelegatePointer( Self ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate IntPtr GetFriendRichPresenceDelegate( IntPtr self, CSteamID steamIDFriend, string pchKey ); + private GetFriendRichPresenceDelegate GetFriendRichPresenceDelegatePointer; + + #endregion + public string GetFriendRichPresence( CSteamID steamIDFriend, string pchKey ) + { + return GetString( GetFriendRichPresenceDelegatePointer( Self, steamIDFriend, pchKey ) ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetFriendRichPresenceKeyCountDelegate( IntPtr self, CSteamID steamIDFriend ); + private GetFriendRichPresenceKeyCountDelegate GetFriendRichPresenceKeyCountDelegatePointer; + + #endregion + public int GetFriendRichPresenceKeyCount( CSteamID steamIDFriend ) + { + return GetFriendRichPresenceKeyCountDelegatePointer( Self, steamIDFriend ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate IntPtr GetFriendRichPresenceKeyByIndexDelegate( IntPtr self, CSteamID steamIDFriend, int iKey ); + private GetFriendRichPresenceKeyByIndexDelegate GetFriendRichPresenceKeyByIndexDelegatePointer; + + #endregion + public string GetFriendRichPresenceKeyByIndex( CSteamID steamIDFriend, int iKey ) + { + return GetString( GetFriendRichPresenceKeyByIndexDelegatePointer( Self, steamIDFriend, iKey ) ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void RequestFriendRichPresenceDelegate( IntPtr self, CSteamID steamIDFriend ); + private RequestFriendRichPresenceDelegate RequestFriendRichPresenceDelegatePointer; + + #endregion + public void RequestFriendRichPresence( CSteamID steamIDFriend ) + { + RequestFriendRichPresenceDelegatePointer( Self, steamIDFriend ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool InviteUserToGameDelegate( IntPtr self, CSteamID steamIDFriend, string pchConnectString ); + private InviteUserToGameDelegate InviteUserToGameDelegatePointer; + + #endregion + public bool InviteUserToGame( CSteamID steamIDFriend, string pchConnectString ) + { + return InviteUserToGameDelegatePointer( Self, steamIDFriend, pchConnectString ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetCoplayFriendCountDelegate( IntPtr self ); + private GetCoplayFriendCountDelegate GetCoplayFriendCountDelegatePointer; + + #endregion + public int GetCoplayFriendCount() + { + return GetCoplayFriendCountDelegatePointer( Self ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void GetCoplayFriendDelegate( IntPtr self, int iCoplayFriend, ref CSteamID retVal ); + private GetCoplayFriendDelegate GetCoplayFriendDelegatePointer; + + #endregion + public CSteamID GetCoplayFriend( int iCoplayFriend ) + { + var retVal = default( CSteamID ); + GetCoplayFriendDelegatePointer( Self, iCoplayFriend, ref retVal ); + return retVal; + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetFriendCoplayTimeDelegate( IntPtr self, CSteamID steamIDFriend ); + private GetFriendCoplayTimeDelegate GetFriendCoplayTimeDelegatePointer; + + #endregion + public int GetFriendCoplayTime( CSteamID steamIDFriend ) + { + return GetFriendCoplayTimeDelegatePointer( Self, steamIDFriend ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate AppId_t GetFriendCoplayGameDelegate( IntPtr self, CSteamID steamIDFriend ); + private GetFriendCoplayGameDelegate GetFriendCoplayGameDelegatePointer; + + #endregion + public AppId_t GetFriendCoplayGame( CSteamID steamIDFriend ) + { + return GetFriendCoplayGameDelegatePointer( Self, steamIDFriend ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate SteamAPICall_t JoinClanChatRoomDelegate( IntPtr self, CSteamID steamIDClan ); + private JoinClanChatRoomDelegate JoinClanChatRoomDelegatePointer; + + #endregion + public async Task JoinClanChatRoom( CSteamID steamIDClan ) + { + return await (new Result( JoinClanChatRoomDelegatePointer( Self, steamIDClan ) )).GetResult(); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool LeaveClanChatRoomDelegate( IntPtr self, CSteamID steamIDClan ); + private LeaveClanChatRoomDelegate LeaveClanChatRoomDelegatePointer; + + #endregion + public bool LeaveClanChatRoom( CSteamID steamIDClan ) + { + return LeaveClanChatRoomDelegatePointer( Self, steamIDClan ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetClanChatMemberCountDelegate( IntPtr self, CSteamID steamIDClan ); + private GetClanChatMemberCountDelegate GetClanChatMemberCountDelegatePointer; + + #endregion + public int GetClanChatMemberCount( CSteamID steamIDClan ) + { + return GetClanChatMemberCountDelegatePointer( Self, steamIDClan ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate void GetChatMemberByIndexDelegate( IntPtr self, CSteamID steamIDClan, int iUser, ref CSteamID retVal ); + private GetChatMemberByIndexDelegate GetChatMemberByIndexDelegatePointer; + + #endregion + public CSteamID GetChatMemberByIndex( CSteamID steamIDClan, int iUser ) + { + var retVal = default( CSteamID ); + GetChatMemberByIndexDelegatePointer( Self, steamIDClan, iUser, ref retVal ); + return retVal; + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool SendClanChatMessageDelegate( IntPtr self, CSteamID steamIDClanChat, string pchText ); + private SendClanChatMessageDelegate SendClanChatMessageDelegatePointer; + + #endregion + public bool SendClanChatMessage( CSteamID steamIDClanChat, string pchText ) + { + return SendClanChatMessageDelegatePointer( Self, steamIDClanChat, pchText ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool IsClanChatAdminDelegate( IntPtr self, CSteamID steamIDClanChat, CSteamID steamIDUser ); + private IsClanChatAdminDelegate IsClanChatAdminDelegatePointer; + + #endregion + public bool IsClanChatAdmin( CSteamID steamIDClanChat, CSteamID steamIDUser ) + { + return IsClanChatAdminDelegatePointer( Self, steamIDClanChat, steamIDUser ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool IsClanChatWindowOpenInSteamDelegate( IntPtr self, CSteamID steamIDClanChat ); + private IsClanChatWindowOpenInSteamDelegate IsClanChatWindowOpenInSteamDelegatePointer; + + #endregion + public bool IsClanChatWindowOpenInSteam( CSteamID steamIDClanChat ) + { + return IsClanChatWindowOpenInSteamDelegatePointer( Self, steamIDClanChat ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool OpenClanChatWindowInSteamDelegate( IntPtr self, CSteamID steamIDClanChat ); + private OpenClanChatWindowInSteamDelegate OpenClanChatWindowInSteamDelegatePointer; + + #endregion + public bool OpenClanChatWindowInSteam( CSteamID steamIDClanChat ) + { + return OpenClanChatWindowInSteamDelegatePointer( Self, steamIDClanChat ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool CloseClanChatWindowInSteamDelegate( IntPtr self, CSteamID steamIDClanChat ); + private CloseClanChatWindowInSteamDelegate CloseClanChatWindowInSteamDelegatePointer; + + #endregion + public bool CloseClanChatWindowInSteam( CSteamID steamIDClanChat ) + { + return CloseClanChatWindowInSteamDelegatePointer( Self, steamIDClanChat ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool SetListenForFriendsMessagesDelegate( IntPtr self, [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled ); + private SetListenForFriendsMessagesDelegate SetListenForFriendsMessagesDelegatePointer; + + #endregion + public bool SetListenForFriendsMessages( [MarshalAs( UnmanagedType.U1 )] bool bInterceptEnabled ) + { + return SetListenForFriendsMessagesDelegatePointer( Self, bInterceptEnabled ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool ReplyToFriendMessageDelegate( IntPtr self, CSteamID steamIDFriend, string pchMsgToSend ); + private ReplyToFriendMessageDelegate ReplyToFriendMessageDelegatePointer; + + #endregion + public bool ReplyToFriendMessage( CSteamID steamIDFriend, string pchMsgToSend ) + { + return ReplyToFriendMessageDelegatePointer( Self, steamIDFriend, pchMsgToSend ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetFriendMessageDelegate( IntPtr self, CSteamID steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType ); + private GetFriendMessageDelegate GetFriendMessageDelegatePointer; + + #endregion + public int GetFriendMessage( CSteamID steamIDFriend, int iMessageID, IntPtr pvData, int cubData, ref ChatEntryType peChatEntryType ) + { + return GetFriendMessageDelegatePointer( Self, steamIDFriend, iMessageID, pvData, cubData, ref peChatEntryType ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate SteamAPICall_t GetFollowerCountDelegate( IntPtr self, CSteamID steamID ); + private GetFollowerCountDelegate GetFollowerCountDelegatePointer; + + #endregion + public async Task GetFollowerCount( CSteamID steamID ) + { + return await (new Result( GetFollowerCountDelegatePointer( Self, steamID ) )).GetResult(); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate SteamAPICall_t IsFollowingDelegate( IntPtr self, CSteamID steamID ); + private IsFollowingDelegate IsFollowingDelegatePointer; + + #endregion + public async Task IsFollowing( CSteamID steamID ) + { + return await (new Result( IsFollowingDelegatePointer( Self, steamID ) )).GetResult(); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate SteamAPICall_t EnumerateFollowingListDelegate( IntPtr self, uint unStartIndex ); + private EnumerateFollowingListDelegate EnumerateFollowingListDelegatePointer; + + #endregion + public async Task EnumerateFollowingList( uint unStartIndex ) + { + return await (new Result( EnumerateFollowingListDelegatePointer( Self, unStartIndex ) )).GetResult(); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool IsClanPublicDelegate( IntPtr self, CSteamID steamIDClan ); + private IsClanPublicDelegate IsClanPublicDelegatePointer; + + #endregion + public bool IsClanPublic( CSteamID steamIDClan ) + { + return IsClanPublicDelegatePointer( Self, steamIDClan ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + [return: MarshalAs( UnmanagedType.I1 )] + public delegate bool IsClanOfficialGameGroupDelegate( IntPtr self, CSteamID steamIDClan ); + private IsClanOfficialGameGroupDelegate IsClanOfficialGameGroupDelegatePointer; + + #endregion + public bool IsClanOfficialGameGroup( CSteamID steamIDClan ) + { + return IsClanOfficialGameGroupDelegatePointer( Self, steamIDClan ); + } + + #region FunctionMeta + [UnmanagedFunctionPointer( CallingConvention.ThisCall )] + public delegate int GetNumChatsWithUnreadPriorityMessagesDelegate( IntPtr self ); + private GetNumChatsWithUnreadPriorityMessagesDelegate GetNumChatsWithUnreadPriorityMessagesDelegatePointer; + + #endregion + public int GetNumChatsWithUnreadPriorityMessages() + { + return GetNumChatsWithUnreadPriorityMessagesDelegatePointer( Self ); + } + + } +} diff --git a/Generator/CodeParser/ParseClasses.cs b/Generator/CodeParser/ParseClasses.cs index 7574c52..473e6ba 100644 --- a/Generator/CodeParser/ParseClasses.cs +++ b/Generator/CodeParser/ParseClasses.cs @@ -64,11 +64,17 @@ namespace Generator var f = func.Match( line ); if ( f.Success ) { + + + var returnType = f.Groups[1].Value.Trim(); var funcName = f.Groups[2].Value.Trim(); var args = f.Groups[3].Value.Trim(); // Console.WriteLine( $"Function: {funcName} returns {returnType} with args {args}" ); + + if ( funcName == "DownloadClanActivityCounts" ) lastCallResult = "DownloadClanActivityCountsResult_t"; + if ( funcName.Contains( ' ' ) || funcName.Contains( '*' ) ) throw new System.Exception( "Parsing Error!" ); @@ -92,6 +98,9 @@ namespace Generator str = Regex.Replace( str, @"STEAM_OUT_ARRAY_CALL\((.+?)\)", "" ); str = Regex.Replace( str, @"STEAM_PRIVATE_API\((.+)\)", "$1" ); str = Regex.Replace( str, @"STEAM_ARRAY_COUNT\((.+?)\) ", "" ); + str = Regex.Replace( str, @"STEAM_OUT_STRUCT\((.+?)\) ", "" ); + + return str; } diff --git a/Generator/CodeWriter/CodeWriter.cs b/Generator/CodeWriter/CodeWriter.cs index d806ecd..e3f1456 100644 --- a/Generator/CodeWriter/CodeWriter.cs +++ b/Generator/CodeWriter/CodeWriter.cs @@ -99,6 +99,7 @@ namespace Generator GenerateVTableClass( "ISteamVideo", $"{folder}../Generated/Interfaces/ISteamVideo.cs" ); GenerateVTableClass( "ISteamUser", $"{folder}../Generated/Interfaces/ISteamUser.cs" ); GenerateVTableClass( "ISteamMatchmakingServers", $"{folder}../Generated/Interfaces/ISteamMatchmakingServers.cs" ); + GenerateVTableClass( "ISteamFriends", $"{folder}../Generated/Interfaces/ISteamFriends.cs" ); } } diff --git a/Generator/CodeWriter/Types/BaseType.cs b/Generator/CodeWriter/Types/BaseType.cs index bc98307..e0e3e37 100644 --- a/Generator/CodeWriter/Types/BaseType.cs +++ b/Generator/CodeWriter/Types/BaseType.cs @@ -40,7 +40,7 @@ internal class BaseType return new BaseType { NativeType = type, VarName = varname }; } - public virtual string AsArgument() => IsVector? $"[In,Out] {TypeName}[] {VarName}" : $"{Ref}{TypeName} {VarName}"; + public virtual string AsArgument() => IsVector? $"[In,Out] {TypeName.Trim( '*', ' ' )}[] {VarName}" : $"{Ref}{TypeName.Trim( '*', ' ' )} {VarName}"; public virtual string AsCallArgument() => $"{Ref}{VarName}"; public virtual string Return( string varname ) => $"return {varname};"; @@ -49,7 +49,9 @@ internal class BaseType public virtual string ReturnType => TypeName; public virtual string Ref => !IsVector && NativeType.EndsWith( "*" ) ? "ref " : ""; - public virtual bool IsVector => (NativeType.EndsWith( "*" ) && (VarName.StartsWith( "pvec" ) || VarName.StartsWith( "pub" ))) || NativeType.EndsWith( "**" ); + public virtual bool IsVector => (NativeType.EndsWith( "*" ) && (VarName.StartsWith( "pvec" ) || VarName.StartsWith( "pub" ) || VarName.StartsWith( "pOut" ))) + || NativeType.EndsWith( "**" ) + || VarName == "psteamIDClans"; public virtual bool IsVoid => false; public virtual bool IsReturnedWeird => false;