﻿using System;
using System.Threading;
using System.Threading.Tasks;
using Windows.Storage;
using Windows.Storage.Streams;

namespace TheChan.Services.Cache {
    public interface ICacheService {
        Task<IRandomAccessStream> RetrieveStreamAsync(string url, CacheItemType type = CacheItemType.Other, Action<int> onProgress = null);
        Task<StorageFile> RetrieveFileAsync(string url, CacheItemType type = CacheItemType.Other, Action<int> onProgress = null);
        Task DeleteItemAsync(string uri, CacheItemType type = CacheItemType.Other);
        Task<ulong> GetCachedItemsSizeInBytes(CacheItemType type);
        Task ClearCache(CacheItemType type);
    }
}
