2019-05-16 22:31:58 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2019-04-10 16:49:24 +02:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Bit.Core.Enums;
|
|
|
|
|
|
|
|
|
|
namespace Bit.Core.Abstractions
|
|
|
|
|
{
|
|
|
|
|
public interface IPlatformUtilsService
|
|
|
|
|
{
|
|
|
|
|
string GetApplicationVersion();
|
|
|
|
|
DeviceType GetDevice();
|
|
|
|
|
string GetDeviceString();
|
2022-02-08 17:43:40 +01:00
|
|
|
|
ClientType GetClientType();
|
2019-04-10 16:49:24 +02:00
|
|
|
|
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);
|
2021-05-21 15:13:54 +02:00
|
|
|
|
Task<bool> ShowPasswordDialogAsync(string title, string body, Func<string, Task<bool>> validator);
|
2021-11-24 20:09:39 +01:00
|
|
|
|
Task<(string password, bool valid)> ShowPasswordDialogAndGetItAsync(string title, string body, Func<string, Task<bool>> validator);
|
2019-04-10 16:49:24 +02:00
|
|
|
|
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);
|
2022-06-10 18:02:17 +02:00
|
|
|
|
void ShowToastForCopiedValue(string valueNameCopied);
|
2021-08-30 18:44:12 +02:00
|
|
|
|
bool SupportsFido2();
|
2019-04-18 15:45:31 +02:00
|
|
|
|
bool SupportsDuo();
|
2019-10-23 15:11:48 +02:00
|
|
|
|
Task<bool> SupportsBiometricAsync();
|
|
|
|
|
Task<bool> AuthenticateBiometricAsync(string text = null, string fallbackText = null, Action fallback = null);
|
2020-12-14 21:29:30 +01:00
|
|
|
|
long GetActiveTime();
|
2019-04-10 16:49:24 +02:00
|
|
|
|
}
|
2020-12-14 21:29:30 +01:00
|
|
|
|
}
|