// This file is automatically generated.
using System;
using System.Text;
using System.Runtime.InteropServices;

namespace Steam4NET
{

	[StructLayout(LayoutKind.Sequential,Pack=4)]
	public class ISteamOAuth001VTable
	{
		public IntPtr RequestOAuthTokenForApp0;
		public IntPtr GetOAuthTokenForApp1;
		public IntPtr InvalidateOAuthTokenForApp2;
		private IntPtr DTorISteamOAuth0013;
	};
	
	[InteropHelp.InterfaceVersion("SteamOAuth001")]
	public class ISteamOAuth001 : InteropHelp.NativeWrapper<ISteamOAuth001VTable>
	{
		[UnmanagedFunctionPointer(CallingConvention.ThisCall)] private delegate UInt64 NativeRequestOAuthTokenForAppS( IntPtr thisptr, string cszOAuthScope );
		public UInt64 RequestOAuthTokenForApp( string cszOAuthScope ) 
		{
			return this.GetFunction<NativeRequestOAuthTokenForAppS>( this.Functions.RequestOAuthTokenForApp0 )( this.ObjectAddress, cszOAuthScope ); 
		}
		
		[return: MarshalAs(UnmanagedType.I1)]
		[UnmanagedFunctionPointer(CallingConvention.ThisCall)] private delegate bool NativeGetOAuthTokenForAppBIU( IntPtr thisptr, Byte[] pubBuffer, Int32 cubBuffer, ref UInt32 puTokenSize );
		public bool GetOAuthTokenForApp( Byte[] pubBuffer, ref UInt32 puTokenSize ) 
		{
			return this.GetFunction<NativeGetOAuthTokenForAppBIU>( this.Functions.GetOAuthTokenForApp1 )( this.ObjectAddress, pubBuffer, (Int32) pubBuffer.Length, ref puTokenSize ); 
		}
		
		[UnmanagedFunctionPointer(CallingConvention.ThisCall)] private delegate void NativeInvalidateOAuthTokenForApp( IntPtr thisptr );
		public void InvalidateOAuthTokenForApp(  ) 
		{
			this.GetFunction<NativeInvalidateOAuthTokenForApp>( this.Functions.InvalidateOAuthTokenForApp2 )( this.ObjectAddress ); 
		}
		
	};
}
