include "steam/isteamuser.h"

native class ISteamUser
{
	bool BLoggedOn();
	
	inline ulong GetSteamID()
	{
		return self->GetSteamID().ConvertToUint64();
	}

	int GetVoice( bool bWantCompressed, void* pDestBuffer, uint cbDestBufferSize, out uint nBytesWritten );
	int GetAvailableVoice( out uint availableData );
	uint GetVoiceOptimalSampleRate();
	int DecompressVoice( void* pCompressed, uint cbCompressed, void* pDestBuffer, uint cbDestBufferSize, out uint nBytesWritten, uint nDesiredSampleRate );

	void StartVoiceRecording();
	void StopVoiceRecording();
	
	inline HAuthTicket GetAuthSessionTicket( ulong targetSteamId, void* buffer, out uint ticketLength )
	{
	    SteamNetworkingIdentity ident;
	    ident.SetSteamID64( targetSteamId );
	    return self->GetAuthSessionTicket( buffer, 1024, ticketLength, &ident );
	}
	
	inline EBeginAuthSessionResult BeginAuthSession( ulong senderSteamId, void* buffer, int length )
	{
	    CSteamID ident = CSteamID( senderSteamId );
	    return self->BeginAuthSession( buffer, length, ident );
	}
	
	void CancelAuthTicket( HAuthTicket ticket );
	void EndAuthSession( ulong steamId );
}