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 | |
| parent | d7d4b34c8aa560c847c9e4c4a14de65a8826b923 (diff) | |
| download | slskd-ad8f173adf8902ef42e2a1f70c675373cbb06950.tar.gz | |
rename Peer namespace to Users
Diffstat (limited to 'src/slskd/Application')
| -rw-r--r-- | src/slskd/Application/Application.cs | 2 | ||||
| -rw-r--r-- | src/slskd/Application/Users/API/Controllers/UsersController.cs (renamed from src/slskd/Application/Peer/API/Controllers/PeersController.cs) | 12 | ||||
| -rw-r--r-- | src/slskd/Application/Users/API/DTO/UserDataResponse.cs (renamed from src/slskd/Application/Peer/API/DTO/UserDataResponse.cs) | 2 | ||||
| -rw-r--r-- | src/slskd/Application/Users/BrowseTracker.cs (renamed from src/slskd/Application/Peer/BrowseTracker.cs) | 2 | ||||
| -rw-r--r-- | src/slskd/Application/Users/Domain/Info.cs (renamed from src/slskd/Application/Peer/Domain/Info.cs) | 2 | ||||
| -rw-r--r-- | src/slskd/Application/Users/Domain/Status.cs (renamed from src/slskd/Application/Peer/Domain/Status.cs) | 2 | ||||
| -rw-r--r-- | src/slskd/Application/Users/IBrowseTracker.cs (renamed from src/slskd/Application/Peer/IBrowseTracker.cs) | 2 | ||||
| -rw-r--r-- | src/slskd/Application/Users/IUserService.cs (renamed from src/slskd/Application/Peer/IPeerService.cs) | 6 | ||||
| -rw-r--r-- | src/slskd/Application/Users/UserDbContext.cs (renamed from src/slskd/Application/Peer/PeerDbContext.cs) | 8 | ||||
| -rw-r--r-- | src/slskd/Application/Users/UserService.cs (renamed from src/slskd/Application/Peer/PeerService.cs) | 18 |
10 files changed, 28 insertions, 28 deletions
diff --git a/src/slskd/Application/Application.cs b/src/slskd/Application/Application.cs index 32c02f64..2e31722f 100644 --- a/src/slskd/Application/Application.cs +++ b/src/slskd/Application/Application.cs @@ -33,9 +33,9 @@ namespace slskd using slskd.Configuration; using slskd.Integrations.Pushbullet; using slskd.Messaging; - using slskd.Peer; using slskd.Search; using slskd.Transfer; + using slskd.Users; using Soulseek; using Soulseek.Diagnostics; diff --git a/src/slskd/Application/Peer/API/Controllers/PeersController.cs b/src/slskd/Application/Users/API/Controllers/UsersController.cs index ba4d2f43..e7eb5256 100644 --- a/src/slskd/Application/Peer/API/Controllers/PeersController.cs +++ b/src/slskd/Application/Users/API/Controllers/UsersController.cs @@ -1,4 +1,4 @@ -// <copyright file="PeersController.cs" company="slskd Team"> +// <copyright file="UsersController.cs" company="slskd Team"> // Copyright (c) slskd Team. All rights reserved. // // This program is free software: you can redistribute it and/or modify @@ -15,7 +15,7 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> -namespace slskd.Peer.API +namespace slskd.Users.API { using System.Collections.Generic; using System.ComponentModel.DataAnnotations; @@ -33,15 +33,15 @@ namespace slskd.Peer.API [ApiController] [Produces("application/json")] [Consumes("application/json")] - public class PeersController : ControllerBase + public class UsersController : ControllerBase { /// <summary> - /// Initializes a new instance of the <see cref="PeersController"/> class. + /// Initializes a new instance of the <see cref="UsersController"/> class. /// </summary> /// <param name="soulseekClient"></param> /// <param name="browseTracker"></param> /// <param name="peerService"></param> - public PeersController(ISoulseekClient soulseekClient, IBrowseTracker browseTracker, IPeerService peerService) + public UsersController(ISoulseekClient soulseekClient, IBrowseTracker browseTracker, IUserService peerService) { Client = soulseekClient; BrowseTracker = browseTracker; @@ -50,7 +50,7 @@ namespace slskd.Peer.API private IBrowseTracker BrowseTracker { get; } private ISoulseekClient Client { get; } - private IPeerService Peers { get; } + private IUserService Peers { get; } /// <summary> /// Retrieves the address of the specified <paramref name="username"/>. diff --git a/src/slskd/Application/Peer/API/DTO/UserDataResponse.cs b/src/slskd/Application/Users/API/DTO/UserDataResponse.cs index 5a8554df..664b1276 100644 --- a/src/slskd/Application/Peer/API/DTO/UserDataResponse.cs +++ b/src/slskd/Application/Users/API/DTO/UserDataResponse.cs @@ -15,7 +15,7 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> -namespace slskd.Peer.API +namespace slskd.Users.API { using Soulseek; diff --git a/src/slskd/Application/Peer/BrowseTracker.cs b/src/slskd/Application/Users/BrowseTracker.cs index 5fa6b14a..57c7c1d8 100644 --- a/src/slskd/Application/Peer/BrowseTracker.cs +++ b/src/slskd/Application/Users/BrowseTracker.cs @@ -15,7 +15,7 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> -namespace slskd.Peer +namespace slskd.Users { using System.Collections.Concurrent; using Soulseek; diff --git a/src/slskd/Application/Peer/Domain/Info.cs b/src/slskd/Application/Users/Domain/Info.cs index b2d17c8a..aaf19942 100644 --- a/src/slskd/Application/Peer/Domain/Info.cs +++ b/src/slskd/Application/Users/Domain/Info.cs @@ -15,7 +15,7 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> -namespace slskd.Peer +namespace slskd.Users { using System; using System.ComponentModel.DataAnnotations; diff --git a/src/slskd/Application/Peer/Domain/Status.cs b/src/slskd/Application/Users/Domain/Status.cs index 4db4e859..41452e66 100644 --- a/src/slskd/Application/Peer/Domain/Status.cs +++ b/src/slskd/Application/Users/Domain/Status.cs @@ -15,7 +15,7 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> -namespace slskd.Peer +namespace slskd.Users { using Soulseek; diff --git a/src/slskd/Application/Peer/IBrowseTracker.cs b/src/slskd/Application/Users/IBrowseTracker.cs index 606b8a45..29ed06b3 100644 --- a/src/slskd/Application/Peer/IBrowseTracker.cs +++ b/src/slskd/Application/Users/IBrowseTracker.cs @@ -15,7 +15,7 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> -namespace slskd.Peer +namespace slskd.Users { using System.Collections.Concurrent; using Soulseek; diff --git a/src/slskd/Application/Peer/IPeerService.cs b/src/slskd/Application/Users/IUserService.cs index f49cf27b..469acef6 100644 --- a/src/slskd/Application/Peer/IPeerService.cs +++ b/src/slskd/Application/Users/IUserService.cs @@ -1,4 +1,4 @@ -// <copyright file="IPeerService.cs" company="slskd Team"> +// <copyright file="IUserService.cs" company="slskd Team"> // Copyright (c) slskd Team. All rights reserved. // // This program is free software: you can redistribute it and/or modify @@ -15,7 +15,7 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> -namespace slskd.Peer +namespace slskd.Users { using System.Net; using System.Threading.Tasks; @@ -23,7 +23,7 @@ namespace slskd.Peer /// <summary> /// Provides information and operations for network peers. /// </summary> - public interface IPeerService + public interface IUserService { /// <summary> /// Retrieves peer <see cref="Info"/>. diff --git a/src/slskd/Application/Peer/PeerDbContext.cs b/src/slskd/Application/Users/UserDbContext.cs index ee5dfd04..4d0fd08c 100644 --- a/src/slskd/Application/Peer/PeerDbContext.cs +++ b/src/slskd/Application/Users/UserDbContext.cs @@ -1,4 +1,4 @@ -// <copyright file="PeerDbContext.cs" company="slskd Team"> +// <copyright file="UserDbContext.cs" company="slskd Team"> // Copyright (c) slskd Team. All rights reserved. // // This program is free software: you can redistribute it and/or modify @@ -15,13 +15,13 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> -namespace slskd.Peer +namespace slskd.Users { using Microsoft.EntityFrameworkCore; - public class PeerDbContext : DbContext + public class UserDbContext : DbContext { - public PeerDbContext(DbContextOptions<PeerDbContext> options) + public UserDbContext(DbContextOptions<UserDbContext> options) : base(options) { Database.EnsureCreated(); diff --git a/src/slskd/Application/Peer/PeerService.cs b/src/slskd/Application/Users/UserService.cs index 88aa2e94..f52f19f1 100644 --- a/src/slskd/Application/Peer/PeerService.cs +++ b/src/slskd/Application/Users/UserService.cs @@ -1,4 +1,4 @@ -// <copyright file="PeerService.cs" company="slskd Team"> +// <copyright file="UserService.cs" company="slskd Team"> // Copyright (c) slskd Team. All rights reserved. // // This program is free software: you can redistribute it and/or modify @@ -15,7 +15,7 @@ // along with this program. If not, see https://www.gnu.org/licenses/. // </copyright> -namespace slskd.Peer +namespace slskd.Users { using System; using System.Net; @@ -27,20 +27,20 @@ namespace slskd.Peer /// <summary> /// Provides information and operations for network peers. /// </summary> - public class PeerService : IPeerService + public class UserService : IUserService { private const int CacheTTLSeconds = 300; /// <summary> - /// Initializes a new instance of the <see cref="PeerService"/> class. + /// Initializes a new instance of the <see cref="UserService"/> class. /// </summary> /// <param name="soulseekClient"></param> /// <param name="contextFactory">The database context to use.</param> /// <param name="log">The logger.</param> - public PeerService( + public UserService( ISoulseekClient soulseekClient, - IDbContextFactory<PeerDbContext> contextFactory, - ILogger<PeerService> log) + IDbContextFactory<UserDbContext> contextFactory, + ILogger<UserService> log) { Client = soulseekClient; ContextFactory = contextFactory; @@ -48,8 +48,8 @@ namespace slskd.Peer } private ISoulseekClient Client { get; } - private IDbContextFactory<PeerDbContext> ContextFactory { get; } - private ILogger<PeerService> Log { get; set; } + private IDbContextFactory<UserDbContext> ContextFactory { get; } + private ILogger<UserService> Log { get; set; } /// <summary> /// Retrieves peer <see cref="Info"/>. |
