2023-05-07 11:10:59 +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.
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace osu.Game.Beatmaps
|
|
|
|
{
|
|
|
|
/// <summary>
|
2023-05-07 17:18:59 +00:00
|
|
|
/// Unifying interface for sources of <see cref="OnlineBeatmapMetadata"/>.
|
2023-05-07 11:10:59 +00:00
|
|
|
/// </summary>
|
|
|
|
public interface IOnlineBeatmapMetadataSource : IDisposable
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// Whether this source can currently service lookups.
|
|
|
|
/// </summary>
|
|
|
|
bool Available { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Looks up the online metadata for the supplied <paramref name="beatmapInfo"/>.
|
|
|
|
/// </summary>
|
2023-05-07 15:49:31 +00:00
|
|
|
/// <param name="beatmapInfo">The <see cref="BeatmapInfo"/> to look up.</param>
|
|
|
|
/// <param name="onlineMetadata">
|
|
|
|
/// An <see cref="OnlineBeatmapMetadata"/> instance if the lookup is successful.
|
|
|
|
/// <see langword="null"/> if a mismatch between the local instance and the looked-up data was detected.
|
|
|
|
/// The returned value is only valid if the return value of the method is <see langword="true"/>.
|
|
|
|
/// </param>
|
2023-05-07 11:10:59 +00:00
|
|
|
/// <returns>
|
2023-05-07 15:49:31 +00:00
|
|
|
/// Whether the lookup was performed.
|
2023-05-07 11:10:59 +00:00
|
|
|
/// </returns>
|
2023-05-07 15:49:31 +00:00
|
|
|
bool TryLookup(BeatmapInfo beatmapInfo, out OnlineBeatmapMetadata? onlineMetadata);
|
2023-05-07 11:10:59 +00:00
|
|
|
}
|
|
|
|
}
|