// ReSharper disable EventNeverSubscribedTo.Global
using System;
using System.Collections.Generic;
namespace RGB.NET.Core;
///
/// Represents a generic device provider.
///
public interface IRGBDeviceProvider : IDisposable
{
#region Properties & Fields
///
/// Indicates if the used SDK is initialized and ready to use.
///
bool IsInitialized { get; }
///
/// Indicates if exceptions in the device provider are thrown or silently ignored.
///
///
/// This should only be set to true for debugging/development purposes.
/// Production code should use the -Event to handle exceptions.
///
bool ThrowsExceptions { get; }
///
/// Gets a collection of loaded by this .
///
IReadOnlyList Devices { get; }
///
/// Gets a collection registered to this device provider.
///
IReadOnlyList<(int id, IDeviceUpdateTrigger trigger)> UpdateTriggers { get; }
#endregion
#region Events
///
/// Occurs when an exception is thrown in the device provider.
///
event EventHandler? Exception;
///
/// Occures when the devices provided by this device provider changed.
///
event EventHandler? DevicesChanged;
#endregion
#region Methods
///
/// Initializes the device provider and loads available devices.
///
/// -flags to filter the devices to load.
/// Specifies if exceptions should be thrown or silently be ignored.
/// true if the initialization was successful; false otherwise.
bool Initialize(RGBDeviceType loadFilter = RGBDeviceType.All, bool throwExceptions = false);
#endregion
}