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 { /// /// Calculates the total size of a set of URLs by fetching their metadata. /// Task CalculateTotalFileSize(List urls); /// /// Downloads media and updates metadata storage. /// Task ProcessMediaDownload(string folder, long mediaId, string apiType, string url, string path, string serverFileName, string resolvedFileName, string extension, IProgressReporter progressReporter); /// /// Downloads a single media item. /// Task DownloadMedia(string url, string folder, long mediaId, string apiType, IProgressReporter progressReporter, string path, string? filenameFormat, object? postInfo, object? postMedia, object? author, Dictionary users); /// /// Downloads a DRM-protected video. /// Task 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 users); /// /// Retrieves decryption information for a DRM media item. /// Task<(string decryptionKey, DateTime lastModified)?> GetDecryptionInfo( string mpdUrl, string policy, string signature, string kvp, string mediaId, string contentId, string drmType, bool clientIdBlobMissing, bool devicePrivateKeyMissing); /// /// Downloads profile avatar and header images for a creator. /// Task DownloadAvatarHeader(string? avatarUrl, string? headerUrl, string folder, string username); /// /// Downloads highlight media for a creator. /// Task DownloadHighlights(string username, long userId, string path, HashSet paidPostIds, IProgressReporter progressReporter); /// /// Downloads story media for a creator. /// Task DownloadStories(string username, long userId, string path, HashSet paidPostIds, IProgressReporter progressReporter); /// /// Downloads archived posts for a creator. /// Task DownloadArchived(string username, long userId, string path, Dictionary users, bool clientIdBlobMissing, bool devicePrivateKeyMissing, ArchivedEntities.ArchivedCollection archived, IProgressReporter progressReporter); /// /// Downloads free messages for a creator. /// Task DownloadMessages(string username, long userId, string path, Dictionary users, bool clientIdBlobMissing, bool devicePrivateKeyMissing, MessageEntities.MessageCollection messages, IProgressReporter progressReporter); /// /// Downloads paid messages for a creator. /// Task DownloadPaidMessages(string username, string path, Dictionary users, bool clientIdBlobMissing, bool devicePrivateKeyMissing, PurchasedEntities.PaidMessageCollection paidMessageCollection, IProgressReporter progressReporter); /// /// Downloads stream posts for a creator. /// Task DownloadStreams(string username, long userId, string path, Dictionary users, bool clientIdBlobMissing, bool devicePrivateKeyMissing, StreamEntities.StreamsCollection streams, IProgressReporter progressReporter); /// /// Downloads free posts for a creator. /// Task DownloadFreePosts(string username, long userId, string path, Dictionary users, bool clientIdBlobMissing, bool devicePrivateKeyMissing, PostEntities.PostCollection posts, IProgressReporter progressReporter); /// /// Downloads paid posts for a creator. /// Task DownloadPaidPosts(string username, long userId, string path, Dictionary users, bool clientIdBlobMissing, bool devicePrivateKeyMissing, PurchasedEntities.PaidPostCollection purchasedPosts, IProgressReporter progressReporter); /// /// Downloads paid posts sourced from the Purchased tab. /// Task DownloadPaidPostsPurchasedTab(string username, string path, Dictionary users, bool clientIdBlobMissing, bool devicePrivateKeyMissing, PurchasedEntities.PaidPostCollection purchasedPosts, IProgressReporter progressReporter); /// /// Downloads paid messages sourced from the Purchased tab. /// Task DownloadPaidMessagesPurchasedTab(string username, string path, Dictionary users, bool clientIdBlobMissing, bool devicePrivateKeyMissing, PurchasedEntities.PaidMessageCollection paidMessageCollection, IProgressReporter progressReporter); /// /// Downloads a single post collection. /// Task DownloadSinglePost(string username, string path, Dictionary users, bool clientIdBlobMissing, bool devicePrivateKeyMissing, PostEntities.SinglePostCollection post, IProgressReporter progressReporter); /// /// Downloads a single paid message collection. /// Task DownloadSinglePaidMessage(string username, string path, Dictionary users, bool clientIdBlobMissing, bool devicePrivateKeyMissing, PurchasedEntities.SinglePaidMessageCollection singlePaidMessageCollection, IProgressReporter progressReporter); }