gehgassi_app/gehGassiApp/gehGassiApp/Helper/IDeviceInstallationService.cs

47 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace gehGassiApp.Helper
{
/// <summary>
/// Schnittstellenbeschreibung für einen Service der die Registrierung des Gerätes beim jeweiligen PNS ermöglicht
/// </summary>
public interface IDeviceInstallationService
{
/// <summary>
/// Token des Gerätes am PNS
/// </summary>
string Token { get; set; }
/// <summary>
/// Gibt an ob Notifications möglich sind
/// </summary>
bool NotificationsSupported { get; }
/// <summary>
/// Gibt eine eindeutige ID für das Gerät zurück.
/// Wird als InstallationId auf Azure Notificationhub verwendet
/// </summary>
/// <returns>Eindeutige ID des Gerätes</returns>
string GetDeviceId();
/// <summary>
/// Gibt die Installations-Infos für die Registrierung am Notificationhub zurück
/// </summary>
/// <param name="tags">Optional: Tags für die Registrierung</param>
/// <returns>Installations-Infos</returns>
DeviceInstallation GetDeviceInstallation(params string[] tags);
/// <summary>
/// Gibt die Installations-Infos für die Registrierung am Notificationhub zurück
/// Diese Variante wartet bis ein token vorhanden ist...
/// </summary>
/// <param name="tags">Optional: Tags für die Registrierung</param>
/// <returns>Installations-Infos</returns>
Task<DeviceInstallation> GetDeviceInstallationAsync(params string[] tags);
}
}