smartmontools SVN Rev 3317
Utility to control and monitor storage systems with "S.M.A.R.T."
dev_ata_cmd_set.h
Go to the documentation of this file.
00001 /*
00002  * dev_ata_cmd_set.h
00003  *
00004  * Home page of code is: http://smartmontools.sourceforge.net
00005  *
00006  * Copyright (C) 2008 Christian Franke <smartmontools-support@lists.sourceforge.net>
00007  *
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2, or (at your option)
00011  * any later version.
00012  *
00013  * You should have received a copy of the GNU General Public License
00014  * (for example COPYING); If not, see <http://www.gnu.org/licenses/>.
00015  *
00016  */
00017 
00018 #ifndef DEV_ATA_CMD_SET_H
00019 #define DEV_ATA_CMD_SET_H
00020 
00021 #define DEV_ATA_CMD_SET_H_CVSID "$Id: dev_ata_cmd_set.h,v 1.3 2008/08/23 21:32:12 chrfranke Exp $\n"
00022 
00023 #include "atacmds.h" // smart_command_set
00024 #include "dev_interface.h"
00025 
00026 /////////////////////////////////////////////////////////////////////////////
00027 // ata_device_with_command_set
00028 
00029 /// Adapter class to implement new ATA pass through old interface.
00030 
00031 class ata_device_with_command_set
00032 : public /*implements*/ ata_device
00033 {
00034 public:
00035   /// ATA pass through mapped to ata_command_interface().
00036   virtual bool ata_pass_through(const ata_cmd_in & in, ata_cmd_out & out);
00037 
00038 protected:
00039   /// Old ATA interface called by ata_pass_through()
00040   virtual int ata_command_interface(smart_command_set command, int select, char * data) = 0;
00041 
00042   ata_device_with_command_set()
00043     : smart_device(never_called) { }
00044 };
00045 
00046 #endif // DEV_ATA_CMD_SET_H