2021-02-23 18:03:37 +08:00
|
|
|
using System;
|
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using BililiveRecorder.Core.Api.Danmaku;
|
2022-08-25 18:42:36 +08:00
|
|
|
using BililiveRecorder.Core.Config;
|
2021-02-23 18:03:37 +08:00
|
|
|
|
|
|
|
namespace BililiveRecorder.Core.Api
|
|
|
|
{
|
2022-05-16 23:28:31 +08:00
|
|
|
internal interface IDanmakuClient : IDisposable
|
2021-02-23 18:03:37 +08:00
|
|
|
{
|
|
|
|
bool Connected { get; }
|
|
|
|
|
|
|
|
event EventHandler<StatusChangedEventArgs>? StatusChanged;
|
|
|
|
event EventHandler<DanmakuReceivedEventArgs>? DanmakuReceived;
|
|
|
|
|
2023-07-06 06:37:48 +08:00
|
|
|
Func<string, string?>? BeforeHandshake { get; set; }
|
|
|
|
|
2022-08-25 18:42:36 +08:00
|
|
|
Task ConnectAsync(int roomid, DanmakuTransportMode transportMode, CancellationToken cancellationToken);
|
2021-02-23 18:03:37 +08:00
|
|
|
Task DisconnectAsync();
|
|
|
|
}
|
|
|
|
}
|