mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 14:53:21 +08:00
Add xmldoc to spectator interfaces
This commit is contained in:
parent
b39a4da6bc
commit
db4dd3182b
@ -1,14 +1,31 @@
|
||||
using System.Threading.Tasks;
|
||||
using osu.Game.Online.Spectator;
|
||||
|
||||
namespace osu.Server.Spectator.Hubs
|
||||
namespace osu.Game.Online.Spectator
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface defining a spectator client instance.
|
||||
/// </summary>
|
||||
public interface ISpectatorClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Signals that a user has begun a new play session.
|
||||
/// </summary>
|
||||
/// <param name="userId">The user.</param>
|
||||
/// <param name="beatmapId">The beatmap the user is playing.</param>
|
||||
Task UserBeganPlaying(string userId, int beatmapId);
|
||||
|
||||
/// <summary>
|
||||
/// Signals that a user has finished a play session.
|
||||
/// </summary>
|
||||
/// <param name="userId">The user.</param>
|
||||
/// <param name="beatmapId">The beatmap the user has finished playing.</param>
|
||||
Task UserFinishedPlaying(string userId, int beatmapId);
|
||||
|
||||
/// <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(string userId, FrameDataBundle data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,13 +2,41 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace osu.Game.Online.Spectator
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface defining the spectator server instance.
|
||||
/// </summary>
|
||||
public interface ISpectatorServer
|
||||
{
|
||||
/// <summary>
|
||||
/// Signal the start of a new play session.
|
||||
/// </summary>
|
||||
/// <param name="beatmapId">The beatmap currently being played. Eventually this should be replaced with more complete metadata.</param>
|
||||
Task BeginPlaySession(int beatmapId);
|
||||
|
||||
/// <summary>
|
||||
/// Send a bundle of frame data for the current play session.
|
||||
/// </summary>
|
||||
/// <param name="data">The frame data.</param>
|
||||
Task SendFrameData(FrameDataBundle data);
|
||||
|
||||
/// <summary>
|
||||
/// Signal the end of a play session.
|
||||
/// </summary>
|
||||
/// <param name="beatmapId">The beatmap that was completed. This should be replaced with a play token once that flow is established.</param>
|
||||
Task EndPlaySession(int beatmapId);
|
||||
|
||||
/// <summary>
|
||||
/// Request spectating data for the specified user. May be called on multiple users and offline users.
|
||||
/// For offline users, a subscription will be created and data will begin streaming on next play.
|
||||
/// </summary>
|
||||
/// <param name="userId">The user to subscribe to.</param>
|
||||
/// <returns></returns>
|
||||
Task StartWatchingUser(string userId);
|
||||
|
||||
/// <summary>
|
||||
/// Stop requesting spectating data for the specified user. Unsubscribes from receiving further data.
|
||||
/// </summary>
|
||||
/// <param name="userId">The user to unsubscribe from.</param>
|
||||
Task EndWatchingUser(string userId);
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.SignalR.Client;
|
||||
using osu.Server.Spectator.Hubs;
|
||||
|
||||
namespace osu.Game.Online.Spectator
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user