2024-11-27 03:01:14 +01:00
|
|
|
using System.Threading.Tasks;
|
2024-11-10 23:28:25 +01:00
|
|
|
using Wino.Core.Domain.Entities.Shared;
|
2024-08-05 00:36:26 +02:00
|
|
|
using Wino.Core.Domain.Enums;
|
2024-08-17 03:43:37 +02:00
|
|
|
using Wino.Core.Domain.Models.Accounts;
|
2024-08-05 00:36:26 +02:00
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
namespace Wino.Core.Domain.Interfaces;
|
|
|
|
|
|
|
|
|
|
public interface IBaseSynchronizer
|
2024-08-05 00:36:26 +02:00
|
|
|
{
|
2025-02-16 11:54:23 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Account that is assigned for this synchronizer.
|
|
|
|
|
/// </summary>
|
|
|
|
|
MailAccount Account { get; }
|
2024-08-05 00:36:26 +02:00
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Synchronizer state.
|
|
|
|
|
/// </summary>
|
|
|
|
|
AccountSynchronizerState State { get; }
|
2024-08-05 00:36:26 +02:00
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Queues a single request to be executed in the next synchronization.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request">Request to queue.</param>
|
|
|
|
|
void QueueRequest(IRequestBase request);
|
2024-08-05 00:36:26 +02:00
|
|
|
|
2025-02-16 11:54:23 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Synchronizes profile information with the server.
|
|
|
|
|
/// Sender name and Profile picture are updated.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns>Profile information model that holds the values.</returns>
|
|
|
|
|
Task<ProfileInformation> GetProfileInformationAsync();
|
2024-08-05 00:36:26 +02:00
|
|
|
}
|