// 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.
///
bool ThrowsExceptions { get; }
///
/// Gets a collection of loaded by this .
///
IEnumerable 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;
#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
}