Added some device static values to variables.

This commit is contained in:
2015-10-19 04:46:09 +01:00
parent efcc294202
commit 4cf5e18059
4 changed files with 85 additions and 0 deletions

View File

@@ -1,3 +1,10 @@
2015-10-19 Natalia Portillo <claunia@claunia.com>
* Enums.cs:
* Device/Variables.cs:
* Device/Constructor.cs:
Added some device static values to variables.
2015-10-19 Natalia Portillo <claunia@claunia.com>
* Enums.cs:

View File

@@ -88,6 +88,8 @@ namespace DiscImageChef.Devices
default:
throw new InvalidOperationException(String.Format("Platform {0} not yet supported.", platformID));
}
type = DeviceType.Unknown;
}
}
}

View File

@@ -46,6 +46,11 @@ namespace DiscImageChef.Devices
object fd;
bool error;
int lastError;
DeviceType type;
string manufacturer;
string model;
string revision;
string serial;
/// <summary>
/// Gets the Platform ID for this device
@@ -104,6 +109,66 @@ namespace DiscImageChef.Devices
return lastError;
}
}
/// <summary>
/// Gets the device type.
/// </summary>
/// <value>The device type.</value>
public DeviceType Type
{
get
{
return type;
}
}
/// <summary>
/// Gets the device's manufacturer
/// </summary>
/// <value>The manufacturer.</value>
public string Manufacturer
{
get
{
return manufacturer;
}
}
/// <summary>
/// Gets the device model
/// </summary>
/// <value>The model.</value>
public string Model
{
get
{
return model;
}
}
/// <summary>
/// Gets the device's revision.
/// </summary>
/// <value>The revision.</value>
public string Revision
{
get
{
return revision;
}
}
/// <summary>
/// Gets the device's serial number.
/// </summary>
/// <value>The serial number.</value>
public string Serial
{
get
{
return serial;
}
}
}
}

View File

@@ -40,6 +40,17 @@ using System;
namespace DiscImageChef.Devices
{
public enum DeviceType
{
Unknown,
ATA,
ATAPI,
SCSI,
SecureDigital,
MMC,
NVMe
}
#region ATA Commands
/// <summary>
/// All known ATA commands