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,4 +1,6 @@
|
|||||||
namespace Wino.Core.Domain
|
using Wino.Domain.Enums;
|
||||||
|
|
||||||
|
namespace Wino.Domain
|
||||||
{
|
{
|
||||||
public static class Constants
|
public static class Constants
|
||||||
{
|
{
|
||||||
@@ -8,8 +10,35 @@
|
|||||||
public const string WinoLocalDraftHeader = "X-Wino-Draft-Id";
|
public const string WinoLocalDraftHeader = "X-Wino-Draft-Id";
|
||||||
public const string LocalDraftStartPrefix = "localDraft_";
|
public const string LocalDraftStartPrefix = "localDraft_";
|
||||||
|
|
||||||
|
// Toast Notification Keys
|
||||||
public const string ToastMailItemIdKey = nameof(ToastMailItemIdKey);
|
public const string ToastMailItemIdKey = nameof(ToastMailItemIdKey);
|
||||||
public const string ToastMailItemRemoteFolderIdKey = nameof(ToastMailItemRemoteFolderIdKey);
|
public const string ToastMailItemRemoteFolderIdKey = nameof(ToastMailItemRemoteFolderIdKey);
|
||||||
public const string ToastActionKey = nameof(ToastActionKey);
|
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";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Entities
|
namespace Wino.Domain.Entities
|
||||||
{
|
{
|
||||||
public class AccountSignature
|
public class AccountSignature
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Entities
|
namespace Wino.Domain.Entities
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Back storage for simple name-address book.
|
/// Back storage for simple name-address book.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using SQLite;
|
using SQLite;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Domain.Enums;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Entities
|
namespace Wino.Domain.Entities
|
||||||
{
|
{
|
||||||
public class CustomServerInformation
|
public class CustomServerInformation
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using SQLite;
|
using SQLite;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Domain.Enums;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Entities
|
namespace Wino.Domain.Entities
|
||||||
{
|
{
|
||||||
public class MailAccount
|
public class MailAccount
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Entities
|
namespace Wino.Domain.Entities
|
||||||
{
|
{
|
||||||
public class MailAccountPreferences
|
public class MailAccountPreferences
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using SQLite;
|
using SQLite;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Domain.Enums;
|
||||||
using Wino.Core.Domain.Models.MailItem;
|
using Wino.Domain.Models.MailItem;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Entities
|
namespace Wino.Domain.Entities
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Summary of the parsed MIME messages.
|
/// Summary of the parsed MIME messages.
|
||||||
|
|||||||
@@ -2,10 +2,11 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using SQLite;
|
using SQLite;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Domain;
|
||||||
using Wino.Core.Domain.Models.Folders;
|
using Wino.Domain.Enums;
|
||||||
|
using Wino.Domain.Models.Folders;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Entities
|
namespace Wino.Domain.Entities
|
||||||
{
|
{
|
||||||
[DebuggerDisplay("{FolderName} - {SpecialFolderType}")]
|
[DebuggerDisplay("{FolderName} - {SpecialFolderType}")]
|
||||||
public class MailItemFolder : IMailItemFolder
|
public class MailItemFolder : IMailItemFolder
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using SQLite;
|
using SQLite;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Entities
|
namespace Wino.Domain.Entities
|
||||||
{
|
{
|
||||||
public class MergedInbox
|
public class MergedInbox
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Entities
|
namespace Wino.Domain.Entities
|
||||||
{
|
{
|
||||||
public record SystemFolderConfiguration(MailItemFolder SentFolder,
|
public record SystemFolderConfiguration(MailItemFolder SentFolder,
|
||||||
MailItemFolder DraftFolder,
|
MailItemFolder DraftFolder,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using SQLite;
|
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
|
public class TokenInformation : TokenInformationBase
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum AccountAttentionReason
|
public enum AccountAttentionReason
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum AccountCreationDialogState
|
public enum AccountCreationDialogState
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Indicates the state of synchronizer.
|
/// Indicates the state of synchronizer.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum AppLanguage
|
public enum AppLanguage
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum AppThemeType
|
public enum AppThemeType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum ApplicationElementTheme
|
public enum ApplicationElementTheme
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum BackgroundSynchronizationReason
|
public enum BackgroundSynchronizationReason
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum ChangeRequestType
|
public enum ChangeRequestType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum CustomIncomingServerType
|
public enum CustomIncomingServerType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum DraftCreationReason
|
public enum DraftCreationReason
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum EditorToolbarSectionType
|
public enum EditorToolbarSectionType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum FilterOptionType
|
public enum FilterOptionType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines all possible folder operations that can be done.
|
/// Defines all possible folder operations that can be done.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum ImapAuthenticationMethod
|
public enum ImapAuthenticationMethod
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum ImapConnectionSecurity
|
public enum ImapConnectionSecurity
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum InfoBarAnimationType
|
public enum InfoBarAnimationType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum InfoBarMessageType
|
public enum InfoBarMessageType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum MailAttachmentType
|
public enum MailAttachmentType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum MailImportance
|
public enum MailImportance
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum MailListDisplayMode
|
public enum MailListDisplayMode
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum MailMarkAsOption
|
public enum MailMarkAsOption
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
// Synchronizer requests.
|
// Synchronizer requests.
|
||||||
public enum MailSynchronizerOperation
|
public enum MailSynchronizerOperation
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum MailProviderType
|
public enum MailProviderType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum MenuPaneMode
|
public enum MenuPaneMode
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum NavigationReferenceFrame
|
public enum NavigationReferenceFrame
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defines the potential reasons for picking folder in the folder picking dialog.
|
/// Defines the potential reasons for picking folder in the folder picking dialog.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum ReaderFont
|
public enum ReaderFont
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum SortingOptionType
|
public enum SortingOptionType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum SpecialFolderType
|
public enum SpecialFolderType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
// From the SDK.
|
// From the SDK.
|
||||||
public enum StorePurchaseResult
|
public enum StorePurchaseResult
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum SynchronizationCompletedState
|
public enum SynchronizationCompletedState
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum SynchronizationType
|
public enum SynchronizationType
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All registered views.
|
/// All registered views.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Enums
|
namespace Wino.Domain.Enums
|
||||||
{
|
{
|
||||||
public enum WinoServerConnectionStatus
|
public enum WinoServerConnectionStatus
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
public class AccountSetupCanceledException : System.Exception
|
public class AccountSetupCanceledException : Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Wino.Core.Domain.Entities;
|
using Wino.Domain.Entities;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Thrown when IAuthenticator requires user interaction to fix authentication issues.
|
/// Thrown when IAuthenticator requires user interaction to fix authentication issues.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// All exceptions related to authentication.
|
/// All exceptions related to authentication.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An exception thrown when the background task execution policies are denied for some reason.
|
/// An exception thrown when the background task execution policies are denied for some reason.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An exception thrown when the background task registration is failed.
|
/// An exception thrown when the background task registration is failed.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Thrown when composer cant find the mime to load.
|
/// Thrown when composer cant find the mime to load.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
public class CustomThemeCreationFailedException : Exception
|
public class CustomThemeCreationFailedException : Exception
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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) { }
|
public GoogleAuthenticationException(string message) : base(message) { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using System;
|
namespace Wino.Domain.Exceptions
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Exceptions
|
|
||||||
{
|
{
|
||||||
public class ImapClientPoolException : Exception
|
public class ImapClientPoolException : Exception
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
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
|
public class ImapConnectionFailedPackage
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
public class InvalidMoveTargetException : Exception { }
|
public class InvalidMoveTargetException : Exception { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
public class SynchronizerEntityNotFoundException : Exception
|
public class SynchronizerEntityNotFoundException : Exception
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
public class SynchronizerException : Exception
|
public class SynchronizerException : Exception
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When IMAP account's system folder configuration setup is not done yet.
|
/// When IMAP account's system folder configuration setup is not done yet.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SystemFolderConfigurationMissingException : System.Exception { }
|
public class SystemFolderConfigurationMissingException : Exception { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Domain.Enums;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Exceptions
|
namespace Wino.Domain.Exceptions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Emitted when special folder is needed for an operation but it couldn't be found.
|
/// Emitted when special folder is needed for an operation but it couldn't be found.
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
using System;
|
namespace Wino.Domain.Extensions
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Wino.Core.Extensions
|
|
||||||
{
|
{
|
||||||
public static class LongExtensions
|
public static class LongExtensions
|
||||||
{
|
{
|
||||||
@@ -11,34 +7,34 @@ namespace Wino.Core.Extensions
|
|||||||
public static string GetBytesReadable(this long i)
|
public static string GetBytesReadable(this long i)
|
||||||
{
|
{
|
||||||
// Get absolute value
|
// Get absolute value
|
||||||
long absolute_i = (i < 0 ? -i : i);
|
long absolute_i = i < 0 ? -i : i;
|
||||||
// Determine the suffix and readable value
|
// Determine the suffix and readable value
|
||||||
string suffix;
|
string suffix;
|
||||||
double readable;
|
double readable;
|
||||||
if (absolute_i >= 0x1000000000000000) // Exabyte
|
if (absolute_i >= 0x1000000000000000) // Exabyte
|
||||||
{
|
{
|
||||||
suffix = "EB";
|
suffix = "EB";
|
||||||
readable = (i >> 50);
|
readable = i >> 50;
|
||||||
}
|
}
|
||||||
else if (absolute_i >= 0x4000000000000) // Petabyte
|
else if (absolute_i >= 0x4000000000000) // Petabyte
|
||||||
{
|
{
|
||||||
suffix = "PB";
|
suffix = "PB";
|
||||||
readable = (i >> 40);
|
readable = i >> 40;
|
||||||
}
|
}
|
||||||
else if (absolute_i >= 0x10000000000) // Terabyte
|
else if (absolute_i >= 0x10000000000) // Terabyte
|
||||||
{
|
{
|
||||||
suffix = "TB";
|
suffix = "TB";
|
||||||
readable = (i >> 30);
|
readable = i >> 30;
|
||||||
}
|
}
|
||||||
else if (absolute_i >= 0x40000000) // Gigabyte
|
else if (absolute_i >= 0x40000000) // Gigabyte
|
||||||
{
|
{
|
||||||
suffix = "GB";
|
suffix = "GB";
|
||||||
readable = (i >> 20);
|
readable = i >> 20;
|
||||||
}
|
}
|
||||||
else if (absolute_i >= 0x100000) // Megabyte
|
else if (absolute_i >= 0x100000) // Megabyte
|
||||||
{
|
{
|
||||||
suffix = "MB";
|
suffix = "MB";
|
||||||
readable = (i >> 10);
|
readable = i >> 10;
|
||||||
}
|
}
|
||||||
else if (absolute_i >= 0x400) // Kilobyte
|
else if (absolute_i >= 0x400) // Kilobyte
|
||||||
{
|
{
|
||||||
@@ -50,7 +46,7 @@ namespace Wino.Core.Extensions
|
|||||||
return i.ToString("0 B"); // Byte
|
return i.ToString("0 B"); // Byte
|
||||||
}
|
}
|
||||||
// Divide by 1024 to get fractional value
|
// Divide by 1024 to get fractional value
|
||||||
readable = (readable / 1024);
|
readable = readable / 1024;
|
||||||
// Return formatted number with suffix
|
// Return formatted number with suffix
|
||||||
return readable.ToString("0.# ") + suffix;
|
return readable.ToString("0.# ") + suffix;
|
||||||
}
|
}
|
||||||
14
Wino.Core.Domain/Extensions/MailkitClientExtensions.cs
Normal file
14
Wino.Core.Domain/Extensions/MailkitClientExtensions.cs
Normal 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.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
22
Wino.Core.Domain/Extensions/MimeExtensions.cs
Normal file
22
Wino.Core.Domain/Extensions/MimeExtensions.cs
Normal 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 };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An interface that should force synchronizer to do synchronization for only given folder ids
|
/// 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
|
public interface IAccountCreationDialog
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
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
|
public interface IAccountMenuItem : IMenuItem
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IAccountPickerDialog
|
public interface IAccountPickerDialog
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IAccountProviderDetailViewModel
|
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
|
public interface IAccountProviderDetails
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Threading.Tasks;
|
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
|
public interface IAccountService
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Singleton object that holds the application data folder path and the publisher shared folder path.
|
/// 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>
|
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
|
public interface IAuthenticationProvider
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Wino.Core.Domain.Entities;
|
using Wino.Domain.Entities;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Domain.Enums;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IAuthenticator
|
public interface IAuthenticator
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Threading.Tasks;
|
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>
|
/// <summary>
|
||||||
/// Searches for Auto Discovery settings for custom mail accounts.
|
/// Searches for Auto Discovery settings for custom mail accounts.
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MailKit;
|
using MailKit;
|
||||||
using Wino.Core.Domain.Entities;
|
using Wino.Domain.Entities;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Domain.Enums;
|
||||||
using Wino.Core.Domain.Models.MailItem;
|
using Wino.Domain.Models.MailItem;
|
||||||
using Wino.Core.Domain.Models.Synchronization;
|
using Wino.Domain.Models.Synchronization;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IBaseSynchronizer
|
public interface IBaseSynchronizer
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IClipboardService
|
public interface IClipboardService
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IConfigurationService
|
public interface IConfigurationService
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IConfirmationDialog
|
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 System.Collections.Generic;
|
||||||
using Wino.Core.Domain.Models.Folders;
|
using Wino.Domain.Models.Folders;
|
||||||
using Wino.Core.Domain.Models.MailItem;
|
using Wino.Domain.Models.MailItem;
|
||||||
using Wino.Core.Domain.Models.Menus;
|
using Wino.Domain.Models.Menus;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IContextMenuItemService
|
public interface IContextMenuItemService
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Wino.Core.Domain.Models.Folders;
|
using Wino.Domain.Models.Folders;
|
||||||
using Wino.Core.Domain.Models.MailItem;
|
using Wino.Domain.Models.MailItem;
|
||||||
using Wino.Core.Domain.Models.Menus;
|
using Wino.Domain.Models.Menus;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IContextMenuProvider
|
public interface IContextMenuProvider
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.Threading.Tasks;
|
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
|
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.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Wino.Core.Domain.Entities;
|
using Wino.Domain.Entities;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Domain.Enums;
|
||||||
using Wino.Core.Domain.Models.Accounts;
|
using Wino.Domain.Models.Accounts;
|
||||||
using Wino.Core.Domain.Models.Folders;
|
using Wino.Domain.Models.Folders;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IDialogService
|
public interface IDialogService
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IDispatcher
|
public interface IDispatcher
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IFileService
|
public interface IFileService
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Wino.Core.Domain.Entities;
|
using Wino.Domain.Entities;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Domain.Enums;
|
||||||
using Wino.Core.Domain.Models.Folders;
|
using Wino.Domain.Models.Folders;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IFolderMenuItem : IBaseFolderMenuItem
|
public interface IFolderMenuItem : IBaseFolderMenuItem
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
using System;
|
using Wino.Domain.Entities;
|
||||||
using System.Collections.Generic;
|
using Wino.Domain.Enums;
|
||||||
using System.Threading.Tasks;
|
using Wino.Domain.Models.Accounts;
|
||||||
using Wino.Core.Domain.Entities;
|
using Wino.Domain.Models.Folders;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Domain.Models.MailItem;
|
||||||
using Wino.Core.Domain.Models.Accounts;
|
using Wino.Domain.Models.Synchronization;
|
||||||
using Wino.Core.Domain.Models.Folders;
|
|
||||||
using Wino.Core.Domain.Models.MailItem;
|
|
||||||
using Wino.Core.Domain.Models.Synchronization;
|
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IFolderService
|
public interface IFolderService
|
||||||
{
|
{
|
||||||
@@ -82,7 +79,7 @@ namespace Wino.Core.Domain.Interfaces
|
|||||||
/// Returns the active folder menu items for the given account for UI.
|
/// Returns the active folder menu items for the given account for UI.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="accountMenuItem">Account to get folder menu items for.</param>
|
/// <param name="accountMenuItem">Account to get folder menu items for.</param>
|
||||||
Task<IEnumerable<IMenuItem>> GetAccountFoldersForDisplayAsync(IAccountMenuItem accountMenuItem);
|
// Task<IEnumerable<IMenuItem>> GetAccountFoldersForDisplayAsync(IAccountMenuItem accountMenuItem);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns a list of unread item counts for the given account ids.
|
/// Returns a list of unread item counts for the given account ids.
|
||||||
@@ -90,5 +87,13 @@ namespace Wino.Core.Domain.Interfaces
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="accountIds">Account ids to get unread folder counts for.</param>
|
/// <param name="accountIds">Account ids to get unread folder counts for.</param>
|
||||||
Task<List<UnreadItemCountResult>> GetUnreadItemCountResultsAsync(IEnumerable<Guid> accountIds);
|
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 System.Collections.Generic;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Domain.Enums;
|
||||||
using Wino.Core.Domain.Models.Reader;
|
using Wino.Domain.Models.Reader;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IFontService
|
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 System.Threading.Tasks;
|
||||||
using Wino.Core.Domain.Entities;
|
using Wino.Domain.Entities;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IImapTestService
|
public interface IImapTestService
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An interface that all startup services must implement.
|
/// An interface that all startup services must implement.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface IKeyPressService
|
public interface IKeyPressService
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Specialized;
|
using System.Collections.Specialized;
|
||||||
|
|
||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface ILaunchProtocolService
|
public interface ILaunchProtocolService
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
namespace Wino.Core.Domain.Interfaces
|
namespace Wino.Domain.Interfaces
|
||||||
{
|
{
|
||||||
public interface ILogInitializer
|
public interface ILogInitializer
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user