OF-DL/OF DL.Core/Services/IDownloadService.cs

83 lines
4.6 KiB
C#

using OF_DL.Models.Downloads;
using ArchivedEntities = OF_DL.Models.Entities.Archived;
using MessageEntities = OF_DL.Models.Entities.Messages;
using PostEntities = OF_DL.Models.Entities.Posts;
using PurchasedEntities = OF_DL.Models.Entities.Purchased;
using StreamEntities = OF_DL.Models.Entities.Streams;
namespace OF_DL.Services;
public interface IDownloadService
{
Task<long> CalculateTotalFileSize(List<string> urls);
Task<bool> ProcessMediaDownload(string folder, long mediaId, string apiType, string url, string path,
string serverFileName, string resolvedFileName, string extension, IProgressReporter progressReporter);
Task<bool> DownloadMedia(string url, string folder, long mediaId, string apiType,
IProgressReporter progressReporter, string path,
string? filenameFormat, object? postInfo, object? postMedia,
object? author, Dictionary<string, long> users);
Task<bool> DownloadDrmVideo(string policy, string signature, string kvp, string url,
string decryptionKey, string folder, DateTime lastModified, long mediaId, string apiType,
IProgressReporter progressReporter, string path,
string? filenameFormat, object? postInfo, object? postMedia,
object? author, Dictionary<string, long> users);
Task<(string decryptionKey, DateTime lastModified)?> GetDecryptionInfo(
string mpdUrl, string policy, string signature, string kvp,
string mediaId, string contentId, string drmType,
bool clientIdBlobMissing, bool devicePrivateKeyMissing);
Task DownloadAvatarHeader(string? avatarUrl, string? headerUrl, string folder, string username);
Task<DownloadResult> DownloadHighlights(string username, long userId, string path, HashSet<long> paidPostIds,
IProgressReporter progressReporter);
Task<DownloadResult> DownloadStories(string username, long userId, string path, HashSet<long> paidPostIds,
IProgressReporter progressReporter);
Task<DownloadResult> DownloadArchived(string username, long userId, string path, Dictionary<string, long> users,
bool clientIdBlobMissing, bool devicePrivateKeyMissing, ArchivedEntities.ArchivedCollection archived,
IProgressReporter progressReporter);
Task<DownloadResult> DownloadMessages(string username, long userId, string path, Dictionary<string, long> users,
bool clientIdBlobMissing, bool devicePrivateKeyMissing, MessageEntities.MessageCollection messages,
IProgressReporter progressReporter);
Task<DownloadResult> DownloadPaidMessages(string username, string path, Dictionary<string, long> users,
bool clientIdBlobMissing, bool devicePrivateKeyMissing,
PurchasedEntities.PaidMessageCollection paidMessageCollection,
IProgressReporter progressReporter);
Task<DownloadResult> DownloadStreams(string username, long userId, string path, Dictionary<string, long> users,
bool clientIdBlobMissing, bool devicePrivateKeyMissing, StreamEntities.StreamsCollection streams,
IProgressReporter progressReporter);
Task<DownloadResult> DownloadFreePosts(string username, long userId, string path, Dictionary<string, long> users,
bool clientIdBlobMissing, bool devicePrivateKeyMissing, PostEntities.PostCollection posts,
IProgressReporter progressReporter);
Task<DownloadResult> DownloadPaidPosts(string username, long userId, string path, Dictionary<string, long> users,
bool clientIdBlobMissing, bool devicePrivateKeyMissing, PurchasedEntities.PaidPostCollection purchasedPosts,
IProgressReporter progressReporter);
Task<DownloadResult> DownloadPaidPostsPurchasedTab(string username, string path,
Dictionary<string, long> users, bool clientIdBlobMissing, bool devicePrivateKeyMissing,
PurchasedEntities.PaidPostCollection purchasedPosts, IProgressReporter progressReporter);
Task<DownloadResult> DownloadPaidMessagesPurchasedTab(string username, string path,
Dictionary<string, long> users, bool clientIdBlobMissing, bool devicePrivateKeyMissing,
PurchasedEntities.PaidMessageCollection paidMessageCollection, IProgressReporter progressReporter);
Task<DownloadResult> DownloadSinglePost(string username, string path,
Dictionary<string, long> users, bool clientIdBlobMissing, bool devicePrivateKeyMissing,
PostEntities.SinglePostCollection post, IProgressReporter progressReporter);
Task<DownloadResult> DownloadSinglePaidMessage(string username, string path,
Dictionary<string, long> users, bool clientIdBlobMissing, bool devicePrivateKeyMissing,
PurchasedEntities.SinglePaidMessageCollection singlePaidMessageCollection,
IProgressReporter progressReporter);
}