aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Relay/Types
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-11-14 21:09:45 -0600
committerGitHub <noreply@github.com>2022-11-14 21:09:45 -0600
commit3d0af40b9e85ee4dc07665ffdf16449a873a0640 (patch)
tree2761ad1c85408c1524be6d4dd6e0e4ee45b77ec7 /src/slskd/Relay/Types
parent5f2923973dc2fa5b65a602c3f30cf7c5448eda0a (diff)
parent75e7d6accd92a07ae13c7eff16893cf577af255b (diff)
downloadslskd-3d0af40b9e85ee4dc07665ffdf16449a873a0640.tar.gz
Merge pull request #753 from slskd/relay
Rename 'Network' functionality to 'Relay'
Diffstat (limited to 'src/slskd/Relay/Types')
-rw-r--r--src/slskd/Relay/Types/Agent.cs25
-rw-r--r--src/slskd/Relay/Types/OperationMode.cs40
2 files changed, 65 insertions, 0 deletions
diff --git a/src/slskd/Relay/Types/Agent.cs b/src/slskd/Relay/Types/Agent.cs
new file mode 100644
index 00000000..3ed1767e
--- /dev/null
+++ b/src/slskd/Relay/Types/Agent.cs
@@ -0,0 +1,25 @@
+// <copyright file="Agent.cs" company="slskd Team">
+// Copyright (c) slskd Team. All rights reserved.
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see https://www.gnu.org/licenses/.
+// </copyright>
+
+namespace slskd.Relay
+{
+ public record Agent
+ {
+ public string Name { get; init; }
+ public string IPAddress { get; init; }
+ }
+}
diff --git a/src/slskd/Relay/Types/OperationMode.cs b/src/slskd/Relay/Types/OperationMode.cs
new file mode 100644
index 00000000..c572f0da
--- /dev/null
+++ b/src/slskd/Relay/Types/OperationMode.cs
@@ -0,0 +1,40 @@
+// <copyright file="OperationMode.cs" company="slskd Team">
+// Copyright (c) slskd Team. All rights reserved.
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU Affero General Public License as published
+// by the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU Affero General Public License for more details.
+//
+// You should have received a copy of the GNU Affero General Public License
+// along with this program. If not, see https://www.gnu.org/licenses/.
+// </copyright>
+
+namespace slskd.Relay
+{
+ /// <summary>
+ /// The relay operation mode.
+ /// </summary>
+ public enum OperationMode
+ {
+ /// <summary>
+ /// Controller operation mode.
+ /// </summary>
+ Controller = 0,
+
+ /// <summary>
+ /// Agent operation mode.
+ /// </summary>
+ Agent = 1,
+
+ /// <summary>
+ /// Debug mode; enables operation as both a controller and agent.
+ /// </summary>
+ Debug = 2,
+ }
+}