1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-18 03:05:10 +08:00
osu-lazer/osu.Game/Online/Spectator/ISpectatorClient.cs

42 lines
1.6 KiB
C#
Raw Normal View History

2023-06-23 00:37:25 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
2020-10-22 18:41:10 +08:00
// See the LICENCE file in the repository root for full licence text.
using System.Threading.Tasks;
2020-10-22 12:12:58 +08:00
namespace osu.Game.Online.Spectator
{
2020-10-22 12:12:58 +08:00
/// <summary>
/// An interface defining a spectator client instance.
/// </summary>
public interface ISpectatorClient : IStatefulUserHubClient
{
2020-10-22 12:12:58 +08:00
/// <summary>
/// Signals that a user has begun a new play session.
/// </summary>
/// <param name="userId">The user.</param>
2020-10-22 16:29:38 +08:00
/// <param name="state">The state of gameplay.</param>
Task UserBeganPlaying(int userId, SpectatorState state);
2020-10-22 12:12:58 +08:00
/// <summary>
/// Signals that a user has finished a play session.
/// </summary>
/// <param name="userId">The user.</param>
2020-10-22 16:29:38 +08:00
/// <param name="state">The state of gameplay.</param>
Task UserFinishedPlaying(int userId, SpectatorState state);
2020-10-22 12:12:58 +08: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>
Task UserSentFrames(int userId, FrameDataBundle data);
/// <summary>
/// Signals that a user's submitted score was fully processed.
/// </summary>
/// <param name="userId">The ID of the user who achieved the score.</param>
/// <param name="scoreId">The ID of the score.</param>
Task UserScoreProcessed(int userId, long scoreId);
}
2020-10-22 12:12:58 +08:00
}