using System; using System.Collections.Generic; namespace Facepunch.Steamworks.Data { /// /// Represents a RemotePlaySession from the SteamRemotePlay interface /// public struct RemotePlaySession { public uint Id { get; set; } public override string ToString() => Id.ToString(); public static implicit operator RemotePlaySession( uint value ) => new RemotePlaySession() { Id = value }; public static implicit operator uint( RemotePlaySession value ) => value.Id; /// /// Returns true if this session was valid when created. This will stay true even /// after disconnection - so be sure to watch SteamRemotePlay.OnSessionDisconnected /// public bool IsValid => Id > 0; /// /// Get the SteamID of the connected user /// public SteamId SteamId => SteamRemotePlay.Internal.GetSessionSteamID( Id ); /// /// Get the name of the session client device /// public string ClientName => SteamRemotePlay.Internal.GetSessionClientName( Id ); /// /// Get the name of the session client device /// public SteamDeviceFormFactor FormFactor => SteamRemotePlay.Internal.GetSessionClientFormFactor( Id ); } }