mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Refactor remote variable name.
This commit is contained in:
@@ -56,8 +56,8 @@ namespace DiscImageChef.Devices
|
||||
public int SendScsiCommand(byte[] cdb, ref byte[] buffer, out byte[] senseBuffer, uint timeout,
|
||||
ScsiDirection direction, out double duration, out bool sense)
|
||||
{
|
||||
if (!(remote is null))
|
||||
return remote.SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout,
|
||||
if (!(_remote is null))
|
||||
return _remote.SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout,
|
||||
direction, out duration, out sense);
|
||||
|
||||
return Command.SendScsiCommand(PlatformId, FileHandle, cdb, ref buffer, out senseBuffer, timeout, direction,
|
||||
@@ -86,8 +86,8 @@ namespace DiscImageChef.Devices
|
||||
uint timeout, bool transferBlocks,
|
||||
out double duration, out bool sense)
|
||||
{
|
||||
if (!(remote is null))
|
||||
return remote.SendAtaCommand(registers, out errorRegisters,
|
||||
if (!(_remote is null))
|
||||
return _remote.SendAtaCommand(registers, out errorRegisters,
|
||||
protocol, transferRegister,
|
||||
ref buffer,
|
||||
timeout, transferBlocks,
|
||||
@@ -120,8 +120,8 @@ namespace DiscImageChef.Devices
|
||||
uint timeout, bool transferBlocks,
|
||||
out double duration, out bool sense)
|
||||
{
|
||||
if (!(remote is null))
|
||||
return remote.SendAtaCommand(registers, out errorRegisters,
|
||||
if (!(_remote is null))
|
||||
return _remote.SendAtaCommand(registers, out errorRegisters,
|
||||
protocol, transferRegister,
|
||||
ref buffer,
|
||||
timeout, transferBlocks,
|
||||
@@ -154,8 +154,8 @@ namespace DiscImageChef.Devices
|
||||
uint timeout, bool transferBlocks,
|
||||
out double duration, out bool sense)
|
||||
{
|
||||
if (!(remote is null))
|
||||
return remote.SendAtaCommand(registers, out errorRegisters,
|
||||
if (!(_remote is null))
|
||||
return _remote.SendAtaCommand(registers, out errorRegisters,
|
||||
protocol, transferRegister,
|
||||
ref buffer,
|
||||
timeout, transferBlocks,
|
||||
@@ -236,8 +236,8 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
}
|
||||
|
||||
if (!(remote is null))
|
||||
return remote.SendMmcCommand(command, write, isApplication, flags,
|
||||
if (!(_remote is null))
|
||||
return _remote.SendMmcCommand(command, write, isApplication, flags,
|
||||
argument,
|
||||
blockSize, blocks, ref buffer, out response,
|
||||
out duration, out sense, timeout);
|
||||
|
||||
@@ -74,9 +74,9 @@ namespace DiscImageChef.Devices
|
||||
var host = pieces[0];
|
||||
devicePath = devicePath.Substring(host.Length);
|
||||
|
||||
remote = new Remote.Remote(host);
|
||||
_remote = new Remote.Remote(host);
|
||||
|
||||
Error = !remote.Open(devicePath, out var errno);
|
||||
Error = !_remote.Open(devicePath, out var errno);
|
||||
LastError = errno;
|
||||
}
|
||||
else
|
||||
@@ -162,7 +162,7 @@ namespace DiscImageChef.Devices
|
||||
|
||||
var scsiSense = true;
|
||||
|
||||
if (remote is null)
|
||||
if (_remote is null)
|
||||
{
|
||||
// Windows is answering SCSI INQUIRY for all device types so it needs to be detected first
|
||||
switch (PlatformId)
|
||||
@@ -400,7 +400,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
else
|
||||
{
|
||||
Type = remote.GetDeviceType();
|
||||
Type = _remote.GetDeviceType();
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
@@ -410,7 +410,7 @@ namespace DiscImageChef.Devices
|
||||
break;
|
||||
case DeviceType.SecureDigital:
|
||||
case DeviceType.MMC:
|
||||
if (!remote.GetSdhciRegisters(out cachedCsd, out cachedCid, out cachedOcr, out cachedScr))
|
||||
if (!_remote.GetSdhciRegisters(out cachedCsd, out cachedCid, out cachedOcr, out cachedScr))
|
||||
{
|
||||
Type = DeviceType.SCSI;
|
||||
ScsiType = PeripheralDeviceTypes.DirectAccess;
|
||||
@@ -451,7 +451,7 @@ namespace DiscImageChef.Devices
|
||||
|
||||
#region USB
|
||||
|
||||
if (remote is null)
|
||||
if (_remote is null)
|
||||
{
|
||||
switch (PlatformId)
|
||||
{
|
||||
@@ -558,7 +558,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
else
|
||||
{
|
||||
if (remote.GetUsbData(out var remoteUsbDescriptors, out var remoteUsbVendor,
|
||||
if (_remote.GetUsbData(out var remoteUsbDescriptors, out var remoteUsbVendor,
|
||||
out var remoteUsbProduct, out var remoteUsbManufacturer, out var remoteUsbProductString,
|
||||
out var remoteUsbSerial))
|
||||
{
|
||||
@@ -576,9 +576,9 @@ namespace DiscImageChef.Devices
|
||||
|
||||
#region FireWire
|
||||
|
||||
if (!(remote is null))
|
||||
if (!(_remote is null))
|
||||
{
|
||||
if (remote.GetFireWireData(out firewireVendor, out firewireModel,
|
||||
if (_remote.GetFireWireData(out firewireVendor, out firewireModel,
|
||||
out firewireGuid, out var remoteFireWireVendorName, out var remoteFireWireModelName))
|
||||
{
|
||||
IsFireWire = true;
|
||||
@@ -656,7 +656,7 @@ namespace DiscImageChef.Devices
|
||||
|
||||
#region PCMCIA
|
||||
|
||||
if (remote is null)
|
||||
if (_remote is null)
|
||||
{
|
||||
if (PlatformId == PlatformID.Linux)
|
||||
{
|
||||
@@ -707,7 +707,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
else
|
||||
{
|
||||
if (remote.GetPcmciaData(out var cisBuf))
|
||||
if (_remote.GetPcmciaData(out var cisBuf))
|
||||
{
|
||||
IsPcmcia = true;
|
||||
Cis = cisBuf;
|
||||
|
||||
@@ -218,14 +218,14 @@ namespace DiscImageChef.Devices
|
||||
/// </summary>
|
||||
public byte[] Cis { get; }
|
||||
|
||||
private readonly Remote.Remote remote;
|
||||
private readonly Remote.Remote _remote;
|
||||
|
||||
public bool IsRemote => remote != null;
|
||||
public string RemoteApplication => remote?.ServerApplication;
|
||||
public string RemoteVersion => remote?.ServerVersion;
|
||||
public string RemoteOperatingSystem => remote?.ServerOperatingSystem;
|
||||
public string RemoteOperatingSystemVersion => remote?.ServerOperatingSystemVersion;
|
||||
public string RemoteArchitecture => remote?.ServerArchitecture;
|
||||
public int RemoteProtocolVersion => remote?.ServerProtocolVersion ?? 0;
|
||||
public bool IsRemote => _remote != null;
|
||||
public string RemoteApplication => _remote?.ServerApplication;
|
||||
public string RemoteVersion => _remote?.ServerVersion;
|
||||
public string RemoteOperatingSystem => _remote?.ServerOperatingSystem;
|
||||
public string RemoteOperatingSystemVersion => _remote?.ServerOperatingSystemVersion;
|
||||
public string RemoteArchitecture => _remote?.ServerArchitecture;
|
||||
public int RemoteProtocolVersion => _remote?.ServerProtocolVersion ?? 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user