1141cc406Sopenharmony_ci/* sane - Scanner Access Now Easy. 2141cc406Sopenharmony_ci Copyright (C) 1997 Geoffrey T. Dairiki 3141cc406Sopenharmony_ci This file is part of the SANE package. 4141cc406Sopenharmony_ci 5141cc406Sopenharmony_ci This program is free software; you can redistribute it and/or 6141cc406Sopenharmony_ci modify it under the terms of the GNU General Public License as 7141cc406Sopenharmony_ci published by the Free Software Foundation; either version 2 of the 8141cc406Sopenharmony_ci License, or (at your option) any later version. 9141cc406Sopenharmony_ci 10141cc406Sopenharmony_ci This program is distributed in the hope that it will be useful, but 11141cc406Sopenharmony_ci WITHOUT ANY WARRANTY; without even the implied warranty of 12141cc406Sopenharmony_ci MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13141cc406Sopenharmony_ci General Public License for more details. 14141cc406Sopenharmony_ci 15141cc406Sopenharmony_ci You should have received a copy of the GNU General Public License 16141cc406Sopenharmony_ci along with this program. If not, see <https://www.gnu.org/licenses/>. 17141cc406Sopenharmony_ci 18141cc406Sopenharmony_ci As a special exception, the authors of SANE give permission for 19141cc406Sopenharmony_ci additional uses of the libraries contained in this release of SANE. 20141cc406Sopenharmony_ci 21141cc406Sopenharmony_ci The exception is that, if you link a SANE library with other files 22141cc406Sopenharmony_ci to produce an executable, this does not by itself cause the 23141cc406Sopenharmony_ci resulting executable to be covered by the GNU General Public 24141cc406Sopenharmony_ci License. Your use of that executable is in no way restricted on 25141cc406Sopenharmony_ci account of linking the SANE library code into it. 26141cc406Sopenharmony_ci 27141cc406Sopenharmony_ci This exception does not, however, invalidate any other reasons why 28141cc406Sopenharmony_ci the executable file might be covered by the GNU General Public 29141cc406Sopenharmony_ci License. 30141cc406Sopenharmony_ci 31141cc406Sopenharmony_ci If you submit changes to SANE to the maintainers to be included in 32141cc406Sopenharmony_ci a subsequent release, you agree by submitting the changes that 33141cc406Sopenharmony_ci those changes may be distributed with this exception intact. 34141cc406Sopenharmony_ci 35141cc406Sopenharmony_ci If you write modifications of your own for SANE, it is your choice 36141cc406Sopenharmony_ci whether to permit this exception to apply to your modifications. 37141cc406Sopenharmony_ci If you do not wish that, delete this exception notice. 38141cc406Sopenharmony_ci 39141cc406Sopenharmony_ci This file is part of a SANE backend for HP Scanners supporting 40141cc406Sopenharmony_ci HP Scanner Control Language (SCL). 41141cc406Sopenharmony_ci*/ 42141cc406Sopenharmony_ci 43141cc406Sopenharmony_ci#ifndef HP_DEVICE_INCLUDED 44141cc406Sopenharmony_ci#define HP_DEVICE_INCLUDED 45141cc406Sopenharmony_ci#include "hp.h" 46141cc406Sopenharmony_ci 47141cc406Sopenharmony_cienum hp_device_compat_e { 48141cc406Sopenharmony_ci HP_COMPAT_PLUS = 1 << 0, /* HP ScanJet Plus */ 49141cc406Sopenharmony_ci HP_COMPAT_2C = 1 << 1, 50141cc406Sopenharmony_ci HP_COMPAT_2P = 1 << 2, 51141cc406Sopenharmony_ci HP_COMPAT_2CX = 1 << 3, 52141cc406Sopenharmony_ci HP_COMPAT_4C = 1 << 4, /* also 3c, 6100C */ 53141cc406Sopenharmony_ci HP_COMPAT_3P = 1 << 5, 54141cc406Sopenharmony_ci HP_COMPAT_4P = 1 << 6, 55141cc406Sopenharmony_ci HP_COMPAT_5P = 1 << 7, /* also 4100C, 5100C */ 56141cc406Sopenharmony_ci HP_COMPAT_5100C = 1 << 8, /* redundant with 5p */ 57141cc406Sopenharmony_ci HP_COMPAT_PS = 1 << 9, /* HP PhotoSmart Photo Scanner */ 58141cc406Sopenharmony_ci HP_COMPAT_OJ_1150C = 1 << 10, 59141cc406Sopenharmony_ci HP_COMPAT_OJ_1170C = 1 << 11, /* also later OfficeJets */ 60141cc406Sopenharmony_ci HP_COMPAT_6200C = 1 << 12, 61141cc406Sopenharmony_ci HP_COMPAT_5200C = 1 << 13, 62141cc406Sopenharmony_ci HP_COMPAT_6300C = 1 << 14 63141cc406Sopenharmony_ci}; 64141cc406Sopenharmony_ci 65141cc406Sopenharmony_cistruct hp_device_s 66141cc406Sopenharmony_ci{ 67141cc406Sopenharmony_ci HpData data; 68141cc406Sopenharmony_ci HpOptSet options; 69141cc406Sopenharmony_ci SANE_Device sanedev; 70141cc406Sopenharmony_ci enum hp_device_compat_e compat; 71141cc406Sopenharmony_ci}; 72141cc406Sopenharmony_ci 73141cc406Sopenharmony_ciSANE_Status sanei_hp_device_new (HpDevice * new, const char * devname); 74141cc406Sopenharmony_ci 75141cc406Sopenharmony_ciconst SANE_Device * sanei_hp_device_sanedevice (HpDevice this); 76141cc406Sopenharmony_ci 77141cc406Sopenharmony_civoid sanei_hp_device_simulate_clear (const char *devname); 78141cc406Sopenharmony_ciSANE_Status sanei_hp_device_simulate_set (const char *devname, HpScl scl, 79141cc406Sopenharmony_ci int flag); 80141cc406Sopenharmony_ciSANE_Status sanei_hp_device_support_get (const char *devname, HpScl scl, 81141cc406Sopenharmony_ci int *minval, int *maxval); 82141cc406Sopenharmony_ciSANE_Status sanei_hp_device_support_probe (HpScsi scsi); 83141cc406Sopenharmony_ciSANE_Status sanei_hp_device_probe_model (enum hp_device_compat_e *compat, 84141cc406Sopenharmony_ci HpScsi scsi, int *model_num, 85141cc406Sopenharmony_ci const char **model_name); 86141cc406Sopenharmony_ciSANE_Status sanei_hp_device_probe (enum hp_device_compat_e *compat, 87141cc406Sopenharmony_ci HpScsi scsi); 88141cc406Sopenharmony_cihp_bool_t sanei_hp_device_compat (HpDevice this, 89141cc406Sopenharmony_ci enum hp_device_compat_e c); 90141cc406Sopenharmony_ci 91141cc406Sopenharmony_ci 92141cc406Sopenharmony_ci#endif /* HP_DEVICE_INCLUDED */ 93