astral-api/Astral.Services/Interfaces/IUserPresenceService.cs

31 lines
881 B
C#
Raw Normal View History

2024-12-15 17:06:14 +01:00
// <copyright file="IUserPresenceService.cs" company="alveus.dev">
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
// </copyright>
using Astral.Services.Dtos;
namespace Astral.Services.Interfaces;
/// <summary>
/// User's presence service.
/// </summary>
public interface IUserPresenceService
{
/// <summary>
/// Process a user's heartbeat.
/// </summary>
Task HandleHeartbeat();
/// <summary>
/// Process a user's heartbeat with location.
/// </summary>
/// <param name="heartbeat">Instance of <see cref="UserLocationHeartbeatDto"/>.</param>
Task ConsumeLocationHeartbeat(UserLocationHeartbeatDto heartbeat);
/// <summary>
/// Update the user's public key.
/// </summary>
/// <param name="publicKey">Stream containing the public key.</param>
Task ConsumePublicKey(Stream publicKey);
}