2019-04-19 15:11:17 +02:00
|
|
|
|
using System.Threading.Tasks;
|
2024-04-09 22:57:31 +02:00
|
|
|
|
using Bit.App.Models;
|
2023-07-18 16:25:38 +02:00
|
|
|
|
using Bit.App.Utilities.Prompts;
|
2019-04-19 15:11:17 +02:00
|
|
|
|
using Bit.Core.Enums;
|
2022-12-07 17:39:20 +01:00
|
|
|
|
using Bit.Core.Models;
|
2019-04-10 05:33:12 +02:00
|
|
|
|
|
|
|
|
|
namespace Bit.App.Abstractions
|
2019-04-10 05:24:03 +02:00
|
|
|
|
{
|
|
|
|
|
public interface IDeviceActionService
|
|
|
|
|
{
|
2019-09-04 17:52:32 +02:00
|
|
|
|
string DeviceUserAgent { get; }
|
2023-09-29 16:02:19 +02:00
|
|
|
|
Core.Enums.DeviceType DeviceType { get; }
|
2022-10-11 23:19:32 +02:00
|
|
|
|
int SystemMajorVersion();
|
|
|
|
|
string SystemModel();
|
|
|
|
|
string GetBuildNumber();
|
|
|
|
|
|
2019-04-10 05:24:03 +02:00
|
|
|
|
void Toast(string text, bool longDuration = false);
|
2019-04-10 05:33:12 +02:00
|
|
|
|
Task ShowLoadingAsync(string text);
|
|
|
|
|
Task HideLoadingAsync();
|
2019-05-09 17:44:27 +02:00
|
|
|
|
Task<string> DisplayPromptAync(string title = null, string description = null, string text = null,
|
2019-06-11 05:18:34 +02:00
|
|
|
|
string okButtonText = null, string cancelButtonText = null, bool numericKeyboard = false,
|
2021-05-21 15:13:54 +02:00
|
|
|
|
bool autofocus = true, bool password = false);
|
2023-07-18 16:25:38 +02:00
|
|
|
|
Task<ValidatablePromptResponse?> DisplayValidatablePromptAsync(ValidatablePromptConfig config);
|
2022-10-11 23:19:32 +02:00
|
|
|
|
Task<string> DisplayAlertAsync(string title, string message, string cancel, params string[] buttons);
|
|
|
|
|
Task<string> DisplayActionSheetAsync(string title, string cancel, string destruction, params string[] buttons);
|
|
|
|
|
|
2019-10-23 15:11:48 +02:00
|
|
|
|
bool SupportsFaceBiometric();
|
|
|
|
|
Task<bool> SupportsFaceBiometricAsync();
|
2019-05-17 18:03:35 +02:00
|
|
|
|
bool SupportsNfc();
|
|
|
|
|
bool SupportsCamera();
|
2022-10-11 23:19:32 +02:00
|
|
|
|
bool SupportsFido2();
|
2023-12-21 00:04:21 +01:00
|
|
|
|
bool SupportsCredentialProviderService();
|
2023-09-27 21:26:12 +02:00
|
|
|
|
bool SupportsAutofillServices();
|
|
|
|
|
bool SupportsInlineAutofill();
|
|
|
|
|
bool SupportsDrawOver();
|
2022-10-11 23:19:32 +02:00
|
|
|
|
|
|
|
|
|
bool LaunchApp(string appName);
|
|
|
|
|
void RateApp();
|
2019-06-03 18:05:18 +02:00
|
|
|
|
void OpenAccessibilitySettings();
|
2020-01-10 16:20:19 +01:00
|
|
|
|
void OpenAccessibilityOverlayPermissionSettings();
|
2023-12-21 00:04:21 +01:00
|
|
|
|
void OpenCredentialProviderSettings();
|
2019-06-03 18:05:18 +02:00
|
|
|
|
void OpenAutofillSettings();
|
2020-12-14 21:29:30 +01:00
|
|
|
|
long GetActiveTime();
|
2024-04-09 22:57:31 +02:00
|
|
|
|
Task ExecuteFido2CredentialActionAsync(AppOptions appOptions);
|
2021-03-31 16:19:05 +02:00
|
|
|
|
void CloseMainApp();
|
2022-02-17 23:34:22 +01:00
|
|
|
|
float GetSystemFontSizeScale();
|
2022-03-17 19:27:01 +01:00
|
|
|
|
Task OnAccountSwitchCompleteAsync();
|
2022-07-15 17:13:10 +02:00
|
|
|
|
Task SetScreenCaptureAllowedAsync();
|
2022-09-26 19:27:57 +02:00
|
|
|
|
void OpenAppSettings();
|
2022-10-25 22:05:15 +02:00
|
|
|
|
void CloseExtensionPopUp();
|
2023-09-27 21:26:12 +02:00
|
|
|
|
string GetAutofillAccessibilityDescription();
|
|
|
|
|
string GetAutofillDrawOverDescription();
|
2019-04-10 05:24:03 +02:00
|
|
|
|
}
|
2019-05-17 18:03:35 +02:00
|
|
|
|
}
|