2020-10-22 10:41:10 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
#nullable disable
|
|
|
|
|
2020-10-21 10:05:20 +00:00
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
2020-10-22 04:12:58 +00:00
|
|
|
namespace osu.Game.Online.Spectator
|
2020-10-21 10:05:20 +00:00
|
|
|
{
|
2020-10-22 04:12:58 +00:00
|
|
|
/// <summary>
|
|
|
|
/// An interface defining a spectator client instance.
|
|
|
|
/// </summary>
|
2020-10-21 10:05:20 +00:00
|
|
|
public interface ISpectatorClient
|
|
|
|
{
|
2020-10-22 04:12:58 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Signals that a user has begun a new play session.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="userId">The user.</param>
|
2020-10-22 08:29:38 +00:00
|
|
|
/// <param name="state">The state of gameplay.</param>
|
2020-10-22 09:37:19 +00:00
|
|
|
Task UserBeganPlaying(int userId, SpectatorState state);
|
2020-10-21 10:05:20 +00:00
|
|
|
|
2020-10-22 04:12:58 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Signals that a user has finished a play session.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="userId">The user.</param>
|
2020-10-22 08:29:38 +00:00
|
|
|
/// <param name="state">The state of gameplay.</param>
|
2020-10-22 09:37:19 +00:00
|
|
|
Task UserFinishedPlaying(int userId, SpectatorState state);
|
2020-10-21 10:05:20 +00:00
|
|
|
|
2020-10-22 04:12:58 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Called when new frames are available for a subscribed user's play session.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="userId">The user.</param>
|
|
|
|
/// <param name="data">The frame data.</param>
|
2020-10-22 09:37:19 +00:00
|
|
|
Task UserSentFrames(int userId, FrameDataBundle data);
|
2020-10-21 10:05:20 +00:00
|
|
|
}
|
2020-10-22 04:12:58 +00:00
|
|
|
}
|