2024-01-25 11:25:27 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
namespace osu.Game.Online.Chat
|
|
|
|
{
|
2024-01-25 13:46:39 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Interface for consuming online chat.
|
|
|
|
/// </summary>
|
2024-01-25 11:25:27 +00:00
|
|
|
public interface IChatClient : IDisposable
|
|
|
|
{
|
2024-01-25 13:46:39 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Fired when a <see cref="Channel"/> has been joined.
|
|
|
|
/// </summary>
|
2024-01-25 11:25:27 +00:00
|
|
|
event Action<Channel>? ChannelJoined;
|
2024-01-25 13:46:39 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Fired when a <see cref="Channel"/> has been parted.
|
|
|
|
/// </summary>
|
2024-01-25 11:25:27 +00:00
|
|
|
event Action<Channel>? ChannelParted;
|
2024-01-25 13:46:39 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Fired when new <see cref="Message"/>s have arrived from the server.
|
|
|
|
/// </summary>
|
2024-01-25 11:25:27 +00:00
|
|
|
event Action<List<Message>>? NewMessages;
|
|
|
|
|
2024-01-25 13:46:39 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Requests presence information from the server.
|
|
|
|
/// </summary>
|
|
|
|
void RequestPresence();
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Fired when the initial user presence information has been received.
|
|
|
|
/// </summary>
|
|
|
|
event Action? PresenceReceived;
|
2024-01-25 11:25:27 +00:00
|
|
|
}
|
|
|
|
}
|