bitwarden-mobile/src/App/Abstractions/IDeviceActionService.cs

53 lines
2.1 KiB
C#
Raw Normal View History

2022-04-26 17:21:17 +02:00
using System.Threading.Tasks;
using Bit.Core.Enums;
2019-05-17 20:34:00 +02:00
using Bit.Core.Models.View;
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; }
2019-04-19 15:11:17 +02:00
DeviceType DeviceType { get; }
2019-04-10 05:24:03 +02:00
void Toast(string text, bool longDuration = false);
bool LaunchApp(string appName);
2019-04-10 05:33:12 +02:00
Task ShowLoadingAsync(string text);
Task HideLoadingAsync();
bool OpenFile(byte[] fileData, string id, string fileName);
bool SaveFile(byte[] fileData, string id, string fileName, string contentUri);
bool CanOpenFile(string fileName);
Task ClearCacheAsync();
2019-05-11 05:43:35 +02:00
Task SelectFileAsync();
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,
bool autofocus = true, bool password = false);
2019-05-15 19:09:49 +02:00
void RateApp();
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();
bool SupportsAutofillService();
2019-05-17 19:46:32 +02:00
int SystemMajorVersion();
string SystemModel();
2019-05-17 20:04:16 +02:00
Task<string> DisplayAlertAsync(string title, string message, string cancel, params string[] buttons);
[Auto Logout] Final review of feature (#932) * Initial commit of LockService name refactor (#831) * [Auto-Logout] Update Service layer logic (#835) * Initial commit of service logic update * Added default value for action * Updated ToggleTokensAsync conditional * Removed unused variables, updated action conditional * Initial commit: lockOption/lock refactor app layer (#840) * [Auto-Logout] Settings Refactor - Application Layer Part 2 (#844) * Initial commit of app layer part 2 * Updated biometrics position * Reverted resource name refactor * LockOptions refactor revert * Updated method casing :: Removed VaultTimeout prefix for timeouts * Fixed dupe string resource (#854) * Updated dependency to use VaultTimeoutService (#896) * [Auto Logout] Xamarin Forms in AutoFill flow (iOS) (#902) * fix typo in PINRequireMasterPasswordRestart (#900) * initial commit for xf usage in autofill * Fixed databinding for hint button * Updated Two Factor page launch - removed unused imports * First pass at broadcast/messenger implentation for autofill * setting theme in extension using theme manager * extension app resources * App resources from main app * fix ref to twoFactorPage * apply resources to page * load empty app for sytling in extension * move ios renderers to ios core * static ref to resources and GetResourceColor helper * fix method ref * move application.current.resources refs to helper * switch login page alerts to device action dialogs * run on main thread * showDialog with device action service * abstract action sheet to device action service * add support for yubikey * add yubikey iimages to extension * support close button action * add support to action extension * remove empty lines Co-authored-by: Jonas Kittner <54631600+theendlessriver13@users.noreply.github.com> Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com> * [Auto Logout] Update lock option to be default value (#929) * Initial commit - make lock action default * Removed extra whitespace Co-authored-by: Jonas Kittner <54631600+theendlessriver13@users.noreply.github.com> Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com> Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
2020-05-29 18:26:36 +02:00
Task<string> DisplayActionSheetAsync(string title, string cancel, string destruction, params string[] buttons);
2019-05-17 20:34:00 +02:00
void Autofill(CipherView cipher);
void CloseAutofill();
void Background();
2019-05-30 20:13:02 +02:00
bool AutofillAccessibilityServiceRunning();
bool AutofillAccessibilityOverlayPermitted();
bool HasAutofillService();
2019-05-30 20:13:02 +02:00
bool AutofillServiceEnabled();
void DisableAutofillService();
bool AutofillServicesEnabled();
2019-05-30 20:13:02 +02:00
string GetBuildNumber();
2019-06-03 18:05:18 +02:00
void OpenAccessibilitySettings();
void OpenAccessibilityOverlayPermissionSettings();
2019-06-03 18:05:18 +02:00
void OpenAutofillSettings();
long GetActiveTime();
void CloseMainApp();
bool SupportsFido2();
float GetSystemFontSizeScale();
Task OnAccountSwitchCompleteAsync();
2019-04-10 05:24:03 +02:00
}
2019-05-17 18:03:35 +02:00
}