// // Licensed under the MIT License. See LICENSE file in the project root for full license information. // namespace MUnique.OpenMU.Interfaces; using System.Collections.Immutable; /// /// Interface for an object which subscribes for changes in the friends system. /// public interface IFriendSystemSubscriber { /// /// Notifies the game server that a letter got received for an online player. /// /// The letter header. ValueTask LetterReceivedAsync(LetterHeader letter); /// /// Notifies the server that a player made a friend request to another player, which is online on this server. /// /// The requester. /// The receiver. ValueTask FriendRequestAsync(string requester, string receiver); /// /// Notifies the game server that a friend online state changed. /// /// The player who is playing on the server, and needs to get notified. /// The friend whose state changed. /// The new server identifier of the . ValueTask FriendOnlineStateChangedAsync(string player, string friend, int serverId); /// /// Notifies the game server that a chat room got created on the chat server for a player which is online on this game server. /// /// Authentication information of the player who should get notified about the created chat room. /// Name of the friend player which is expected to be in the chat room. ValueTask ChatRoomCreatedAsync(ChatServerAuthenticationInfo playerAuthenticationInfo, string friendName); /// /// Initializes the messenger of a player. /// /// The initialization data. ValueTask InitializeMessengerAsync(MessengerInitializationData initializationData); } /// /// The data of a messenger initialization for . /// public record MessengerInitializationData(string PlayerName, IImmutableList Friends, IImmutableList OpenFriendRequests);