using System; using System.Collections.Generic; using System.Linq.Expressions; using System.Threading.Tasks; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.SignalR; using xDataService.Configuration; using xIdentityModels.Models; using xIdentityService.Interfaces; using xModels.Dtos; using xWebinarService.Hubs; using xWebinarService.Interfaces.Entities; using xWebinarService.Models.Dtos; using xWebinarService.Models.Entities; using XFileDto = xFileService.Models.Dtos.XFileDto; namespace xWebinarService.Interfaces { public interface IXWebinarProvider { // #region Props ... IHubContext Hub { get; } IXIdentityProvider IdentityProvider { get; } IXWebinarRepository WebinarRepository { get; } IXWebinarTagProvider WebinarTagProvider { get; } IXWebinarFileProvider WebinarFileProvider { get; } XDataServiceConfiguration DataSercviceConfiguration { get; } IXWebinarTitleResourceProvider TitleResourceProvider { get; } IXWebinarSubscriberRepository WebinarSubscriberRepository { get; } IXWebinarDescriptionResourceProvider DescriptionResourceProvider { get; } #endregion // #region Tools ... /// /// Converts Specified XWebinar Entity to it's Corresponding Dto Presentation /// and also Fill Owner and Title/Description Resources ... /// /// /// Task ToXWebinarDto(XWebinar model); /// /// Converts Specified WebinarSubscriber Entity to it's Dto Presentation ... /// /// /// Task ToXWebinarSubscriberDto(XWebinarSubscriber model); #endregion // #region Actions ... /// /// Create Webinar ... /// /// /// /// /// /// /// Task CreateWebinar( XWebinarDto item, IEnumerable tags = null, IFormFileCollection files = null, XUserClaimsInfoDto userInfo = null, string connectionId = null ); /// /// Update a Webinar ... /// /// /// /// /// Task UpdateWebinar( XWebinarDto item, XUserClaimsInfoDto userInfo = null, string connectionId = null ); /// /// Retrieve Specified Webinar ... /// /// /// Task GetWebinar(Guid id); /// /// Retrieve all Exists Webinars ... /// /// Task> GetWebinars(); /// /// Query Webinars ... /// /// /// Task> QueryWebinars(XQuery query); /// /// Conditional Query Webinars ... /// /// /// /// Task> ConditionalQueryWebinars( Expression> whereClause, XQuery query ); /// /// Query Owned Webinars ... /// /// /// Task> QueryOwnedWebinars( XQuery query, XUserClaimsInfoDto userInfo = null ); /// /// Query Joinable Webinars ... /// /// /// Task> QueryJoinableWebinars( XQuery query, XUserClaimsInfoDto userInfo = null ); /// /// Remove Specified Webinar ... /// /// /// /// /// Task RemoveWebinar( Guid webinarId, XUserClaimsInfoDto userInfo = null, string connectionId = null ); #endregion // #region WebinarSubscriber ... /// /// Subscribe a User to Webinar ... /// /// /// /// /// /// Task Subscribe( Guid webinarId, string subscriberId, string connectionId = null, XUserClaimsInfoDto userInfo = null ); /// /// Check Specified User Subscribed on a Webinar or not ... /// /// /// /// /// Task IsSubscribed( Guid webinarId, string subscriberId, XUserClaimsInfoDto userInfo = null ); /// /// Unsubscribe Specified User from a Specified Webinar ... /// /// /// /// /// /// Task Unsubscribe( Guid webinarId, string subscriberId, string connectionId = null, XUserClaimsInfoDto userInfo = null ); /// /// Retrieve Specified Subscriber ... /// /// /// /// /// Task GetSubscriber( Guid webinarId, string subscriberId, XUserClaimsInfoDto userInfo = null ); /// /// Get all Specified Webinars Subscribers ... /// /// /// /// Task> GetSubscribers( Guid webinarId, XUserClaimsInfoDto userInfo = null ); /// /// Query Specified Webinar's Subscribers ... /// /// /// /// /// Task> QuerySubscribers( Guid webinarId, XQuery query, XUserClaimsInfoDto userInfo = null ); #endregion // #region File Actions ... /// /// Upload Files ... /// /// /// /// /// /// Task> UploadFiles( Guid id, IFormFileCollection files, XUserClaimsInfoDto userInfo = null, string connectionId = null ); /// /// Remove Specified Files ... /// /// /// /// /// /// Task> RemoveFiles( Guid id, string ids = null, XUserClaimsInfoDto userInfo = null, string connectionId = null ); /// /// Get Webinar Files ... /// /// /// /// Task> GetFiles( Guid id, XUserClaimsInfoDto userInfo = null ); /// /// Stream Specified File ... /// /// /// Task StreamFile( Guid id, Guid fileId ); /// /// Stream Specified File ... /// /// /// Task DownloadFile( Guid id, Guid fileId ); #endregion // #region Tags Actions ... /// /// Attach Tag to Specified File ... /// /// /// /// /// /// /// Task AttachTag( string tag, Guid id, XUserClaimsInfoDto userInfo = null, string connectionId = null, bool forceAttachToFiles = true ); /// /// Detach Tag fro Specified File ... /// /// /// /// /// /// /// Task DetachTag( string tag, Guid id, XUserClaimsInfoDto userInfo = null, string connectionId = null, bool forceDetachFromFiles = true ); /// /// Attach Tags for Specified File ... /// /// /// /// /// /// /// Task AttachTags( IEnumerable tags, Guid id, XUserClaimsInfoDto userInfo = null, string connectionId = null, bool forceAttachToFiles = true ); /// /// Detach Tags for Specified File ... /// /// /// /// /// /// /// Task DetachTags( IEnumerable tags, Guid id, XUserClaimsInfoDto userInfo = null, string connectionId = null, bool forceDetachFromFiles = true ); /// /// Detach all Attached Tags for Specified File ... /// /// /// /// /// Task DetachTags( Guid id, XUserClaimsInfoDto userInfo = null, string connectionId = null, bool forceDetachFromFiles = true ); /// /// Retrieve Specified Webinar's Tags ... /// /// /// /// Task> GetTags( Guid id, XUserClaimsInfoDto userInfo = null ); #endregion } }