# Conflicts: # RelayClient/MainPage.xaml.cs # RelayClient/Services/RelaySocketClient.cs # RelayServer/Services/Chat/ChatSocketBehavior.cs # RelayServer/Services/Chat/ConnectedClientService.cs # RelayShared/Services/WsControlMessage.cs
42 lines
891 B
C#
42 lines
891 B
C#
namespace RelayShared.Services;
|
|
|
|
public enum WsAction
|
|
{
|
|
Authenticate,
|
|
RegisterKey,
|
|
GetServerKey,
|
|
GetChannels,
|
|
GetHistory,
|
|
RtcJoin,
|
|
RtcLeave,
|
|
SendTyping,
|
|
GetEditHistory,
|
|
CreateChannel,
|
|
DeleteChannel
|
|
}
|
|
|
|
public enum WsEvent
|
|
{
|
|
Authenticated,
|
|
KeyRegistered,
|
|
Error
|
|
}
|
|
|
|
public sealed class WsControlMessage
|
|
{
|
|
public WsAction Action { get; set; }
|
|
public string? Username { get; set; }
|
|
public string? Token { get; set; }
|
|
public string? PublicKey { get; set; }
|
|
public string? ChannelId { get; set; }
|
|
public string? MessageId { get; set; }
|
|
public string? ChannelName { get; set; }
|
|
public int ChannelType { get; set; } // cast to ChannelType enum
|
|
public string? ChannelGroup { get; set; }
|
|
}
|
|
|
|
public sealed class WsEventMessage
|
|
{
|
|
public WsEvent Event { get; set; }
|
|
public string? Detail { get; set; }
|
|
} |