2015-02-28 06:42:47 -07:00
|
|
|
|
using MediaBrowser.Model.Sync;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Sync
|
|
|
|
|
{
|
|
|
|
|
public interface ISyncDataProvider
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the server item ids.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="target">The target.</param>
|
|
|
|
|
/// <param name="serverId">The server identifier.</param>
|
|
|
|
|
/// <returns>Task<List<System.String>>.</returns>
|
|
|
|
|
Task<List<string>> GetServerItemIds(SyncTarget target, string serverId);
|
|
|
|
|
|
2015-03-31 11:50:08 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the synchronize job item ids.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="target">The target.</param>
|
|
|
|
|
/// <param name="serverId">The server identifier.</param>
|
|
|
|
|
/// <returns>Task<List<System.String>>.</returns>
|
|
|
|
|
Task<List<string>> GetSyncJobItemIds(SyncTarget target, string serverId);
|
2015-04-03 18:24:49 -07:00
|
|
|
|
|
2015-02-28 06:42:47 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Adds the or update.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="target">The target.</param>
|
|
|
|
|
/// <param name="item">The item.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task AddOrUpdate(SyncTarget target, LocalItem item);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes the specified identifier.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="target">The target.</param>
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
/// <returns>Task.</returns>
|
|
|
|
|
Task Delete(SyncTarget target, string id);
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the specified identifier.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="target">The target.</param>
|
|
|
|
|
/// <param name="id">The identifier.</param>
|
|
|
|
|
/// <returns>Task<LocalItem>.</returns>
|
|
|
|
|
Task<LocalItem> Get(SyncTarget target, string id);
|
2015-03-07 22:37:48 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the cached item.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="target">The target.</param>
|
2015-03-10 11:10:38 -07:00
|
|
|
|
/// <param name="serverId">The server identifier.</param>
|
|
|
|
|
/// <param name="itemId">The item identifier.</param>
|
2015-03-07 22:37:48 -07:00
|
|
|
|
/// <returns>Task<LocalItem>.</returns>
|
2015-04-03 18:24:49 -07:00
|
|
|
|
Task<List<LocalItem>> GetItems(SyncTarget target, string serverId, string itemId);
|
2015-03-31 11:50:08 -07:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the cached items by synchronize job item identifier.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="target">The target.</param>
|
|
|
|
|
/// <param name="serverId">The server identifier.</param>
|
|
|
|
|
/// <param name="syncJobItemId">The synchronize job item identifier.</param>
|
|
|
|
|
/// <returns>Task<List<LocalItem>>.</returns>
|
2015-04-03 18:24:49 -07:00
|
|
|
|
Task<List<LocalItem>> GetItemsBySyncJobItemId(SyncTarget target, string serverId, string syncJobItemId);
|
2015-02-28 06:42:47 -07:00
|
|
|
|
}
|
|
|
|
|
}
|