2023-05-07 08:07:24 +02:00
|
|
|
|
using Content.Shared.DeviceLinking;
|
|
|
|
|
|
using Robust.Shared.Serialization;
|
2022-06-10 03:28:24 +02:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.DeviceNetwork;
|
|
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public sealed class NetworkConfiguratorUserInterfaceState : BoundUserInterfaceState
|
|
|
|
|
|
{
|
|
|
|
|
|
public readonly HashSet<(string address, string name)> DeviceList;
|
|
|
|
|
|
|
|
|
|
|
|
public NetworkConfiguratorUserInterfaceState(HashSet<(string, string)> deviceList)
|
|
|
|
|
|
{
|
|
|
|
|
|
DeviceList = deviceList;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2022-09-05 18:22:39 -07:00
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public sealed class DeviceListUserInterfaceState : BoundUserInterfaceState
|
|
|
|
|
|
{
|
|
|
|
|
|
public readonly HashSet<(string address, string name)> DeviceList;
|
|
|
|
|
|
|
|
|
|
|
|
public DeviceListUserInterfaceState(HashSet<(string address, string name)> deviceList)
|
|
|
|
|
|
{
|
|
|
|
|
|
DeviceList = deviceList;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-05-07 08:07:24 +02:00
|
|
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
|
public sealed class DeviceLinkUserInterfaceState : BoundUserInterfaceState
|
|
|
|
|
|
{
|
|
|
|
|
|
public readonly List<SourcePortPrototype> Sources;
|
|
|
|
|
|
public readonly List<SinkPortPrototype> Sinks;
|
|
|
|
|
|
public readonly HashSet<(string source, string sink)> Links;
|
|
|
|
|
|
public readonly List<(string source, string sink)>? Defaults;
|
|
|
|
|
|
public readonly string SourceAddress;
|
|
|
|
|
|
public readonly string SinkAddress;
|
|
|
|
|
|
|
|
|
|
|
|
public DeviceLinkUserInterfaceState(List<SourcePortPrototype> sources, List<SinkPortPrototype> sinks, HashSet<(string source, string sink)> links, string sourceAddress, string sinkAddress, List<(string source, string sink)>? defaults = default)
|
|
|
|
|
|
{
|
|
|
|
|
|
Links = links;
|
|
|
|
|
|
SourceAddress = sourceAddress;
|
|
|
|
|
|
SinkAddress = sinkAddress;
|
|
|
|
|
|
Defaults = defaults;
|
|
|
|
|
|
Sources = sources;
|
|
|
|
|
|
Sinks = sinks;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|