2019-04-19 16:11:17 +03:00
|
|
|
|
using Bit.Core.Enums;
|
2019-05-17 21:34:00 +03:00
|
|
|
|
using Bit.Core.Models.View;
|
2019-04-19 16:11:17 +03:00
|
|
|
|
using System.Threading.Tasks;
|
2019-04-10 06:33:12 +03:00
|
|
|
|
|
|
|
|
|
namespace Bit.App.Abstractions
|
2019-04-10 06:24:03 +03:00
|
|
|
|
{
|
|
|
|
|
public interface IDeviceActionService
|
|
|
|
|
{
|
2019-04-19 16:11:17 +03:00
|
|
|
|
DeviceType DeviceType { get; }
|
2019-04-10 06:24:03 +03:00
|
|
|
|
void Toast(string text, bool longDuration = false);
|
|
|
|
|
bool LaunchApp(string appName);
|
2019-04-10 06:33:12 +03:00
|
|
|
|
Task ShowLoadingAsync(string text);
|
|
|
|
|
Task HideLoadingAsync();
|
2019-04-29 23:09:27 +03:00
|
|
|
|
bool OpenFile(byte[] fileData, string id, string fileName);
|
|
|
|
|
bool CanOpenFile(string fileName);
|
|
|
|
|
Task ClearCacheAsync();
|
2019-05-11 06:43:35 +03:00
|
|
|
|
Task SelectFileAsync();
|
2019-05-09 18:44:27 +03:00
|
|
|
|
Task<string> DisplayPromptAync(string title = null, string description = null, string text = null,
|
2019-05-16 22:54:21 +03:00
|
|
|
|
string okButtonText = null, string cancelButtonText = null, bool numericKeyboard = false);
|
2019-05-15 20:09:49 +03:00
|
|
|
|
void RateApp();
|
2019-05-17 16:45:07 +03:00
|
|
|
|
bool SupportsFaceId();
|
2019-05-17 19:03:35 +03:00
|
|
|
|
bool SupportsNfc();
|
|
|
|
|
bool SupportsCamera();
|
|
|
|
|
bool SupportsAutofillService();
|
2019-05-17 20:46:32 +03:00
|
|
|
|
int SystemMajorVersion();
|
|
|
|
|
string SystemModel();
|
2019-05-17 21:04:16 +03:00
|
|
|
|
Task<string> DisplayAlertAsync(string title, string message, string cancel, params string[] buttons);
|
2019-05-17 21:34:00 +03:00
|
|
|
|
void Autofill(CipherView cipher);
|
|
|
|
|
void CloseAutofill();
|
|
|
|
|
void Background();
|
2019-04-10 06:24:03 +03:00
|
|
|
|
}
|
2019-05-17 19:03:35 +03:00
|
|
|
|
}
|