1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-09-27 03:52:57 +02:00
bitwarden-mobile/src/Core/Abstractions/IPlatformUtilsService.cs
Federico Maccaroni 705b8ac12b
Fix Clipboard clear after time on iOS (#1679)
* Fixed Clipboard clear after x seconds depending on what the user set. Also refactored a bit to make the Clipboard a custom service to provide a better way to handle this situation #1464

* Clear some usings #1464
2021-12-10 17:41:36 -03:00

34 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Bit.Core.Enums;
namespace Bit.Core.Abstractions
{
public interface IPlatformUtilsService
{
string IdentityClientId { get; }
string GetApplicationVersion();
DeviceType GetDevice();
string GetDeviceString();
bool IsDev();
bool IsSelfHost();
bool IsViewOpen();
void LaunchUri(string uri, Dictionary<string, object> options = null);
Task<string> ReadFromClipboardAsync(Dictionary<string, object> options = null);
void SaveFile();
Task<bool> ShowDialogAsync(string text, string title = null, string confirmText = null,
string cancelText = null, string type = null);
Task<bool> ShowPasswordDialogAsync(string title, string body, Func<string, Task<bool>> validator);
Task<(string password, bool valid)> ShowPasswordDialogAndGetItAsync(string title, string body, Func<string, Task<bool>> validator);
void ShowToast(string type, string title, string text, Dictionary<string, object> options = null);
void ShowToast(string type, string title, string[] text, Dictionary<string, object> options = null);
bool SupportsFido2();
bool SupportsDuo();
Task<bool> SupportsBiometricAsync();
Task<bool> AuthenticateBiometricAsync(string text = null, string fallbackText = null, Action fallback = null);
long GetActiveTime();
}
}