mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* DiscImageChef.Devices/Device/Constructor.cs:
Added support for USB on Linux. * DiscImageChef/Commands/DeviceInfo.cs: * DiscImageChef.Devices/Device/Variables.cs: Added support for USB detection and metadata. * DiscImageChef.Devices/Linux/Extern.cs: * DiscImageChef.Devices/Linux/Command.cs: Added readlink(3) support, for getting symlink destinations.
This commit is contained in:
@@ -53,6 +53,13 @@ namespace DiscImageChef.Devices
|
||||
readonly string serial;
|
||||
readonly Decoders.SCSI.PeripheralDeviceTypes scsiType;
|
||||
readonly bool removable;
|
||||
readonly bool usb;
|
||||
readonly ushort usbVendor;
|
||||
readonly ushort usbProduct;
|
||||
readonly byte[] usbDescriptors;
|
||||
readonly string usbManufacturerString;
|
||||
readonly string usbProductString;
|
||||
readonly string usbSerialString;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Platform ID for this device
|
||||
@@ -172,6 +179,10 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the device's SCSI peripheral device type
|
||||
/// </summary>
|
||||
/// <value>The SCSI peripheral device type.</value>
|
||||
public Decoders.SCSI.PeripheralDeviceTypes SCSIType
|
||||
{
|
||||
get
|
||||
@@ -180,6 +191,10 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this device's media is removable.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this device's media is removable; otherwise, <c>false</c>.</value>
|
||||
public bool IsRemovable
|
||||
{
|
||||
get
|
||||
@@ -187,6 +202,90 @@ namespace DiscImageChef.Devices
|
||||
return removable;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this device is attached via USB.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this device is attached via USB; otherwise, <c>false</c>.</value>
|
||||
public bool IsUSB
|
||||
{
|
||||
get
|
||||
{
|
||||
return usb;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB vendor ID.
|
||||
/// </summary>
|
||||
/// <value>The USB vendor ID.</value>
|
||||
public ushort USBVendorID
|
||||
{
|
||||
get
|
||||
{
|
||||
return usbVendor;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB product ID.
|
||||
/// </summary>
|
||||
/// <value>The USB product ID.</value>
|
||||
public ushort USBProductID
|
||||
{
|
||||
get
|
||||
{
|
||||
return usbProduct;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB descriptors.
|
||||
/// </summary>
|
||||
/// <value>The USB descriptors.</value>
|
||||
public byte[] USBDescriptors
|
||||
{
|
||||
get
|
||||
{
|
||||
return usbDescriptors;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB manufacturer string.
|
||||
/// </summary>
|
||||
/// <value>The USB manufacturer string.</value>
|
||||
public string USBManufacturerString
|
||||
{
|
||||
get
|
||||
{
|
||||
return usbManufacturerString;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB product string.
|
||||
/// </summary>
|
||||
/// <value>The USB product string.</value>
|
||||
public string USBProductString
|
||||
{
|
||||
get
|
||||
{
|
||||
return usbProductString;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the USB serial string.
|
||||
/// </summary>
|
||||
/// <value>The USB serial string.</value>
|
||||
public string USBSerialString
|
||||
{
|
||||
get
|
||||
{
|
||||
return usbSerialString;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user