Full trust Wino Server implementation. (#295)
* Separation of messages. Introducing Wino.Messages library. * Wino.Server and Wino.Packaging projects. Enabling full trust for UWP and app service connection manager basics. * Remove debug code. * Enable generating assembly info to deal with unsupported os platform warnings. * Fix server-client connection. * UIMessage communication. Single instancing for server and re-connection mechanism on suspension. * Removed IWinoSynchronizerFactory from UWP project. * Removal of background task service from core. * Delegating changes to UI and triggering new background synchronization. * Fix build error. * Moved core lib messages to Messaging project. * Better client-server communication. Handling of requests in the server. New synchronizer factory in the server. * WAM broker and MSAL token caching for OutlookAuthenticator. Handling account creation for Outlook. * WinoServerResponse basics. * Delegating protocol activation for Gmail authenticator. * Adding margin to searchbox to match action bar width. * Move libraries into lib folder. * Storing base64 encoded mime on draft creation instead of MimeMessage object. Fixes serialization/deserialization issue with S.T.Json * Scrollbar adjustments * WınoExpander for thread expander layout ıssue. * Handling synchronizer state changes. * Double init on background activation. * FIxing packaging issues and new Wino Mail launcher protocol for activation from full thrust process. * Remove debug deserialization. * Remove debug code. * Making sure the server connection is established when the app is launched. * Thrust -> Trust string replacement... * Rename package to Wino Mail * Enable translated values in the server. * Fixed an issue where toast activation can't find the clicked mail after the folder is initialized. * Revert debug code. * Change server background sync to every 3 minute and Inbox only synchronization. * Revert google auth changes. * App preferences page. * Changing tray icon visibility on preference change. * Start the server with invisible tray icon if set to invisible. * Reconnect button on the title bar. * Handling of toast actions. * Enable x86 build for server during packaging. * Get rid of old background tasks and v180 migration. * Terminate client when Exit clicked in server. * Introducing SynchronizationSource to prevent notifying UI after server tick synchronization. * Remove confirmAppClose restricted capability and unused debug code in manifest. * Closing the reconnect info popup when reconnect is clicked. * Custom RetryHandler for OutlookSynchronizer and separating client/server logs. * Running server on Windows startup. * Fix startup exe. * Fix for expander list view item paddings. * Force full sync on app launch instead of Inbox. * Fix draft creation. * Fix an issue with custom folder sync logic. * Reporting back account sync progress from server. * Fix sending drafts and missing notifications for imap. * Changing imap folder sync requirements. * Retain file count is set to 3. * Disabled swipe gestures temporarily due to native crash with SwipeControl * Save all attachments implementation. * Localization for save all attachments button. * Fix logging dates for logs. * Fixing ARM64 build. * Add ARM64 build config to packaging project. * Comment out OutOfProcPDB for ARM64. * Hnadling GONE response for Outlook folder synchronization.
This commit is contained in:
14
Wino.Messages/Client/Accounts/AccountMenuItemExtended.cs
Normal file
14
Wino.Messages/Client/Accounts/AccountMenuItemExtended.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Models.MailItem;
|
||||
|
||||
namespace Wino.Messaging.Client.Accounts
|
||||
{
|
||||
/// <summary>
|
||||
/// When menu item for the account is requested to be extended.
|
||||
/// Additional properties are also supported to navigate to correct IMailItem.
|
||||
/// </summary>
|
||||
/// <param name="AutoSelectAccount">Account to extend menu item for.</param>
|
||||
/// <param name="FolderId">Folder to select after expansion.</param>
|
||||
/// <param name="NavigateMailItem">Mail item to select if possible in the expanded folder.</param>
|
||||
public record AccountMenuItemExtended(Guid FolderId, IMailItem NavigateMailItem);
|
||||
}
|
||||
11
Wino.Messages/Client/Accounts/AccountMenuItemsReordered.cs
Normal file
11
Wino.Messages/Client/Accounts/AccountMenuItemsReordered.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Wino.Messaging.Client.Accounts
|
||||
{
|
||||
/// <summary>
|
||||
/// Emitted when account menu items are reordered.
|
||||
/// </summary>
|
||||
/// <param name="newOrderDictionary">New order info.</param>
|
||||
public record AccountMenuItemsReordered(Dictionary<Guid, int> newOrderDictionary);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Accounts
|
||||
{
|
||||
/// <summary>
|
||||
/// When a full menu refresh for accounts menu is requested.
|
||||
/// </summary>
|
||||
public record AccountsMenuRefreshRequested(bool AutomaticallyNavigateFirstItem = true);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
|
||||
namespace Wino.Messaging.Client.Authorization
|
||||
{
|
||||
/// <summary>
|
||||
/// When Google authentication makes a callback to the app via protocol activation to the app.
|
||||
/// App will send this message back to server to continue authorization there.
|
||||
/// </summary>
|
||||
/// <param name="AuthorizationResponseUri">Callback Uri that Google returned.</param>
|
||||
public record ProtocolAuthorizationCallbackReceived(Uri AuthorizationResponseUri) : IClientMessage;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Connection
|
||||
{
|
||||
/// <summary>
|
||||
/// When client established a healthy connection to the server.
|
||||
/// </summary>
|
||||
public record WinoServerConnectionEstrablished;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When rendered html is requested to cancel.
|
||||
/// </summary>
|
||||
public record CancelRenderingContentRequested;
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When reset all mail selections requested.
|
||||
/// </summary>
|
||||
public record ClearMailSelectionsRequested;
|
||||
}
|
||||
10
Wino.Messages/Client/Mails/CreateNewComposeMailRequested.cs
Normal file
10
Wino.Messages/Client/Mails/CreateNewComposeMailRequested.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Wino.Core.Domain.Models.Reader;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When a new composing requested.
|
||||
/// </summary>
|
||||
/// <param name="RenderModel"></param>
|
||||
public record CreateNewComposeMailRequested(MailRenderModel RenderModel);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When rendering frame should be disposed.
|
||||
/// </summary>
|
||||
public class DisposeRenderingFrameRequested { }
|
||||
}
|
||||
8
Wino.Messages/Client/Mails/HtmlRenderingRequested.cs
Normal file
8
Wino.Messages/Client/Mails/HtmlRenderingRequested.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When existing a new html is requested to be rendered due to mail selection or signature.
|
||||
/// </summary>
|
||||
/// <param name="HtmlBody">HTML to render in WebView2.</param>
|
||||
public record HtmlRenderingRequested(string HtmlBody);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When IMAP setup dialog requestes back breadcrumb navigation.
|
||||
/// Not providing PageType will go back to previous page by doing back navigation.
|
||||
/// </summary>
|
||||
/// <param name="PageType">Type to go back.</param>
|
||||
/// <param name="Parameter">Back parameters.</param>
|
||||
public record ImapSetupBackNavigationRequested(Type PageType = null, object Parameter = null);
|
||||
}
|
||||
10
Wino.Messages/Client/Mails/ImapSetupDismissRequested.cs
Normal file
10
Wino.Messages/Client/Mails/ImapSetupDismissRequested.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When user asked to dismiss IMAP setup dialog.
|
||||
/// </summary>
|
||||
/// <param name="CompletedServerInformation"> Validated server information that is ready to be saved to database. </param>
|
||||
public record ImapSetupDismissRequested(CustomServerInformation CompletedServerInformation = null);
|
||||
}
|
||||
11
Wino.Messages/Client/Mails/ImapSetupNavigationRequested.cs
Normal file
11
Wino.Messages/Client/Mails/ImapSetupNavigationRequested.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When IMAP setup dialog breadcrumb navigation requested.
|
||||
/// </summary>
|
||||
/// <param name="PageType">Page type to navigate.</param>
|
||||
/// <param name="Parameter">Navigation parameters.</param>
|
||||
public record ImapSetupNavigationRequested(Type PageType, object Parameter);
|
||||
}
|
||||
11
Wino.Messages/Client/Mails/MailItemNavigationRequested.cs
Normal file
11
Wino.Messages/Client/Mails/MailItemNavigationRequested.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When a IMailItem needs to be navigated (or selected)
|
||||
/// </summary>
|
||||
/// <param name="UniqueMailId">UniqueId of the mail to navigate.</param>
|
||||
/// <param name="ScrollToItem">Whether navigated item should be scrolled to or not..</param>
|
||||
public record MailItemNavigationRequested(Guid UniqueMailId, bool ScrollToItem = false);
|
||||
}
|
||||
17
Wino.Messages/Client/Mails/NavigateMailFolderEvent.cs
Normal file
17
Wino.Messages/Client/Mails/NavigateMailFolderEvent.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.Threading.Tasks;
|
||||
using Wino.Core.Domain.Interfaces;
|
||||
using Wino.Core.Domain.Models.Navigation;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// Selects the given FolderMenuItem in the shell folders list.
|
||||
/// </summary>
|
||||
public class NavigateMailFolderEvent : NavigateMailFolderEventArgs
|
||||
{
|
||||
public NavigateMailFolderEvent(IBaseFolderMenuItem baseFolderMenuItem, TaskCompletionSource<bool> folderInitLoadAwaitTask = null)
|
||||
: base(baseFolderMenuItem, folderInitLoadAwaitTask)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Wino.Messages/Client/Mails/SaveAsPDFRequested.cs
Normal file
11
Wino.Messages/Client/Mails/SaveAsPDFRequested.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When mail save as PDF requested.
|
||||
/// </summary>
|
||||
public record SaveAsPDFRequested(string FileSavePath);
|
||||
}
|
||||
8
Wino.Messages/Client/Mails/SelectedMailItemsChanged.cs
Normal file
8
Wino.Messages/Client/Mails/SelectedMailItemsChanged.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Wino.Messaging.Client.Mails
|
||||
{
|
||||
/// <summary>
|
||||
/// When selected mail count is changed.
|
||||
/// </summary>
|
||||
/// <param name="SelectedItemCount">New selected mail count.</param>
|
||||
public record SelectedMailItemsChanged(int SelectedItemCount);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Navigation
|
||||
{
|
||||
/// <summary>
|
||||
/// When back navigation is requested for breadcrumb pages.
|
||||
/// </summary>
|
||||
public record BackBreadcrumNavigationRequested { }
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Messaging.Client.Navigation
|
||||
{
|
||||
/// <summary>
|
||||
/// When Breadcrumb control navigation requested.
|
||||
/// </summary>
|
||||
/// <param name="PageTitle">Title to display for the page.</param>
|
||||
/// <param name="PageType">Enum equilavent of the page to navigate.</param>
|
||||
/// <param name="Parameter">Additional parameters to the page.</param>
|
||||
public record BreadcrumbNavigationRequested(string PageTitle, WinoPage PageType, object Parameter = null);
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Navigation
|
||||
{
|
||||
/// <summary>
|
||||
/// Navigates to settings page.
|
||||
/// </summary>
|
||||
public record NavigateSettingsRequested;
|
||||
}
|
||||
8
Wino.Messages/Client/Shell/ApplicationThemeChanged.cs
Normal file
8
Wino.Messages/Client/Shell/ApplicationThemeChanged.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// When the application theme changed.
|
||||
/// </summary>
|
||||
/// <param name="IsUnderlyingThemeDark"></param>
|
||||
public record ApplicationThemeChanged(bool IsUnderlyingThemeDark);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
using System.Collections.Generic;
|
||||
using Wino.Core.Domain.Entities;
|
||||
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// When
|
||||
/// - There is no selection of any folder for any account
|
||||
/// - Multiple accounts exists
|
||||
/// - User clicked 'Create New Mail'
|
||||
///
|
||||
/// flyout must be presented to pick correct account.
|
||||
/// This message will be picked up by UWP Shell.
|
||||
/// </summary>
|
||||
public record CreateNewMailWithMultipleAccountsRequested(IEnumerable<MailAccount> AllAccounts);
|
||||
}
|
||||
17
Wino.Messages/Client/Shell/InfoBarMessageRequested.cs
Normal file
17
Wino.Messages/Client/Shell/InfoBarMessageRequested.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// For displaying right sliding notification message in shell.
|
||||
/// </summary>
|
||||
/// <param name="Severity">Severity of notification.</param>
|
||||
/// <param name="Title">Title of the message.</param>
|
||||
/// <param name="Message">Message content.</param>
|
||||
public record InfoBarMessageRequested(InfoBarMessageType Severity,
|
||||
string Title,
|
||||
string Message,
|
||||
string ActionButtonTitle = "",
|
||||
Action Action = null);
|
||||
}
|
||||
7
Wino.Messages/Client/Shell/LanguageChanged.cs
Normal file
7
Wino.Messages/Client/Shell/LanguageChanged.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// When application language is updated.
|
||||
/// </summary>
|
||||
public record LanguageChanged;
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
public class MailtoProtocolMessageRequested { }
|
||||
}
|
||||
10
Wino.Messages/Client/Shell/NavigationPaneModeChanged.cs
Normal file
10
Wino.Messages/Client/Shell/NavigationPaneModeChanged.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Wino.Core.Domain.Enums;
|
||||
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// When navigation pane mode is changed.
|
||||
/// </summary>
|
||||
/// <param name="NewMode">New navigation mode.</param>
|
||||
public record NavigationPaneModeChanged(MenuPaneMode NewMode);
|
||||
}
|
||||
7
Wino.Messages/Client/Shell/ShellStateUpdated.cs
Normal file
7
Wino.Messages/Client/Shell/ShellStateUpdated.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Wino.Messaging.Client.Shell
|
||||
{
|
||||
/// <summary>
|
||||
/// When reading mail state or reader pane narrowed state is changed.
|
||||
/// </summary>
|
||||
public record ShellStateUpdated;
|
||||
}
|
||||
Reference in New Issue
Block a user