Official read only mirror of the smartmontools project SVN https://www.smartmontools.org/browser
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
smartmontools/smartmontools/dev_ata_cmd_set.h

39 lines
1002 B

/*
* dev_ata_cmd_set.h
*
* Home page of code is: https://www.smartmontools.org
*
* Copyright (C) 2008-21 Christian Franke
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef DEV_ATA_CMD_SET_H
#define DEV_ATA_CMD_SET_H
#define DEV_ATA_CMD_SET_H_CVSID "$Id$"
#include "atacmds.h" // smart_command_set
#include "dev_interface.h"
/////////////////////////////////////////////////////////////////////////////
// ata_device_with_command_set
/// Adapter class to implement new ATA pass through old interface.
class ata_device_with_command_set
: public /*implements*/ ata_device
{
public:
/// ATA pass through mapped to ata_command_interface().
virtual bool ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out) override;
protected:
/// Old ATA interface called by ata_pass_through()
virtual int ata_command_interface(smart_command_set command, int select, char * data) = 0;
ata_device_with_command_set()
: smart_device(never_called) { }
};
#endif // DEV_ATA_CMD_SET_H