using Microsoft.AspNetCore.Http; using RMuseum.Models.GanjoorAudio; using RMuseum.Models.GanjoorAudio.ViewModels; using RMuseum.Models.UploadSession; using RMuseum.Models.UploadSession.ViewModels; using RSecurityBackend.Models.Generic; using System; using System.Threading.Tasks; namespace RMuseum.Services { /// /// Audio Narration Service /// public interface IRecitationService { /// /// returns list of narrations /// /// /// send Guid.Empty if you want all narrations /// /// /// public Task> SecureGetAll(PagingParameterModel paging, Guid filteredUserId, AudioReviewStatus status, string searchTerm); /// /// returns list of publish narrations /// /// /// /// Task> GetPublishedRecitations(PagingParameterModel paging, string searchTerm); /// /// get published recitation by id /// /// /// Task> GetPublishedRecitationById(int id); /// /// return selected narration information /// /// /// Task> Get(int id); /// /// Delete recitation (recitation should belong to userId) /// /// /// /// Task> Delete(int id, Guid userId); /// /// Gets Verse Sync Range Information /// /// narration id /// Task> GetPoemNarrationVerseSyncArray(int id); /// /// updates metadata for narration /// /// /// /// Task> UpdatePoemNarration(int id, RecitationViewModel metadata); /// /// imports narration data from ganjoor MySql database /// /// User Id which becomes owner of imported data /// Task> OneTimeImport(Guid ownerRAppUserId); /// /// build profiles from exisng narrations data /// /// User Id which becomes owner of imported data /// error string if occurs Task BuildProfilesFromExistingData(Guid ownerRAppUserId); /// /// Initiate New Upload Session for audio /// /// /// /// Task> InitiateNewUploadSession(Guid userId, bool replace); /// /// Save uploaded file /// /// /// Task> SaveUploadedFile(IFormFile uploadedFile); /// /// finalize upload session (add files) /// /// /// /// Task> FinalizeNewUploadSession(UploadSession session, UploadSessionFile[] files); /// /// Moderate pending narration /// /// /// /// /// Task> ModeratePoemNarration(int id, Guid moderatorId, RecitationModerateViewModel model); /// /// Get Upload Session (including files) /// /// /// Task> GetUploadSession(Guid id); /// /// Get User Profiles /// /// /// /// Task> GetUserNarrationProfiles(Guid userId, string artistName); /// /// Get User Default Profile /// /// /// Task> GetUserDefProfile(Guid userId); /// /// Add a narration profile /// /// /// Task> AddUserNarrationProfiles(UserRecitationProfileViewModel profile); /// /// Update a narration profile /// /// /// Task> UpdateUserNarrationProfiles(UserRecitationProfileViewModel profile); /// /// Delete a narration profile /// /// /// /// Task> DeleteUserNarrationProfiles(Guid id, Guid userId); /// /// Transfer Recitations Ownership /// /// /// /// /// Task> TransferRecitationsOwnership(Guid currentOwenerId, Guid newOwnerId, string artistName); /// /// Get uploads descending by upload time /// /// /// if userId is empty all user uploads would be returned /// Task> GetUploads(PagingParameterModel paging, Guid userId); /// /// retry publish unpublished narrations /// Task RetryPublish(); /// /// publishing tracker data /// /// /// /// /// Task> GetPublishingQueueStatus(PagingParameterModel paging, bool unfinished, Guid filteredUserId); /// /// move recitaions of an artist to the first position /// /// /// Task> MakeArtistRecitationsFirst(string artistName); /// /// Synchronization Queue /// /// /// Task> GetSynchronizationQueue(Guid filteredUserId); /// /// Upload Enabled (temporary switch off/on for upload) /// bool UploadEnabled { get; } } }