2022-07-04 16:18:33 +08: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.
using System.Threading.Tasks ;
2023-12-07 01:24:31 +08:00
using osu.Game.Users ;
2022-07-04 16:18:33 +08:00
namespace osu.Game.Online.Metadata
{
/// <summary>
2024-05-17 16:32:39 +08:00
/// Metadata server is responsible for keeping the osu! client up-to-date with various real-time happenings, such as:
/// <list type="bullet">
/// <item>beatmap updates via BSS,</item>
/// <item>online user activity/status updates,</item>
/// <item>other real-time happenings, such as current "daily challenge" status.</item>
/// </list>
2022-07-04 16:18:33 +08:00
/// </summary>
public interface IMetadataServer
{
/// <summary>
/// Get any changes since a specific point in the queue.
/// Should be used to allow the client to catch up with any changes after being closed or disconnected.
/// </summary>
/// <param name="queueId">The last processed queue ID.</param>
/// <returns></returns>
2022-07-05 20:42:35 +08:00
Task < BeatmapUpdates > GetChangesSince ( int queueId ) ;
2023-12-07 01:24:31 +08:00
/// <summary>
/// Signals to the server that the current user's <see cref="UserActivity"/> has changed.
/// </summary>
Task UpdateActivity ( UserActivity ? activity ) ;
/// <summary>
/// Signals to the server that the current user's <see cref="UserStatus"/> has changed.
/// </summary>
Task UpdateStatus ( UserStatus ? status ) ;
/// <summary>
/// Signals to the server that the current user would like to begin receiving updates on other users' online presence.
/// </summary>
Task BeginWatchingUserPresence ( ) ;
/// <summary>
/// Signals to the server that the current user would like to stop receiving updates on other users' online presence.
/// </summary>
Task EndWatchingUserPresence ( ) ;
2024-06-27 16:44:28 +08:00
/// <summary>
/// Signals to the server that the current user would like to begin receiving updates about the state of the multiplayer room with the given <paramref name="id"/>.
/// </summary>
Task < MultiplayerPlaylistItemStats [ ] > BeginWatchingMultiplayerRoom ( long id ) ;
/// <summary>
/// Signals to the server that the current user would like to stop receiving updates about the state of the multiplayer room with the given <paramref name="id"/>.
/// </summary>
Task EndWatchingMultiplayerRoom ( long id ) ;
2022-07-04 16:18:33 +08:00
}
}