2021-06-26 20:57:55 +02:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace TINK.Model.User.Account
|
2021-05-13 20:03:07 +02:00
|
|
|
|
{
|
2021-06-26 20:57:55 +02:00
|
|
|
|
/// <summary>Interface to manage an account store.</summary>
|
2021-05-13 20:03:07 +02:00
|
|
|
|
public interface IStore
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Reads mail address and password from account store.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
2021-06-26 20:57:55 +02:00
|
|
|
|
Task<IAccount> Load();
|
2021-05-13 20:03:07 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Writes mail address and password to account store.
|
|
|
|
|
/// </summary>
|
2021-06-26 20:57:55 +02:00
|
|
|
|
/// <param name="mailAndPwd"></param>
|
|
|
|
|
Task Save(IAccount mailAndPwd);
|
2021-05-13 20:03:07 +02:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Deletes mail address and password from account store.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns> Empty account instance if deleting succeeded.</returns>
|
2021-06-26 20:57:55 +02:00
|
|
|
|
IAccount Delete(IAccount mailAndPwd);
|
2021-05-13 20:03:07 +02:00
|
|
|
|
}
|
|
|
|
|
}
|