Cleaning up the solution. Separating Shared.WinRT, Services and Synchronization. Removing synchronization from app. Reducing bundle size by 45mb.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface that should force synchronizer to do synchronization for only given folder ids
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountCreationDialog
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountMenuItem : IMenuItem
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountPickerDialog
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountProviderDetailViewModel
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountProviderDetails
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAccountService
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Singleton object that holds the application data folder path and the publisher shared folder path.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IApplicationResourceManager<T>
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAuthenticationProvider
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Entities;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IAuthenticator
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Models.AutoDiscovery;
|
||||
using Wino.Domain.Models.AutoDiscovery;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Searches for Auto Discovery settings for custom mail accounts.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MailKit;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Core.Domain.Models.Synchronization;
|
||||
using Wino.Domain.Entities;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
using Wino.Domain.Models.Synchronization;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IBaseSynchronizer
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IClipboardService
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IConfigurationService
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IConfirmationDialog
|
||||
{
|
||||
|
||||
12
Wino.Core.Domain/Interfaces/IContactService.cs
Normal file
12
Wino.Core.Domain/Interfaces/IContactService.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using MimeKit;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IContactService
|
||||
{
|
||||
Task<List<AddressInformation>> GetAddressInformationAsync(string queryText);
|
||||
Task<AddressInformation> GetAddressInformationByAddressAsync(string address);
|
||||
Task SaveAddressInformationAsync(MimeMessage message);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Core.Domain.Models.Menus;
|
||||
using Wino.Domain.Models.Folders;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
using Wino.Domain.Models.Menus;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IContextMenuItemService
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Core.Domain.Models.Menus;
|
||||
using Wino.Domain.Models.Folders;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
using Wino.Domain.Models.Menus;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IContextMenuProvider
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface ICustomServerAccountCreationDialog : IAccountCreationDialog
|
||||
{
|
||||
|
||||
9
Wino.Core.Domain/Interfaces/IDatabaseService.cs
Normal file
9
Wino.Core.Domain/Interfaces/IDatabaseService.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using SQLite;
|
||||
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IDatabaseService : IInitializeAsync
|
||||
{
|
||||
SQLiteAsyncConnection Connection { get; }
|
||||
}
|
||||
}
|
||||
44
Wino.Core.Domain/Interfaces/IDefaultChangeProcessor.cs
Normal file
44
Wino.Core.Domain/Interfaces/IDefaultChangeProcessor.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using MimeKit;
|
||||
using Wino.Domain.Entities;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
using Wino.Domain.Models.Synchronization;
|
||||
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Database change processor that handles common operations for all synchronizers.
|
||||
/// When a synchronizer detects a change, it should call the appropriate method in this class to reflect the change in the database.
|
||||
/// Different synchronizers might need additional implementations.
|
||||
/// <see cref="IGmailChangeProcessor"/>, <see cref="IOutlookChangeProcessor"/> and <see cref="IImapChangeProcessor"/>
|
||||
/// None of the synchronizers can directly change anything in the database.
|
||||
/// </summary>
|
||||
public interface IDefaultChangeProcessor
|
||||
{
|
||||
Task<string> UpdateAccountDeltaSynchronizationIdentifierAsync(Guid accountId, string deltaSynchronizationIdentifier);
|
||||
Task CreateAssignmentAsync(Guid accountId, string mailCopyId, string remoteFolderId);
|
||||
Task DeleteAssignmentAsync(Guid accountId, string mailCopyId, string remoteFolderId);
|
||||
Task ChangeMailReadStatusAsync(string mailCopyId, bool isRead);
|
||||
Task ChangeFlagStatusAsync(string mailCopyId, bool isFlagged);
|
||||
Task<bool> CreateMailAsync(Guid AccountId, NewMailItemPackage package);
|
||||
Task DeleteMailAsync(Guid accountId, string mailId);
|
||||
Task<List<MailCopy>> GetDownloadedUnreadMailsAsync(Guid accountId, IEnumerable<string> downloadedMailCopyIds);
|
||||
Task SaveMimeFileAsync(Guid fileId, MimeMessage mimeMessage, Guid accountId);
|
||||
Task DeleteFolderAsync(Guid accountId, string remoteFolderId);
|
||||
Task InsertFolderAsync(MailItemFolder folder);
|
||||
Task UpdateFolderAsync(MailItemFolder folder);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the list of folders that are available for account.
|
||||
/// </summary>
|
||||
/// <param name="accountId">Account id to get folders for.</param>
|
||||
/// <returns>All folders.</returns>
|
||||
Task<List<MailItemFolder>> GetLocalFoldersAsync(Guid accountId);
|
||||
|
||||
Task<List<MailItemFolder>> GetSynchronizationFoldersAsync(SynchronizationOptions options);
|
||||
|
||||
Task<bool> MapLocalDraftAsync(Guid accountId, Guid localDraftCopyUniqueId, string newMailCopyId, string newDraftId, string newThreadId);
|
||||
Task UpdateFolderLastSyncDateAsync(Guid folderId);
|
||||
|
||||
Task<List<MailItemFolder>> GetExistingFoldersAsync(Guid accountId);
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Accounts;
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
using Wino.Domain.Entities;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.Accounts;
|
||||
using Wino.Domain.Models.Folders;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IDialogService
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IDispatcher
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IFileService
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
using Wino.Domain.Entities;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.Folders;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IFolderMenuItem : IBaseFolderMenuItem
|
||||
{
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Accounts;
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Core.Domain.Models.Synchronization;
|
||||
using Wino.Domain.Entities;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.Accounts;
|
||||
using Wino.Domain.Models.Folders;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
using Wino.Domain.Models.Synchronization;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IFolderService
|
||||
{
|
||||
@@ -82,7 +79,7 @@ namespace Wino.Core.Domain.Interfaces
|
||||
/// Returns the active folder menu items for the given account for UI.
|
||||
/// </summary>
|
||||
/// <param name="accountMenuItem">Account to get folder menu items for.</param>
|
||||
Task<IEnumerable<IMenuItem>> GetAccountFoldersForDisplayAsync(IAccountMenuItem accountMenuItem);
|
||||
// Task<IEnumerable<IMenuItem>> GetAccountFoldersForDisplayAsync(IAccountMenuItem accountMenuItem);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of unread item counts for the given account ids.
|
||||
@@ -90,5 +87,13 @@ namespace Wino.Core.Domain.Interfaces
|
||||
/// </summary>
|
||||
/// <param name="accountIds">Account ids to get unread folder counts for.</param>
|
||||
Task<List<UnreadItemCountResult>> GetUnreadItemCountResultsAsync(IEnumerable<Guid> accountIds);
|
||||
Task<List<MailItemFolder>> GetVisibleFoldersAsync(Guid accountId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns the child folders of the given folder.
|
||||
/// </summary>
|
||||
/// <param name="accountId">Account id to get folders for.</param>
|
||||
/// <param name="parentRemoteFolderId">Parent folder id to get children for.</param>
|
||||
Task<List<MailItemFolder>> GetChildFoldersAsync(Guid accountId, string parentRemoteFolderId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.Reader;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IFontService
|
||||
{
|
||||
|
||||
4
Wino.Core.Domain/Interfaces/IGmailAuthenticator.cs
Normal file
4
Wino.Core.Domain/Interfaces/IGmailAuthenticator.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IGmailAuthenticator : IAuthenticator { }
|
||||
}
|
||||
7
Wino.Core.Domain/Interfaces/IGmailChangeProcessor.cs
Normal file
7
Wino.Core.Domain/Interfaces/IGmailChangeProcessor.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IGmailChangeProcessor : IDefaultChangeProcessor
|
||||
{
|
||||
Task MapLocalDraftAsync(string mailCopyId, string newDraftId, string newThreadId);
|
||||
}
|
||||
}
|
||||
11
Wino.Core.Domain/Interfaces/IHtmlPreviewer.cs
Normal file
11
Wino.Core.Domain/Interfaces/IHtmlPreviewer.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IHtmlPreviewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns a preview of the HTML content.
|
||||
/// </summary>
|
||||
/// <param name="htmlContent">HTML content</param>
|
||||
string GetHtmlPreview(string htmlContent);
|
||||
}
|
||||
}
|
||||
11
Wino.Core.Domain/Interfaces/IImapChangeProcessor.cs
Normal file
11
Wino.Core.Domain/Interfaces/IImapChangeProcessor.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IImapChangeProcessor : IDefaultChangeProcessor
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns all known uids for the given folder.
|
||||
/// </summary>
|
||||
/// <param name="folderId">Folder id to retrieve uIds for.</param>
|
||||
Task<IList<uint>> GetKnownUidsForFolderAsync(Guid folderId);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IImapTestService
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface that all startup services must implement.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IKeyPressService
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Specialized;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface ILaunchProtocolService
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface ILogInitializer
|
||||
{
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using MimeKit;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Domain.Entities;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IMailService
|
||||
{
|
||||
@@ -92,5 +92,7 @@ namespace Wino.Core.Domain.Interfaces
|
||||
/// </summary>
|
||||
/// <param name="folderId">Folder id to get unread mails for.</param>
|
||||
Task<List<MailCopy>> GetUnreadMailsByFolderIdAsync(Guid folderId);
|
||||
Task<MailCopy> GetReplyParentAsync(IMailItem replyItem, Guid accountId, Guid threadingFolderId, Guid sentFolderId, Guid draftFolderId);
|
||||
Task<MailCopy> GetInReplyToReplyAsync(IMailItem originalItem, Guid accountId, Guid threadingFolderId, Guid sentFolderId, Guid draftFolderId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IMenuItem
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IMenuOperation
|
||||
{
|
||||
|
||||
68
Wino.Core.Domain/Interfaces/IMimeFileService.cs
Normal file
68
Wino.Core.Domain/Interfaces/IMimeFileService.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using MimeKit;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
using Wino.Domain.Models.Mime;
|
||||
using Wino.Domain.Models.Reader;
|
||||
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IMimeFileService
|
||||
{
|
||||
/// <summary>
|
||||
/// Finds the EML file for the given mail id for address, parses and returns MimeMessage.
|
||||
/// </summary>
|
||||
/// <param name="cancellationToken">Cancellation token</param>
|
||||
/// <returns>Mime message information</returns>
|
||||
Task<MimeMessageInformation> GetMimeMessageInformationAsync(Guid fileId, Guid accountId, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the mime message information for the given EML file bytes.
|
||||
/// This override is used when EML file association launch is used
|
||||
/// because we may not have the access to the file path.
|
||||
/// </summary>
|
||||
/// <param name="fileBytes">Byte array of the file.</param>
|
||||
/// <param name="cancellationToken">Cancellation token</param>
|
||||
/// <returns>Mime message information</returns>
|
||||
Task<MimeMessageInformation> GetMimeMessageInformationAsync(byte[] fileBytes, string emlFilePath, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Saves EML file to the disk.
|
||||
/// </summary>
|
||||
/// <param name="copy">MailCopy of the native message.</param>
|
||||
/// <param name="mimeMessage">MimeMessage that is parsed from native message.</param>
|
||||
/// <param name="accountId">Which account Id to save this file for.</param>
|
||||
Task<bool> SaveMimeMessageAsync(Guid fileId, MimeMessage mimeMessage, Guid accountId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a path that all Mime resources (including eml) is stored for this MailCopyId
|
||||
/// This is useful for storing previously rendered attachments as well.
|
||||
/// </summary>
|
||||
/// <param name="accountAddress">Account address</param>
|
||||
/// <param name="mailCopyId">Resource mail copy id</param>
|
||||
Task<string> GetMimeResourcePathAsync(Guid accountId, Guid fileId);
|
||||
|
||||
/// <summary>
|
||||
/// Returns whether mime file exists locally or not.
|
||||
/// </summary>
|
||||
Task<bool> IsMimeExistAsync(Guid accountId, Guid fileId);
|
||||
|
||||
/// <summary>
|
||||
/// Creates HtmlPreviewVisitor for the given MimeMessage.
|
||||
/// </summary>
|
||||
/// <param name="message">Mime</param>
|
||||
/// <param name="mimeLocalPath">File path that mime is located to load resources.</param>
|
||||
HtmlPreviewVisitor CreateHTMLPreviewVisitor(MimeMessage message, string mimeLocalPath);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes the given mime file from the disk.
|
||||
/// </summary>
|
||||
Task<bool> DeleteMimeMessageAsync(Guid accountId, Guid fileId);
|
||||
|
||||
/// <summary>
|
||||
/// Prepares the final model containing rendering details.
|
||||
/// </summary>
|
||||
/// <param name="message">Message to render.</param>
|
||||
/// <param name="mimeLocalPath">File path that physical MimeMessage is located.</param>
|
||||
/// <param name="options">Rendering options</param>
|
||||
MailRenderModel GetMailRenderModel(MimeMessage message, string mimeLocalPath, MailRenderingOptions options = null);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Models.Authorization;
|
||||
using Wino.Domain.Models.Authorization;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface INativeAppService
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wino.Core.Domain.Models.Navigation;
|
||||
using Wino.Domain.Models.Navigation;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface INavigationAware
|
||||
{
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface INotificationBuilder
|
||||
{
|
||||
|
||||
4
Wino.Core.Domain/Interfaces/IOutlookAuthenticator.cs
Normal file
4
Wino.Core.Domain/Interfaces/IOutlookAuthenticator.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IOutlookAuthenticator : IAuthenticator { }
|
||||
}
|
||||
22
Wino.Core.Domain/Interfaces/IOutlookChangeProcessor.cs
Normal file
22
Wino.Core.Domain/Interfaces/IOutlookChangeProcessor.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IOutlookChangeProcessor : IDefaultChangeProcessor
|
||||
{
|
||||
/// <summary>
|
||||
/// Interrupted initial synchronization may cause downloaded mails to be saved in the database twice.
|
||||
/// Since downloading mime is costly in Outlook, we need to check if the actual copy of the message has been saved before.
|
||||
/// </summary>
|
||||
/// <param name="messageId">MailCopyId of the message.</param>
|
||||
/// <returns>Whether the mime has b</returns>
|
||||
Task<bool> IsMailExistsAsync(string messageId);
|
||||
|
||||
/// <summary>
|
||||
/// Updates Folder's delta synchronization identifier.
|
||||
/// Only used in Outlook since it does per-folder sync.
|
||||
/// </summary>
|
||||
/// <param name="folderId">Folder id</param>
|
||||
/// <param name="synchronizationIdentifier">New synchronization identifier.</param>
|
||||
/// <returns>New identifier if success.</returns>
|
||||
Task UpdateFolderDeltaSynchronizationIdentifierAsync(Guid folderId, string deltaSynchronizationIdentifier);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.Reader;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IPreferencesService
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IProviderDetail
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IProviderService
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Collections.Generic;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Entities;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a group of requests.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface for all messages to report UI changes from synchronizers to UI.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface ISignatureService
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IStatePersistanceService : INotifyPropertyChanged
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Store;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.Store;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IStoreManagementService
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IStoreRatingDialog
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IStoreRatingService
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// An interface for reporting progress of the synchronization.
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Personalization;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.Personalization;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IThemeService : IInitializeAsync
|
||||
{
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Entities;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Domain.Entities;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IThreadingStrategy
|
||||
{
|
||||
@@ -15,4 +13,10 @@ namespace Wino.Core.Domain.Interfaces
|
||||
Task<List<IMailItem>> ThreadItemsAsync(List<MailCopy> items);
|
||||
bool ShouldThreadWithItem(IMailItem originalItem, IMailItem targetItem);
|
||||
}
|
||||
|
||||
public interface IOutlookThreadingStrategy : IThreadingStrategy { }
|
||||
|
||||
public interface IGmailThreadingStrategy : IThreadingStrategy { }
|
||||
|
||||
public interface IImapThreadStrategy : IThreadingStrategy { }
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IThreadingStrategyProvider
|
||||
{
|
||||
|
||||
10
Wino.Core.Domain/Interfaces/ITokenService.cs
Normal file
10
Wino.Core.Domain/Interfaces/ITokenService.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Wino.Domain.Entities;
|
||||
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface ITokenService
|
||||
{
|
||||
Task<TokenInformation> GetTokenInformationAsync(Guid accountId);
|
||||
Task SaveTokenInformationAsync(Guid accountId, TokenInformation tokenInformation);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.Translations;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.Translations;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface ITranslationService : IInitializeAsync
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IUnderlyingThemeService
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
using Wino.Domain.Models.Reader;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IUnsubscriptionService
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Core.Domain.Models.Navigation;
|
||||
using Wino.Domain.Enums;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
using Wino.Domain.Models.Navigation;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IWinoNavigationService
|
||||
{
|
||||
|
||||
@@ -1,33 +1,36 @@
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Domain.Models.Folders;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// Prepares server requests and delegates them to proper synchronizers.
|
||||
/// This is the last point for sending the server request.
|
||||
/// </summary>
|
||||
public interface IWinoRequestDelegator
|
||||
{
|
||||
/// <summary>
|
||||
/// Prepares requires IRequest collection for mail actions and executes them via proper synchronizers.
|
||||
/// </summary>
|
||||
/// <param name="prerperationRequest">Preperation model that encapsulates action and mail items.</param>
|
||||
Task ExecuteAsync(MailOperationPreperationRequest prerperationRequest);
|
||||
Task QueueAsync(MailOperationPreperationRequest prerperationRequest);
|
||||
|
||||
/// <summary>
|
||||
/// Queues new draft creation request for synchronizer.
|
||||
/// </summary>
|
||||
/// <param name="draftPreperationRequest">A class that holds the parameters for creating a draft.</param>
|
||||
Task ExecuteAsync(DraftPreperationRequest draftPreperationRequest);
|
||||
Task QueueAsync(DraftPreperationRequest draftPreperationRequest);
|
||||
|
||||
/// <summary>
|
||||
/// Queues a new request for synchronizer to send a draft.
|
||||
/// </summary>
|
||||
/// <param name="draftPreperationRequest">Draft sending request.</param>
|
||||
Task ExecuteAsync(SendDraftPreparationRequest sendDraftPreperationRequest);
|
||||
Task QueueAsync(SendDraftPreparationRequest sendDraftPreperationRequest);
|
||||
|
||||
/// <summary>
|
||||
/// Prepares requires IRequest collection for folder actions and executes them via proper synchronizers.
|
||||
/// Prepares required IRequest collection for folder actions and executes them via proper synchronizers.
|
||||
/// </summary>
|
||||
/// <param name="folderOperationPreperationRequest">Folder prep request.</param>
|
||||
Task ExecuteAsync(FolderOperationPreperationRequest folderOperationPreperationRequest);
|
||||
Task QueueAsync(FolderOperationPreperationRequest folderOperationPreperationRequest);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Models.Folders;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
using Wino.Domain.Models.Folders;
|
||||
using Wino.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IWinoRequestProcessor
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Enums;
|
||||
using Wino.Domain.Enums;
|
||||
|
||||
namespace Wino.Core.Domain.Interfaces
|
||||
namespace Wino.Domain.Interfaces
|
||||
{
|
||||
public interface IWinoServerConnectionManager
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user