osu/osu.Game/Beatmaps/IOnlineBeatmapMetadataSourc...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
1.3 KiB
C#
Raw Normal View History

// 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"/>.
/// </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>
/// <returns>
2023-05-07 15:49:31 +00:00
/// Whether the lookup was performed.
/// </returns>
2023-05-07 15:49:31 +00:00
bool TryLookup(BeatmapInfo beatmapInfo, out OnlineBeatmapMetadata? onlineMetadata);
}
}