50 lines
2.1 KiB
C#
50 lines
2.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using gehGassiApp.Core.Interfaces.Synchronization;
|
|
using gehGassiApp.Domain.Users;
|
|
|
|
namespace gehGassiApp.Core.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Schnittestellenbeschreibung für einen Service der die Verwaltung von Walker-Profilen ermöglicht
|
|
/// </summary>
|
|
public interface IWalkerProfileService : IService<DogWalkerProfile>, ISyncPushPullService<DogWalkerProfile>
|
|
{
|
|
/// <summary>
|
|
/// Gibt das aktuelle Walkerprofil zurück.
|
|
/// </summary>
|
|
/// <returns>DogWalkerProfile oder null wenn nicht gefunden</returns>
|
|
Task<DogWalkerProfile> GetAsync();
|
|
|
|
/// <summary>
|
|
/// Gibt das aktuelle Walkerprofil zurück.
|
|
/// Versucht auch online - wenn lokal nicht vorhanden
|
|
/// </summary>
|
|
/// <param name="accessToken">Aktuelles Accesstoken</param>
|
|
/// <param name="token">CancellationToken</param>
|
|
/// <param name="forceOnline">Wenn true, wird in jedem Fall die Online-Abfrage verwendet</param>
|
|
/// <returns>DogWalkerProfile oder null wenn nicht gefunden</returns>
|
|
Task<DogWalkerProfile> GetAsync(string accessToken, CancellationToken token, bool forceOnline);
|
|
|
|
/// <summary>
|
|
/// Hinzufügen oder aktualisieren eines Walkerprofils
|
|
/// </summary>
|
|
/// <param name="walkerProfile">Walker-Profil</param>
|
|
/// <returns>AppUser</returns>
|
|
Task<DogWalkerProfile> CreateOrUpdateAsync(DogWalkerProfile walkerProfile);
|
|
|
|
/// <summary>
|
|
/// Aktualisieren eines Walker-Profils.
|
|
/// Online wird versucht. Wenn nicht möglich wird ein Delta erstellt.
|
|
/// </summary>
|
|
/// <param name="walkerProfile">Walker-Profil</param>
|
|
/// <param name="accessToken">Aktuelles Accesstoken</param>
|
|
/// <param name="token">CancellationToken</param>
|
|
/// <returns>DogWalkerProfile</returns>
|
|
Task<DogWalkerProfile> UpdateAsync(DogWalkerProfile walkerProfile, string accessToken, CancellationToken token);
|
|
}
|
|
}
|