using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Text; using SteamNative; namespace Facepunch.Steamworks { public class User : IDisposable { internal Client client; internal Dictionary richPresence = new Dictionary(); internal User( Client c ) { client = c; } public void Dispose() { client = null; } /// /// Find a rich presence value by key for current user. Will be null if not found. /// public string GetRichPresence( string key ) { if ( richPresence.TryGetValue( key, out var val ) ) return val; return null; } /// /// Sets a rich presence value by key for current user. /// public bool SetRichPresence( string key, string value ) { richPresence[key] = value; return client.native.friends.SetRichPresence( key, value ); } /// /// Clears all of the current user's rich presence data. /// public void ClearRichPresence() { richPresence.Clear(); client.native.friends.ClearRichPresence(); } } }