Reviewed and Updated models for Shared project
This commit is contained in:
48
RelayShared/Services/SocketTransmissions.cs
Normal file
48
RelayShared/Services/SocketTransmissions.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
namespace RelayShared.Services;
|
||||
|
||||
//TODO: review name of file, potentially rename for Encryption services rather than sockets
|
||||
|
||||
public sealed class SocketRtcSignalMessage
|
||||
{
|
||||
public SignalType Type { get; set; }
|
||||
public string SenderUsername { get; set; } = string.Empty;
|
||||
public string ChannelId { get; set; } = string.Empty;
|
||||
public string CipherText { get; set; } = string.Empty;
|
||||
public string Nonce { get; set; } = string.Empty;
|
||||
public string Tag { get; set; } = string.Empty;
|
||||
public string EncryptedKey { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class SocketEncryptedMessage
|
||||
{
|
||||
public SignalType Type { get; set; } = SignalType.EncryptedChat;
|
||||
public string SenderUsername { get; set; } = string.Empty;
|
||||
public string RecipientUsername { get; set; } = string.Empty;
|
||||
public string ChannelId { get; set; } = string.Empty;
|
||||
public string CipherText { get; set; } = string.Empty;
|
||||
public string Nonce { get; set; } = string.Empty;
|
||||
public string Tag { get; set; } = string.Empty;
|
||||
public string EncryptedKey { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public sealed class ServerPublicKeyMessage
|
||||
{
|
||||
public SignalType Type { get; set; } = SignalType.ServerPublicKey;
|
||||
public string PublicKey { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public enum SignalType
|
||||
{
|
||||
Offer,
|
||||
Answer,
|
||||
Candidate,
|
||||
OfferUpdated,
|
||||
AnswerUpdated,
|
||||
CandidateAdded,
|
||||
CallLeft,
|
||||
ChannelList,
|
||||
ServerPublicKey,
|
||||
EncryptedSignal,
|
||||
EncryptedChat,
|
||||
ClientEncryptedChat
|
||||
}
|
||||
Reference in New Issue
Block a user