33 lines
1.5 KiB
C#
33 lines
1.5 KiB
C#
using GoveeCSharpConnector.Objects;
|
|
|
|
namespace GoveeCSharpConnector.Interfaces;
|
|
|
|
public interface IGoveeUdpService {
|
|
|
|
bool IsListening();
|
|
void StopUdpListener();
|
|
Task StartUdpListenerAsync();
|
|
Task<IList<GoveeUdpDevice>> GetDevicesAsync(TimeSpan? timeout = null);
|
|
void ToggleDevice(string deviceAddress, bool on, int uniCastPort = 4003);
|
|
void SetColor(string deviceAddress, RgbColor color, int uniCastPort = 4003);
|
|
void SetBrightness(string deviceAddress, int brightness, int uniCastPort = 4003);
|
|
void SetColorTemp(string deviceAddress, int colorTempInKelvin, int uniCastPort = 4003);
|
|
Task<GoveeUdpState> GetStateAsync(string deviceAddress, int uniCastPort = 4003, TimeSpan? timeout = null);
|
|
|
|
// void StartUdpListener();
|
|
// Task<ReadOnlyCollection<GoveeUdpDevice>> GetDevices(TimeSpan? timeout = null);
|
|
// Task<GoveeUdpState> GetState(string deviceAddress, int uniCastPort = 4003, TimeSpan? timeout = null);
|
|
|
|
// public async Task<ReadOnlyCollection<GoveeUdpDevice>> GetDevices(TimeSpan? timeout = null) =>
|
|
// new([.. (await GetDevicesAsync(timeout))]);
|
|
|
|
// public async Task<GoveeUdpState> GetState(string deviceAddress, int uniCastPort = 4003, TimeSpan? timeout = null) =>
|
|
// await GetStateAsync(deviceAddress, uniCastPort, timeout);
|
|
|
|
// public async void StartUdpListener() =>
|
|
// await StartUdpListenerAsync();
|
|
|
|
// private async void SetupUdpClientListener() =>
|
|
// await SetupUdpClientListenerAsync();
|
|
|
|
} |