diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2022-11-06 16:44:44 -0600 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2022-11-06 16:44:44 -0600 |
| commit | f3529715849c1116d98f6b6496fe253b5e15363f (patch) | |
| tree | 8fd928d0d227ec7ea603bae69e3da16900b0b637 /src | |
| parent | f03520a84f7ce90339f0339bb4bd7e7d0d34a856 (diff) | |
| download | slskd-f3529715849c1116d98f6b6496fe253b5e15363f.tar.gz | |
add network state
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Core/State.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/slskd/Core/State.cs b/src/slskd/Core/State.cs index f3fbf03e..8077f685 100644 --- a/src/slskd/Core/State.cs +++ b/src/slskd/Core/State.cs @@ -21,6 +21,7 @@ namespace slskd using System.Collections.Generic; using System.Net; using System.Text.Json.Serialization; + using slskd.Network; using slskd.Users; using Soulseek; @@ -62,6 +63,19 @@ namespace slskd public bool IsTransitioning => State.HasFlag(SoulseekClientStates.Connecting) || State.HasFlag(SoulseekClientStates.Disconnecting) || State.HasFlag(SoulseekClientStates.LoggingIn); } + public record NetworkState + { + public OperationMode Mode { get; init; } + public NetworkControllerState Controller { get; init; } + public IReadOnlyCollection<Agent> Agents { get; init; } + } + + public record NetworkControllerState + { + public string Address { get; init; } + public NetworkClientState State { get; init; } + } + public record UserState { public string Username { get; init; } |
