82 lines
3.4 KiB
C#
82 lines
3.4 KiB
C#
using gehGassiApp.Core.Interfaces.Synchronization;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using gehGassiApp.Domain.Dogs;
|
|
|
|
namespace gehGassiApp.Core.Interfaces
|
|
{
|
|
/// <summary>
|
|
/// Schnittstellenbeschreibung für einen Service der die Verwaltung von Hunden ermöglicht
|
|
/// </summary>
|
|
public interface IDogService : IService<Dog>, ISyncPushPullService<Dog>
|
|
{
|
|
/// <summary>
|
|
/// Erstellen eines Hundes
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Dog Create(string appUserId);
|
|
|
|
/// <summary>
|
|
/// Gibt eine Liste der Hunden zurück.
|
|
/// Entweder von der DB oder vom Server
|
|
/// </summary>
|
|
/// <param name="appUserId">Id des AppBenutzers</param>
|
|
/// <param name="accessToken">Aktuelles Accesstoken</param>
|
|
/// <param name="token">CancellationToken</param>
|
|
/// <returns>Liste der Hunde</returns>
|
|
Task<List<Dog>> GetDogsAsync(string appUserId, string accessToken, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Gibt eine Liste der Hunden zurück.
|
|
/// Entweder von der DB oder vom Server
|
|
/// </summary>
|
|
/// <param name="appUserId">Id des AppBenutzers</param>
|
|
/// <param name="language">Gewünschte Sprache</param>
|
|
/// <param name="accessToken">Aktuelles Accesstoken</param>
|
|
/// <param name="token">CancellationToken</param>
|
|
/// <returns>Liste der Hunde</returns>
|
|
Task<List<DogMinInfo>> GetDogsMinAsync(string appUserId, string language, string accessToken, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Gibt einen hund vom Server zurück
|
|
/// </summary>
|
|
/// <param name="dogId">Id des Hundes</param>
|
|
/// <param name="accessToken">Aktuelles Accesstoken</param>
|
|
/// <param name="token">CancellationToken</param>
|
|
/// <returns>Hund oder null, wenn nicht gfunden</returns>
|
|
Task<Dog> GetDogAsync(string dogId, string accessToken, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Hinzufügen eines Hundes
|
|
/// </summary>
|
|
/// <param name="dog">Hund</param>
|
|
/// <param name="accessToken">Aktuelles Accesstoken</param>
|
|
/// <param name="token">CancellationToken</param>
|
|
/// <returns>Angelegter Hund</returns>
|
|
Task<Dog> AddAsync(Dog dog, string accessToken, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Aktualisieren eines Hundes
|
|
/// </summary>
|
|
/// <param name="dog">Hund</param>
|
|
/// <param name="accessToken">Aktuelles Accesstoken</param>
|
|
/// <param name="token">CancellationToken</param>
|
|
/// <returns>Angelegter Hund</returns>
|
|
Task<bool> UpdateAsync(Dog dog, string accessToken, CancellationToken token);
|
|
|
|
/// <summary>
|
|
/// Echtes Löschen eines Hundes - wird derzeit nicht verwendet!
|
|
/// Bitte Hund auf deleted setzen und UPDATE
|
|
/// </summary>
|
|
/// <param name="dogId">Id des Hundes</param>
|
|
/// <param name="appUserId">Id des AppBenutzers</param>
|
|
/// <param name="accessToken">Aktuelles Accesstoken</param>
|
|
/// <param name="token">CancellationToken</param>
|
|
/// <returns>Angelegter Hund</returns>
|
|
Task<bool> DeleteAsync(string dogId, string appUserId, string accessToken, CancellationToken token);
|
|
}
|
|
}
|