ILightManagerService.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using TeamAAS_VP.Core.Lights;
  7. using TeamAAS_VP.Models;
  8. using TeamAAS_VP.Models.Lights;
  9. namespace TeamAAS_VP.Interfaces
  10. {
  11. public interface ILightManagerService
  12. {
  13. event EventHandler<LightControllerEventArgs> ControllerAdded;
  14. event EventHandler<LightControllerEventArgs> ControllerRemoved;
  15. event EventHandler<LightChannelEventArgs> ChannelStatusChanged;
  16. IReadOnlyDictionary<int, ILightController> Controllers { get; }
  17. IReadOnlyDictionary<int, ILightChannel> GlobalChannels { get; }
  18. Task<ILightController> RegisterControllerAsync(int id, LightControllerConfig configuration);
  19. Task<bool> UnregisterControllerAsync(int controllerId);
  20. Task<bool> SetGlobalChannelBrightnessAsync(int globalChannelId, int brightness);
  21. Task<bool> TurnOnGlobalChannelAsync(int globalChannelId);
  22. Task<bool> TurnOffGlobalChannelAsync(int globalChannelId);
  23. Task<bool> ConnectAllAsync();
  24. Task<bool> DisconnectAllAsync();
  25. Task SaveConfigurationAsync(string filePath);
  26. Task LoadConfigurationAsync(string filePath);
  27. }
  28. }