[GUI] Add Device List functionality and remote connection support

This commit is contained in:
2025-11-19 05:05:56 +00:00
parent b748f54dca
commit 98345425f8
12 changed files with 687 additions and 26 deletions

View File

@@ -39,13 +39,13 @@ using Sentry;
namespace Aaru.Devices.Linux;
[SupportedOSPlatform("linux")]
static class ListDevices
public static class ListDevices
{
const string PATH_SYS_DEVBLOCK = "/sys/block/";
/// <summary>Gets a list of all known storage devices on Linux</summary>
/// <returns>List of devices</returns>
internal static DeviceInfo[] GetList()
public static DeviceInfo[] GetList()
{
string[] sysdevs = Directory.GetFileSystemEntries(PATH_SYS_DEVBLOCK, "*", SearchOption.TopDirectoryOnly);
@@ -66,7 +66,7 @@ static class ListDevices
hasUdev = false;
}
for(int i = 0; i < sysdevs.Length; i++)
for(var i = 0; i < sysdevs.Length; i++)
{
devices[i] = new DeviceInfo
{

View File

@@ -44,7 +44,7 @@ using Marshal = System.Runtime.InteropServices.Marshal;
namespace Aaru.Devices.Windows;
[SupportedOSPlatform("windows")]
static class ListDevices
public static class ListDevices
{
/// <summary>Converts a hex dump string to the ASCII string it represents</summary>
/// <param name="hex">Hex dump</param>
@@ -63,7 +63,7 @@ static class ListDevices
/// <summary>Gets a list of all known storage devices on Windows</summary>
/// <returns>List of devices</returns>
[SuppressMessage("ReSharper", "RedundantCatchClause")]
internal static DeviceInfo[] GetList()
public static DeviceInfo[] GetList()
{
var deviceIDs = new List<string>();