forked from sim0n00ps/OF-DL
83 lines
4.6 KiB
C#
83 lines
4.6 KiB
C#
using OF_DL.Models;
|
|
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 media_id, string api_type, string url, string path,
|
|
string serverFileName, string resolvedFileName, string extension, IProgressReporter progressReporter);
|
|
|
|
Task<bool> DownloadMedia(string url, string folder, long media_id, string api_type,
|
|
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 media_id, string api_type,
|
|
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);
|
|
}
|