sharp-chat/SharpChat.Common/Bans/IBanClient.cs

15 lines
753 B
C#
Raw Permalink Normal View History

2022-08-30 15:05:29 +00:00
using SharpChat.Users.Remote;
using System;
using System.Collections.Generic;
using System.Net;
namespace SharpChat.Bans {
public interface IBanClient {
void GetBanList(Action<IEnumerable<IBanRecord>> onSuccess, Action<Exception> onFailure);
void CheckBan(IRemoteUser subject, IPAddress ipAddress, Action<IBanRecord> onSuccess, Action<Exception> onFailure);
void CreateBan(IRemoteUser subject, IRemoteUser moderator, bool perma, TimeSpan duration, string reason, Action<bool> onSuccess, Action<Exception> onFailure);
void RemoveBan(IRemoteUser subject, Action<bool> onSuccess, Action<Exception> onFailure);
void RemoveBan(IPAddress ipAddress, Action<bool> onSuccess, Action<Exception> onFailure);
}
}