// /***************************************************************************
// The Disc Image Chef
// ----------------------------------------------------------------------------
//
// Filename : Variables.cs
// Version : 1.0
// Author(s) : Natalia Portillo
//
// Component : Component
//
// Revision : $Revision$
// Last change by : $Author$
// Date : $Date$
//
// --[ Description ] ----------------------------------------------------------
//
// Description
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
//
// ----------------------------------------------------------------------------
// Copyright (C) 2011-2015 Claunia.com
// ****************************************************************************/
// //$Id$
using System;
using Microsoft.Win32.SafeHandles;
namespace DiscImageChef.Devices
{
public partial class Device
{
Interop.PlatformID platformID;
object fd;
bool error;
int lastError;
readonly DeviceType type;
readonly string manufacturer;
readonly string model;
readonly string revision;
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;
readonly bool firewire;
readonly ulong firewireGuid;
readonly uint firewireModel;
readonly string firewireModelName;
readonly uint firewireVendor;
readonly string firewireVendorName;
///
/// Gets the Platform ID for this device
///
/// The Platform ID
public Interop.PlatformID PlatformID
{
get
{
return platformID;
}
}
///
/// Gets the file handle representing this device
///
/// The file handle
public object FileHandle
{
get
{
return fd;
}
}
///
/// Gets or sets the standard timeout for commands sent to this device
///
/// The timeout in seconds
public uint Timeout
{
get;
set;
}
///
/// Gets a value indicating whether this is in error.
///
/// true if error; otherwise, false.
public bool Error
{
get
{
return error;
}
}
///
/// Gets the last error number.
///
/// The last error.
public int LastError
{
get
{
return lastError;
}
}
///
/// Gets the device type.
///
/// The device type.
public DeviceType Type
{
get
{
return type;
}
}
///
/// Gets the device's manufacturer
///
/// The manufacturer.
public string Manufacturer
{
get
{
return manufacturer;
}
}
///
/// Gets the device model
///
/// The model.
public string Model
{
get
{
return model;
}
}
///
/// Gets the device's revision.
///
/// The revision.
public string Revision
{
get
{
return revision;
}
}
///
/// Gets the device's serial number.
///
/// The serial number.
public string Serial
{
get
{
return serial;
}
}
///
/// Gets the device's SCSI peripheral device type
///
/// The SCSI peripheral device type.
public Decoders.SCSI.PeripheralDeviceTypes SCSIType
{
get
{
return scsiType;
}
}
///
/// Gets a value indicating whether this device's media is removable.
///
/// true if this device's media is removable; otherwise, false.
public bool IsRemovable
{
get
{
return removable;
}
}
///
/// Gets a value indicating whether this device is attached via USB.
///
/// true if this device is attached via USB; otherwise, false.
public bool IsUSB
{
get
{
return usb;
}
}
///
/// Gets the USB vendor ID.
///
/// The USB vendor ID.
public ushort USBVendorID
{
get
{
return usbVendor;
}
}
///
/// Gets the USB product ID.
///
/// The USB product ID.
public ushort USBProductID
{
get
{
return usbProduct;
}
}
///
/// Gets the USB descriptors.
///
/// The USB descriptors.
public byte[] USBDescriptors
{
get
{
return usbDescriptors;
}
}
///
/// Gets the USB manufacturer string.
///
/// The USB manufacturer string.
public string USBManufacturerString
{
get
{
return usbManufacturerString;
}
}
///
/// Gets the USB product string.
///
/// The USB product string.
public string USBProductString
{
get
{
return usbProductString;
}
}
///
/// Gets the USB serial string.
///
/// The USB serial string.
public string USBSerialString
{
get
{
return usbSerialString;
}
}
///
/// Gets a value indicating whether this device is attached via FireWire.
///
/// true if this device is attached via FireWire; otherwise, false.
public bool IsFireWire { get { return firewire; } }
///
/// Gets the FireWire GUID
///
/// The FireWire GUID.
public ulong FireWireGUID { get { return firewireGuid; } }
///
/// Gets the FireWire model number
///
/// The FireWire model.
public uint FireWireModel { get { return firewireModel; } }
///
/// Gets the FireWire model name.
///
/// The FireWire model name.
public string FireWireModelName { get { return firewireModelName; } }
///
/// Gets the FireWire vendor number.
///
/// The FireWire vendor number.
public uint FireWireVendor { get { return firewireVendor; } }
///
/// Gets the FireWire vendor name.
///
/// The FireWire vendor name.
public string FireWireVendorName { get { return firewireVendorName; } }
}
}