refactoring
This commit is contained in:
parent
49826eae4a
commit
8e8f4d3896
367 changed files with 217 additions and 364 deletions
35
src/Yavsc.Server/Interfaces/IConnexionManager.cs
Normal file
35
src/Yavsc.Server/Interfaces/IConnexionManager.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Yavsc.ViewModels.Chat;
|
||||
|
||||
namespace Yavsc.Services
|
||||
{
|
||||
public interface IConnexionManager {
|
||||
void SetUserName(string cxId, string userName);
|
||||
|
||||
string GetUserName (string cxId);
|
||||
void OnConnected(string cxId, bool isCop);
|
||||
bool IsConnected(string candidate);
|
||||
|
||||
void OnDisctonnected (string cxId);
|
||||
bool IsPresent(string roomName, string userName);
|
||||
|
||||
ChatRoomInfo Join(string roomName, string cxId);
|
||||
|
||||
bool Part(string cxId, string roomName, string reason);
|
||||
|
||||
bool Kick(string cxId, string userName, string roomName, string reason);
|
||||
|
||||
bool Op(string roomName, string userName);
|
||||
bool Deop(string roomName, string userName);
|
||||
bool Hop(string roomName, string userName);
|
||||
bool Dehop(string roomName, string userName);
|
||||
bool TryGetChanInfo(string room, out ChatRoomInfo chanInfo);
|
||||
|
||||
IEnumerable<string> GetConnexionIds(string userName);
|
||||
|
||||
void SetErrorHandler(Action<string,string> errorHandler);
|
||||
IEnumerable<ChannelShortInfo> ListChannels(string pattern);
|
||||
|
||||
}
|
||||
}
|
||||
12
src/Yavsc.Server/Interfaces/IDiskUsageTracker.cs
Normal file
12
src/Yavsc.Server/Interfaces/IDiskUsageTracker.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace Yavsc.Services
|
||||
{
|
||||
|
||||
public interface IDiskUsageTracker
|
||||
{
|
||||
bool GetSpace(string userName, long space);
|
||||
void Release(string userName, long space);
|
||||
}
|
||||
}
|
||||
26
src/Yavsc.Server/Interfaces/ILiveProcessor.cs
Normal file
26
src/Yavsc.Server/Interfaces/ILiveProcessor.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using System.Collections.Concurrent;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.ViewModels.Streaming;
|
||||
|
||||
namespace Yavsc.Services
|
||||
{
|
||||
public interface ILiveProcessor {
|
||||
/// <summary>
|
||||
/// instance keeping reference on
|
||||
/// all collections of casting and listenning websockets
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
ConcurrentDictionary<string, LiveCastHandler> Casters { get; }
|
||||
/// <summary>
|
||||
/// Try and accept websocket from aspnet http context
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> AcceptStream (HttpContext context, ApplicationUser user, string destDir, string fileName);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
15
src/Yavsc.Server/Interfaces/ITrueEmailSender.cs
Normal file
15
src/Yavsc.Server/Interfaces/ITrueEmailSender.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
namespace Yavsc.Interface
|
||||
{
|
||||
public interface ITrueEmailSender
|
||||
{
|
||||
//
|
||||
// Résumé :
|
||||
// This API supports the ASP.NET Core Identity default UI infrastructure and is
|
||||
// not intended to be used directly from your code. This API may change or be removed
|
||||
// in future releases.
|
||||
Task<string> SendEmailAsync(string name, string email, string subject, string htmlMessage);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue