Cleaning up the solution. Separating Shared.WinRT, Services and Synchronization. Removing synchronization from app. Reducing bundle size by 45mb.

This commit is contained in:
Burak Kaan Köse
2024-07-21 05:45:02 +02:00
parent f112f369a7
commit 495885e006
523 changed files with 2254 additions and 2375 deletions

View File

@@ -1,4 +1,6 @@
namespace Wino.Core.Domain
using Wino.Domain.Enums;
namespace Wino.Domain
{
public static class Constants
{
@@ -8,8 +10,35 @@
public const string WinoLocalDraftHeader = "X-Wino-Draft-Id";
public const string LocalDraftStartPrefix = "localDraft_";
// Toast Notification Keys
public const string ToastMailItemIdKey = nameof(ToastMailItemIdKey);
public const string ToastMailItemRemoteFolderIdKey = nameof(ToastMailItemRemoteFolderIdKey);
public const string ToastActionKey = nameof(ToastActionKey);
// App Configuration
public const AppLanguage DefaultAppLanguage = AppLanguage.English;
public const string SharedFolderName = "WinoShared";
public static char MailCopyUidSeparator = '_';
// GMail Category Labels
public const string FORUMS_LABEL_ID = "FORUMS";
public const string UPDATES_LABEL_ID = "UPDATES";
public const string PROMOTIONS_LABEL_ID = "PROMOTIONS";
public const string SOCIAL_LABEL_ID = "SOCIAL";
public const string PERSONAL_LABEL_ID = "PERSONAL";
public static string[] SubCategoryFolderLabelIds =
[
FORUMS_LABEL_ID,
UPDATES_LABEL_ID,
PROMOTIONS_LABEL_ID,
SOCIAL_LABEL_ID,
PERSONAL_LABEL_ID
];
// File Names
public const string ProtocolLogFileName = "ImapProtocolLog.log";
public const string WinoLogFileName = "WinoDiagnostics.log";
}
}

View File

@@ -1,7 +1,7 @@
using System;
using SQLite;
namespace Wino.Core.Domain.Entities
namespace Wino.Domain.Entities
{
public class AccountSignature
{

View File

@@ -2,7 +2,7 @@
using System;
using System.Collections.Generic;
namespace Wino.Core.Domain.Entities
namespace Wino.Domain.Entities
{
/// <summary>
/// Back storage for simple name-address book.

View File

@@ -1,8 +1,8 @@
using System;
using SQLite;
using Wino.Core.Domain.Enums;
using Wino.Domain.Enums;
namespace Wino.Core.Domain.Entities
namespace Wino.Domain.Entities
{
public class CustomServerInformation
{

View File

@@ -1,8 +1,8 @@
using System;
using SQLite;
using Wino.Core.Domain.Enums;
using Wino.Domain.Enums;
namespace Wino.Core.Domain.Entities
namespace Wino.Domain.Entities
{
public class MailAccount
{

View File

@@ -1,7 +1,7 @@
using System;
using SQLite;
namespace Wino.Core.Domain.Entities
namespace Wino.Domain.Entities
{
public class MailAccountPreferences
{

View File

@@ -1,10 +1,10 @@
using System;
using System.Collections.Generic;
using SQLite;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.MailItem;
using Wino.Domain.Enums;
using Wino.Domain.Models.MailItem;
namespace Wino.Core.Domain.Entities
namespace Wino.Domain.Entities
{
/// <summary>
/// Summary of the parsed MIME messages.

View File

@@ -2,10 +2,11 @@
using System.Collections.Generic;
using System.Diagnostics;
using SQLite;
using Wino.Core.Domain.Enums;
using Wino.Core.Domain.Models.Folders;
using Wino.Domain;
using Wino.Domain.Enums;
using Wino.Domain.Models.Folders;
namespace Wino.Core.Domain.Entities
namespace Wino.Domain.Entities
{
[DebuggerDisplay("{FolderName} - {SpecialFolderType}")]
public class MailItemFolder : IMailItemFolder

View File

@@ -1,7 +1,7 @@
using System;
using SQLite;
namespace Wino.Core.Domain.Entities
namespace Wino.Domain.Entities
{
public class MergedInbox
{

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
namespace Wino.Core.Domain.Entities
namespace Wino.Domain.Entities
{
public record SystemFolderConfiguration(MailItemFolder SentFolder,
MailItemFolder DraftFolder,

View File

@@ -1,8 +1,8 @@
using System;
using SQLite;
using Wino.Core.Domain.Models.Authentication;
using Wino.Domain.Models.Authentication;
namespace Wino.Core.Domain.Entities
namespace Wino.Domain.Entities
{
public class TokenInformation : TokenInformationBase
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum AccountAttentionReason
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum AccountCreationDialogState
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
/// <summary>
/// Indicates the state of synchronizer.

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum AppLanguage
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum AppThemeType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum ApplicationElementTheme
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum BackgroundSynchronizationReason
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum ChangeRequestType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum CustomIncomingServerType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum DraftCreationReason
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum EditorToolbarSectionType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum FilterOptionType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
/// <summary>
/// Defines all possible folder operations that can be done.

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum ImapAuthenticationMethod
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum ImapConnectionSecurity
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum InfoBarAnimationType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum InfoBarMessageType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum MailAttachmentType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum MailImportance
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum MailListDisplayMode
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum MailMarkAsOption
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
// Synchronizer requests.
public enum MailSynchronizerOperation

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum MailProviderType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum MenuPaneMode
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum NavigationReferenceFrame
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
/// <summary>
/// Defines the potential reasons for picking folder in the folder picking dialog.

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum ReaderFont
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum SortingOptionType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum SpecialFolderType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
// From the SDK.
public enum StorePurchaseResult

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum SynchronizationCompletedState
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum SynchronizationType
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
/// <summary>
/// All registered views.

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Enums
namespace Wino.Domain.Enums
{
public enum WinoServerConnectionStatus
{

View File

@@ -1,6 +1,6 @@
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
public class AccountSetupCanceledException : System.Exception
public class AccountSetupCanceledException : Exception
{
}

View File

@@ -1,7 +1,7 @@
using System;
using Wino.Core.Domain.Entities;
using Wino.Domain.Entities;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
/// <summary>
/// Thrown when IAuthenticator requires user interaction to fix authentication issues.

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
/// <summary>
/// All exceptions related to authentication.

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
/// <summary>
/// An exception thrown when the background task execution policies are denied for some reason.

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
/// <summary>
/// An exception thrown when the background task registration is failed.

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
/// <summary>
/// Thrown when composer cant find the mime to load.

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
public class CustomThemeCreationFailedException : Exception
{

View File

@@ -1,6 +1,6 @@
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
public class GoogleAuthenticationException : System.Exception
public class GoogleAuthenticationException : Exception
{
public GoogleAuthenticationException(string message) : base(message) { }
}

View File

@@ -1,6 +1,4 @@
using System;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
public class ImapClientPoolException : Exception
{

View File

@@ -1,7 +1,7 @@
using System;
using Wino.Core.Domain.Models.AutoDiscovery;
using Wino.Domain.Models.AutoDiscovery;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
public class ImapConnectionFailedPackage
{

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
public class InvalidMoveTargetException : Exception { }
}

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
public class SynchronizerEntityNotFoundException : Exception
{

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
public class SynchronizerException : Exception
{

View File

@@ -1,7 +1,7 @@
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
/// <summary>
/// When IMAP account's system folder configuration setup is not done yet.
/// </summary>
public class SystemFolderConfigurationMissingException : System.Exception { }
public class SystemFolderConfigurationMissingException : Exception { }
}

View File

@@ -1,7 +1,7 @@
using System;
using Wino.Core.Domain.Enums;
using Wino.Domain.Enums;
namespace Wino.Core.Domain.Exceptions
namespace Wino.Domain.Exceptions
{
/// <summary>
/// Emitted when special folder is needed for an operation but it couldn't be found.

View File

@@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Wino.Core.Extensions
namespace Wino.Domain.Extensions
{
public static class LongExtensions
{
@@ -11,34 +7,34 @@ namespace Wino.Core.Extensions
public static string GetBytesReadable(this long i)
{
// Get absolute value
long absolute_i = (i < 0 ? -i : i);
long absolute_i = i < 0 ? -i : i;
// Determine the suffix and readable value
string suffix;
double readable;
if (absolute_i >= 0x1000000000000000) // Exabyte
{
suffix = "EB";
readable = (i >> 50);
readable = i >> 50;
}
else if (absolute_i >= 0x4000000000000) // Petabyte
{
suffix = "PB";
readable = (i >> 40);
readable = i >> 40;
}
else if (absolute_i >= 0x10000000000) // Terabyte
{
suffix = "TB";
readable = (i >> 30);
readable = i >> 30;
}
else if (absolute_i >= 0x40000000) // Gigabyte
{
suffix = "GB";
readable = (i >> 20);
readable = i >> 20;
}
else if (absolute_i >= 0x100000) // Megabyte
{
suffix = "MB";
readable = (i >> 10);
readable = i >> 10;
}
else if (absolute_i >= 0x400) // Kilobyte
{
@@ -50,7 +46,7 @@ namespace Wino.Core.Extensions
return i.ToString("0 B"); // Byte
}
// Divide by 1024 to get fractional value
readable = (readable / 1024);
readable = readable / 1024;
// Return formatted number with suffix
return readable.ToString("0.# ") + suffix;
}

View File

@@ -0,0 +1,14 @@
namespace Wino.Domain.Extensions
{
public static class MailkitClientExtensions
{
public static uint ResolveUid(string mailCopyId)
{
var splitted = mailCopyId.Split(Constants.MailCopyUidSeparator);
if (splitted.Length > 1 && uint.TryParse(splitted[1], out uint parsedUint)) return parsedUint;
throw new ArgumentOutOfRangeException(nameof(mailCopyId), mailCopyId, "Invalid mailCopyId format.");
}
}
}

View File

@@ -0,0 +1,22 @@
using MimeKit;
using Wino.Domain;
using Wino.Domain.Entities;
namespace Wino.Domain.Extensions
{
public static class MimeExtensions
{
public static AddressInformation ToAddressInformation(this MailboxAddress address)
{
if (address == null)
return new AddressInformation() { Name = Translator.UnknownSender, Address = Translator.UnknownAddress };
if (string.IsNullOrEmpty(address.Name))
address.Name = address.Address;
return new AddressInformation() { Name = address.Name, Address = address.Address };
}
}
}

View File

@@ -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

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Interfaces
namespace Wino.Domain.Interfaces
{
public interface IAccountPickerDialog
{

View File

@@ -1,6 +1,6 @@
using System;
namespace Wino.Core.Domain.Interfaces
namespace Wino.Domain.Interfaces
{
public interface IAccountProviderDetailViewModel
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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.

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Interfaces
namespace Wino.Domain.Interfaces
{
public interface IApplicationResourceManager<T>
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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.

View File

@@ -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
{

View File

@@ -1,6 +1,6 @@
using System.Threading.Tasks;
namespace Wino.Core.Domain.Interfaces
namespace Wino.Domain.Interfaces
{
public interface IClipboardService
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Interfaces
namespace Wino.Domain.Interfaces
{
public interface IConfigurationService
{

View File

@@ -1,6 +1,6 @@
using System.Threading.Tasks;
namespace Wino.Core.Domain.Interfaces
namespace Wino.Domain.Interfaces
{
public interface IConfirmationDialog
{

View 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);
}
}

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -0,0 +1,9 @@
using SQLite;
namespace Wino.Domain.Interfaces
{
public interface IDatabaseService : IInitializeAsync
{
SQLiteAsyncConnection Connection { get; }
}
}

View 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);
}
}

View File

@@ -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
{

View File

@@ -1,7 +1,7 @@
using System;
using System.Threading.Tasks;
namespace Wino.Core.Domain.Interfaces
namespace Wino.Domain.Interfaces
{
public interface IDispatcher
{

View File

@@ -1,7 +1,7 @@
using System.IO;
using System.Threading.Tasks;
namespace Wino.Core.Domain.Interfaces
namespace Wino.Domain.Interfaces
{
public interface IFileService
{

View File

@@ -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
{

View File

@@ -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);
}
}

View File

@@ -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
{

View File

@@ -0,0 +1,4 @@
namespace Wino.Domain.Interfaces
{
public interface IGmailAuthenticator : IAuthenticator { }
}

View File

@@ -0,0 +1,7 @@
namespace Wino.Domain.Interfaces
{
public interface IGmailChangeProcessor : IDefaultChangeProcessor
{
Task MapLocalDraftAsync(string mailCopyId, string newDraftId, string newThreadId);
}
}

View 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);
}
}

View 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);
}
}

View File

@@ -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
{

View File

@@ -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.

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Interfaces
namespace Wino.Domain.Interfaces
{
public interface IKeyPressService
{

View File

@@ -1,6 +1,6 @@
using System.Collections.Specialized;
namespace Wino.Core.Domain.Interfaces
namespace Wino.Domain.Interfaces
{
public interface ILaunchProtocolService
{

View File

@@ -1,4 +1,4 @@
namespace Wino.Core.Domain.Interfaces
namespace Wino.Domain.Interfaces
{
public interface ILogInitializer
{

Some files were not shown because too many files have changed in this diff Show More