mirror of
https://github.com/bitwarden/mobile.git
synced 2024-09-27 03:52:57 +02:00
eea7c6b7d7
* Add sync on send create/update/delete notification * Update send notifications to only sync sends * Fix incorrect notification type in PushNotificationListenerService Co-authored-by: aj-rosado <109146700+aj-rosado@users.noreply.github.com> * Invert if to improve readability * Simplify shouldUpdate logic in SyncUpsertSendAsync * Further simplify SyncService code * Fix if condition in SyncService Co-authored-by: aj-rosado <109146700+aj-rosado@users.noreply.github.com> * Fixed whitespace formatting --------- Co-authored-by: aj-rosado <109146700+aj-rosado@users.noreply.github.com> Co-authored-by: Andre Rosado <arosado@bitwarden.com>
23 lines
1020 B
C#
23 lines
1020 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using Bit.Core.Models.Response;
|
|
|
|
namespace Bit.Core.Abstractions
|
|
{
|
|
public interface ISyncService
|
|
{
|
|
bool SyncInProgress { get; set; }
|
|
Task<bool> FullSyncAsync(bool forceSync, bool allowThrowOnError = false);
|
|
Task<DateTime?> GetLastSyncAsync();
|
|
Task SetLastSyncAsync(DateTime date);
|
|
Task<bool> SyncDeleteCipherAsync(SyncCipherNotification notification);
|
|
Task<bool> SyncDeleteFolderAsync(SyncFolderNotification notification);
|
|
Task<bool> SyncDeleteSendAsync(SyncSendNotification notification);
|
|
Task<bool> SyncUpsertCipherAsync(SyncCipherNotification notification, bool isEdit);
|
|
Task<bool> SyncUpsertFolderAsync(SyncFolderNotification notification, bool isEdit);
|
|
Task<bool> SyncUpsertSendAsync(SyncSendNotification notification, bool isEdit);
|
|
// Passwordless code will be moved to an independent service in future techdept
|
|
Task SyncPasswordlessLoginRequestsAsync();
|
|
}
|
|
}
|