]> git.proxmox.com Git - mirror_smartmontools-debian.git/blob - dev_ata_cmd_set.h
import smartmontools 7.0
[mirror_smartmontools-debian.git] / dev_ata_cmd_set.h
1 /*
2 * dev_ata_cmd_set.h
3 *
4 * Home page of code is: http://www.smartmontools.org
5 *
6 * Copyright (C) 2008 Christian Franke
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11 #ifndef DEV_ATA_CMD_SET_H
12 #define DEV_ATA_CMD_SET_H
13
14 #define DEV_ATA_CMD_SET_H_CVSID "$Id: dev_ata_cmd_set.h 4760 2018-08-19 18:45:53Z chrfranke $"
15
16 #include "atacmds.h" // smart_command_set
17 #include "dev_interface.h"
18
19 /////////////////////////////////////////////////////////////////////////////
20 // ata_device_with_command_set
21
22 /// Adapter class to implement new ATA pass through old interface.
23
24 class ata_device_with_command_set
25 : public /*implements*/ ata_device
26 {
27 public:
28 /// ATA pass through mapped to ata_command_interface().
29 virtual bool ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out);
30
31 protected:
32 /// Old ATA interface called by ata_pass_through()
33 virtual int ata_command_interface(smart_command_set command, int select, char * data) = 0;
34
35 ata_device_with_command_set()
36 : smart_device(never_called) { }
37 };
38
39 #endif // DEV_ATA_CMD_SET_H