31 lines
881 B
C#
31 lines
881 B
C#
|
// <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);
|
||
|
}
|