Skip to content

Commit

Permalink
Remove interface header files, they are not useful anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Dec 10, 2024
1 parent 0f30073 commit 15e82a6
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 229 deletions.
32 changes: 0 additions & 32 deletions cpp/base/interfaces/scsi_block_commands.h

This file was deleted.

29 changes: 0 additions & 29 deletions cpp/base/interfaces/scsi_communications_commands.h

This file was deleted.

25 changes: 0 additions & 25 deletions cpp/base/interfaces/scsi_mmc_commands.h

This file was deleted.

34 changes: 0 additions & 34 deletions cpp/base/interfaces/scsi_primary_commands.h

This file was deleted.

28 changes: 0 additions & 28 deletions cpp/base/interfaces/scsi_printer_commands.h

This file was deleted.

32 changes: 0 additions & 32 deletions cpp/base/interfaces/scsi_stream_commands.h

This file was deleted.

21 changes: 8 additions & 13 deletions cpp/base/primary_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
#pragma once

#include <functional>
#include "interfaces/scsi_primary_commands.h"
#include "controllers/abstract_controller.h"
#include "shared/s2p_exceptions.h"
#include "s2p_defs.h"
#include "device.h"

class PrimaryDevice : public ScsiPrimaryCommands, public Device
class PrimaryDevice : public Device
{
friend class AbstractController;
friend class PageHandler;
Expand All @@ -26,8 +25,6 @@ class PrimaryDevice : public ScsiPrimaryCommands, public Device

public:

~PrimaryDevice() override = default;

bool Init();
virtual bool SetUp() = 0;
virtual void CleanUp()
Expand Down Expand Up @@ -111,13 +108,11 @@ class PrimaryDevice : public ScsiPrimaryCommands, public Device
virtual vector<uint8_t> InquiryInternal() const = 0;
void CheckReady();

void Inquiry() override;
void RequestSense() override;


void SendDiagnostic() override;
void ReserveUnit() override;
void ReleaseUnit() override;
virtual void Inquiry();
virtual void RequestSense();
void SendDiagnostic();
void ReserveUnit();
void ReleaseUnit();

virtual int ModeSense6(cdb_t, data_in_t) const
{
Expand Down Expand Up @@ -191,8 +186,8 @@ class PrimaryDevice : public ScsiPrimaryCommands, public Device

void SetController(AbstractController*);

void TestUnitReady() override;
void ReportLuns() override;
void TestUnitReady();
void ReportLuns();

vector<byte> HandleRequestSense() const;

Expand Down
8 changes: 3 additions & 5 deletions cpp/devices/daynaport.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,15 @@
#ifndef __NetBSD__
#include <net/ethernet.h>
#endif
#include "base/interfaces/scsi_communications_commands.h"
#include "base/primary_device.h"
#include "tap_driver.h"

class DaynaPort : public PrimaryDevice, public ScsiCommunicationsCommands
class DaynaPort : public PrimaryDevice
{

public:

explicit DaynaPort(int);
~DaynaPort() override = default;

bool SetUp() override;
void CleanUp() override;
Expand All @@ -50,8 +48,8 @@ class DaynaPort : public PrimaryDevice, public ScsiCommunicationsCommands
vector<uint8_t> InquiryInternal() const override;
int WriteData(cdb_t, data_out_t, int, int) override;

void GetMessage6() override;
void SendMessage6() const override;
void GetMessage6();
void SendMessage6() const;
void RetrieveStats() const;
void SetInterfaceMode() const;
void SetMcastAddr() const;
Expand Down
17 changes: 8 additions & 9 deletions cpp/devices/disk.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
#pragma once

#include <tuple>
#include "base/interfaces/scsi_block_commands.h"
#include "storage_device.h"

using namespace std;

class Cache;

class Disk : public StorageDevice, public ScsiBlockCommands
class Disk : public StorageDevice
{

public:
Expand Down Expand Up @@ -82,32 +81,32 @@ class Disk : public StorageDevice, public ScsiBlockCommands
{
Read(RW6);
}
void Read10() override
void Read10()
{
Read(RW10);
}
void Read16() override
void Read16()
{
Read(RW16);
}
virtual void Write6()
{
Write(RW6);
}
void Write10() override
void Write10()
{
Write(RW10);
}
void Write16() override
void Write16()
{
Write(RW16);
}
void ReAssignBlocks();
void Seek10();
void ReadCapacity10() override;
void ReadCapacity16() override;
void ReadCapacity10();
void ReadCapacity16();
void ReadFormatCapacities();
void FormatUnit() override;
void FormatUnit();
void Seek6();
void Read(access_mode);
void Write(access_mode);
Expand Down
6 changes: 2 additions & 4 deletions cpp/devices/printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@

#include <fstream>
#include <unordered_map>
#include "base/interfaces/scsi_printer_commands.h"
#include "base/primary_device.h"

using namespace std;

class Printer : public PrimaryDevice, public ScsiPrinterCommands
class Printer : public PrimaryDevice
{

public:

explicit Printer(int);
~Printer() override = default;

bool SetUp() override;
void CleanUp() override;
Expand All @@ -39,7 +37,7 @@ class Printer : public PrimaryDevice, public ScsiPrinterCommands

private:

void Print() override;
void Print();
void SynchronizeBuffer();

string file_template;
Expand Down
5 changes: 2 additions & 3 deletions cpp/devices/scsi_cd.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@

#pragma once

#include "base/interfaces/scsi_mmc_commands.h"
#include "disk.h"

class ScsiCd : public Disk, public ScsiMmcCommands
class ScsiCd : public Disk
{

public:
Expand All @@ -33,7 +32,7 @@ class ScsiCd : public Disk, public ScsiMmcCommands

private:

void ReadToc() override;
void ReadToc();

void CreateDataTrack();

Expand Down
7 changes: 1 addition & 6 deletions cpp/devices/tape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ bool Tape::SetUp()
});
AddCommand(scsi_command::write_filemarks_6, [this]
{
WriteFilemarks6();
WriteFilemarks(false);
});
AddCommand(scsi_command::write_filemarks_16, [this]
{
Expand Down Expand Up @@ -466,11 +466,6 @@ void Tape::Space6()
StatusPhase();
}

void Tape::WriteFilemarks6()
{
WriteFilemarks(false);
}

void Tape::WriteFilemarks(bool write_filemarks_16)
{
if (tar_file) {
Expand Down
Loading

0 comments on commit 15e82a6

Please sign in to comment.