2024-04-18 01:44:37 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
using Wino.Core.Domain.Models.Authorization;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Wino.Core.Domain.Interfaces
|
|
|
|
|
|
{
|
|
|
|
|
|
public interface INativeAppService
|
|
|
|
|
|
{
|
|
|
|
|
|
string GetWebAuthenticationBrokerUri();
|
|
|
|
|
|
Task<string> GetMimeMessageStoragePath();
|
2024-07-01 00:57:07 +02:00
|
|
|
|
Task<string> GetEditorBundlePathAsync();
|
2024-04-18 01:44:37 +02:00
|
|
|
|
Task LaunchFileAsync(string filePath);
|
|
|
|
|
|
Task LaunchUriAsync(Uri uri);
|
2024-08-05 00:36:26 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Launches the default browser with the specified uri and waits for protocol activation to finish.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="authenticator"></param>
|
|
|
|
|
|
/// <returns>Response callback from the browser.</returns>
|
|
|
|
|
|
Task<Uri> GetAuthorizationResponseUriAsync(IAuthenticator authenticator, string authorizationUri);
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Finalizes GetAuthorizationResponseUriAsync for current IAuthenticator.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="authorizationResponseUri"></param>
|
|
|
|
|
|
void ContinueAuthorization(Uri authorizationResponseUri);
|
|
|
|
|
|
|
2024-04-18 01:44:37 +02:00
|
|
|
|
bool IsAppRunning();
|
|
|
|
|
|
|
|
|
|
|
|
string GetFullAppVersion();
|
|
|
|
|
|
|
|
|
|
|
|
Task PinAppToTaskbarAsync();
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Some cryptographic shit is needed for requesting Google authentication in UWP.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
GoogleAuthorizationRequest GetGoogleAuthorizationRequest();
|
2024-08-05 00:36:26 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets or sets the function that returns a pointer for main window hwnd for UWP.
|
|
|
|
|
|
/// This is used to display WAM broker dialog on running UWP app called by a windowless server code.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
Func<IntPtr> GetCoreWindowHwnd { get; set; }
|
2024-04-18 01:44:37 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|