//
// Copyright (c) slskd Team. All rights reserved.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published
// by the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see https://www.gnu.org/licenses/.
//
namespace slskd
{
using System.Collections.Generic;
using System.Threading.Tasks;
using Soulseek;
///
/// Shared file cache.
///
public interface ISharedFileCache
{
///
/// Gets the cache state.
///
IStateMonitor State { get; }
///
/// Returns the contents of the cache.
///
/// The contents of the cache.
IEnumerable Browse();
///
/// Scans the configured shares and fills the cache.
///
/// The operation context.
Task FillAsync();
///
/// Substitutes the mask in the specified with the original path, if the mask is tracked
/// by the cache.
///
/// The fully qualified filename to unmask.
/// The unmasked filename.
public string Resolve(string filename);
///
/// Searches the cache for the specified and returns the matching files.
///
/// The query for which to search.
/// The matching files.
Task> SearchAsync(SearchQuery query);
}
}