diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-09-20 08:49:19 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-09-20 08:49:19 -0500 |
| commit | ad8f173adf8902ef42e2a1f70c675373cbb06950 (patch) | |
| tree | ebf7c142161d6f96bc093765f4a822d0bc9464d5 /src/slskd/Application/Peer/Domain | |
| parent | d7d4b34c8aa560c847c9e4c4a14de65a8826b923 (diff) | |
| download | slskd-ad8f173adf8902ef42e2a1f70c675373cbb06950.tar.gz | |
rename Peer namespace to Users
Diffstat (limited to 'src/slskd/Application/Peer/Domain')
| -rw-r--r-- | src/slskd/Application/Peer/Domain/Info.cs | 51 | ||||
| -rw-r--r-- | src/slskd/Application/Peer/Domain/Status.cs | 36 |
2 files changed, 0 insertions, 87 deletions
diff --git a/src/slskd/Application/Peer/Domain/Info.cs b/src/slskd/Application/Peer/Domain/Info.cs deleted file mode 100644 index b2d17c8a..00000000 --- a/src/slskd/Application/Peer/Domain/Info.cs +++ /dev/null @@ -1,51 +0,0 @@ -// <copyright file="Info.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.Peer -{ - using System; - using System.ComponentModel.DataAnnotations; - using Soulseek; - - public class Info - { - [Key] - public string Username { get; init; } - public string Description { get; init; } - public bool HasFreeUploadSlot { get; init; } - public bool HasPicture { get; init; } - public byte[] Picture { get; init; } - public int QueueLength { get; init; } - public int UploadSlots { get; init; } - public DateTime UpdatedAt { get; init; } - - public static Info FromSoulseekUserInfo(string username, UserInfo info) - { - return new Info() - { - Username = username, - Description = info.Description, - HasFreeUploadSlot = info.HasFreeUploadSlot, - HasPicture = info.HasPicture, - Picture = info.Picture, - QueueLength = info.QueueLength, - UploadSlots = info.UploadSlots, - UpdatedAt = DateTime.UtcNow, - }; - } - } -} diff --git a/src/slskd/Application/Peer/Domain/Status.cs b/src/slskd/Application/Peer/Domain/Status.cs deleted file mode 100644 index 4db4e859..00000000 --- a/src/slskd/Application/Peer/Domain/Status.cs +++ /dev/null @@ -1,36 +0,0 @@ -// <copyright file="Status.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.Peer -{ - using Soulseek; - - public class Status - { - public bool IsPrivileged { get; init; } - public UserPresence Presence { get; init; } - - public static Status FromSoulseekUserStatus(UserStatus status) - { - return new Status() - { - IsPrivileged = status.IsPrivileged, - Presence = status.Presence, - }; - } - } -} |
