From 050be311e68bb316cfc40fbd23bfd5a812e1a060 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 14 Jun 2021 20:03:36 -0500 Subject: move stuff around --- src/slskd/API/DTO/UserDataResponse.cs | 85 ----------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 src/slskd/API/DTO/UserDataResponse.cs (limited to 'src/slskd/API/DTO/UserDataResponse.cs') diff --git a/src/slskd/API/DTO/UserDataResponse.cs b/src/slskd/API/DTO/UserDataResponse.cs deleted file mode 100644 index e854922e..00000000 --- a/src/slskd/API/DTO/UserDataResponse.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// 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/. -// - -namespace slskd.API.DTO -{ - using Soulseek; - - public class UserDataResponse - { - /// - /// The average upload speed of the user. - /// - public int AverageSpeed { get; set; } - - /// - /// The user's country code, if provided. - /// - public string CountryCode { get; set; } - - /// - /// The number of directories shared by the user. - /// - public int DirectoryCount { get; set; } - - /// - /// The number of active user downloads. - /// - public long DownloadCount { get; set; } - - /// - /// The number of files shared by the user. - /// - public int FileCount { get; set; } - - /// - /// A value indicating whether this user data belongs to the currently logged in user. - /// - public bool? Self { get; set; } - - /// - /// The number of the user's free download slots, if provided. - /// - public int? SlotsFree { get; set; } - - /// - /// The status of the user (0 = offline, 1 = away, 2 = online). - /// - public UserPresence Status { get; set; } - - /// - /// The username of the user. - /// - public string Username { get; set; } - - public static UserDataResponse FromUserData(UserData userData, bool self = false) - { - return new UserDataResponse() - { - AverageSpeed = userData.AverageSpeed, - CountryCode = userData.CountryCode, - DirectoryCount = userData.DirectoryCount, - DownloadCount = userData.DownloadCount, - FileCount = userData.FileCount, - SlotsFree = userData.SlotsFree, - Status = userData.Status, - Username = userData.Username, - Self = self ? self : (bool?)null, - }; - } - } -} \ No newline at end of file -- cgit v1.2.3