35 lines
1.2 KiB
C#
35 lines
1.2 KiB
C#
#nullable enable
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using IRCTokens;
|
|
|
|
namespace IRCRobots
|
|
{
|
|
public interface IServer
|
|
{
|
|
public IEnumerable<SentLine> SendRaw(string line, SendPriority sendPriority = SendPriority.Default);
|
|
public IEnumerable<SentLine> Send(Line line, SendPriority sendPriority = SendPriority.Default);
|
|
public void SetThrottle(int rate, float time);
|
|
public (string address, int port) ServerAddress();
|
|
public Task Connect(ITCPTransport transport, ConnectionParams connectionParams);
|
|
public Task Disconnect();
|
|
public void LinePreread(Line line);
|
|
public void LinePresend(Line line);
|
|
public Task LineRead(Line line);
|
|
public Task LineSend(Line line);
|
|
public Task STSPolicy(STSPolicy stsPolicy);
|
|
public Task ResumePolicy(ResumePolicy resumePolicy);
|
|
public bool CapAgreed(ICapability capability);
|
|
public string? CapAvailable(ICapability capability);
|
|
public Task<bool> SASLAuth(SASLParams saslParams);
|
|
}
|
|
|
|
public enum SendPriority
|
|
{
|
|
High = 0,
|
|
Medium = 10,
|
|
Low = 20,
|
|
Default = Medium
|
|
}
|
|
}
|