Commit 713723e3 authored by Didier Raboud's avatar Didier Raboud

Imported Upstream version 0.9.9

parent 3602345c
This diff is collapsed.
......@@ -17,10 +17,14 @@ dist_hplip_DATA = $(doc_DATA) hplip.conf
dist_hplip_SCRIPTS = hpssd.py __init__.py hplip.sh
cmddir = $(hplipdir)
dist_cmd_SCRIPTS = align.py info.py print.py toolbox.py clean.py colorcal.py photo.py unload.py probe.py testpage.py makeuri.py check.py fab.py levels.py
dist_cmd_SCRIPTS = align.py info.py print.py toolbox.py clean.py colorcal.py photo.py unload.py testpage.py makeuri.py check.py fab.py levels.py \
sendfax.py setup.py
# hp backend.
cupsdir = $(CUPS_BACKEND_PATH)
cupsppddir = $(CUPS_PPD_PATH)
hpppddir = $(datadir)/ppd/HP
# hp backend.
cups_PROGRAMS = hp
hp_SOURCES = backend/hp/hp.c
hp_LDADD = libhplip-api.la
......@@ -29,18 +33,23 @@ hp_LDADD = libhplip-api.la
sbin_PROGRAMS = hpiod
hpiod_SOURCES = io/hpiod/hpiod.cpp io/hpiod/channel.cpp io/hpiod/device.cpp io/hpiod/mlc.cpp io/hpiod/system.cpp io/hpiod/jddevice.cpp io/hpiod/jetdirect.cpp \
io/hpiod/udevice.cpp io/hpiod/uppdevice.cpp io/hpiod/ppdevice.cpp io/hpiod/pp.cpp io/hpiod/channel.h io/hpiod/device.h io/hpiod/hpiod.h io/hpiod/mlc.h \
io/hpiod/system.h io/hpiod/dot4.cpp io/hpiod/ppdot4.cpp io/hpiod/dot4.h
io/hpiod/system.h io/hpiod/dot4.cpp io/hpiod/ppdot4.cpp io/hpiod/dot4.h io/hpiod/list.h io/hpiod/usbext.c io/hpiod/usbext.h io/hpiod/comp.cpp
# base
basedir = $(hplipdir)/base
dist_base_SCRIPTS = base/maint.py base/codes.py base/g.py base/mfpdtf2.py base/pml.py base/status.py \
dist_base_SCRIPTS = base/maint.py base/codes.py base/g.py base/pml.py base/status.py base/async.py \
base/__init__.py base/mfpdtf.py base/utils.py base/async_qt.py base/kirbybase.py base/service.py \
base/device.py base/logger.py base/msg.py base/slp.py base/exif.py base/strings.py base/magic.py \
base/imagesize.py base/subproc.py
# fax
faxdir = $(hplipdir)/fax
dist_fax_SCRIPTS = fax/fax.py fax/__init__.py
dist_fax_SCRIPTS = fax/fax.py fax/__init__.py fax/coverpages.py
hpfaxdir = $(hplipdir)/fax/backend
dist_hpfax_SCRIPTS = fax/backend/hpfax.py
faxppddir = $(hplipdir)/fax/ppd
dist_faxppd_DATA = fax/ppd/HP-Fax-hplip.ppd
# ptest
noinst_PROGRAMS = ptest
......@@ -120,13 +129,15 @@ dist_ui_SCRIPTS = ui/alignform.py \
ui/paperedgealignform_base.py ui/paperedgealignform.py \
ui/settingsdialog_base.py ui/settingsdialog.py ui/aligntype6form1.py ui/aligntype6form1_base.py ui/aligntype6form2_base.py \
ui/aligntype6form2.py ui/nodevicesform_base.py ui/nodevicesform.py ui/unloadform.py ui/unloadform_base.py \
ui/imagepropertiesdlg_base.py ui/imagepropertiesdlg.py ui/choosedevicedlg.py \
ui/imagepropertiesdlg_base.py ui/imagepropertiesdlg.py ui/choosedevicedlg.py ui/chooseprinterdlg.py \
ui/aboutdlg.py ui/aboutdlg_base.py ui/waitform.py ui/waitform_base.py ui/cleaningform_base.py ui/cleaningform.py \
ui/cleaningform2_base.py ui/cleaningform2.py ui/colorcalform2_base.py ui/colorcalform2.py ui/colorcal4form.py \
ui/colorcal4form_base.py ui/colorcal4form_base.ui ui/printerform.py ui/printerform_base.ui ui/printerform_base.py \
ui/faxaddrbookgroupsform_base.py ui/faxaddrbookgroupeditform_base.py ui/faxaddrbookform_base.py \
ui/faxaddrbookform.py ui/faxaddrbookeditform_base.py ui/align10form.py ui/align10form_base.py \
ui/informationform_base.py ui/informationform.py ui/supportform_base.py ui/supportform.py
ui/informationform_base.py ui/informationform.py ui/supportform_base.py ui/supportform.py \
ui/faxsendjobform_base.py ui/faxsendjobform.py ui/faxsettingsform_base.py ui/faxsettingsform.py \
ui/coverpageform_base.py ui/coverpageform.py
dist_noinst_DATA = ui/unloadform_base.ui ui/colorcalform2_base.ui ui/settingsdialog_base.ui ui/aligntype6form1_base.ui \
ui/aboutdlg_base.ui ui/imagepropertiesdlg_base.ui ui/paperedgealignform_base.ui ui/aligntype6form2_base.ui \
......@@ -134,7 +145,7 @@ dist_noinst_DATA = ui/unloadform_base.ui ui/colorcalform2_base.ui ui/settingsdia
ui/cleaningform2_base.ui ui/waitform_base.ui ui/coloradjform_base.ui ui/faxaddrbookeditform_base.ui \
ui/faxaddrbookform_base.ui ui/faxaddrbookgroupeditform_base.ui ui/faxaddrbookgroupsform_base.ui \
ui/align10form_base.ui ui/informationform_base.ui ui/supportform_base.ui \
plugins/powersettingsdialog_base.ui
plugins/powersettingsdialog_base.ui ui/faxsendjobform_base.ui ui/faxsettingsform_base.ui ui/coverpageform_base.ui
# ui plugins
pluginsdir = $(hplipdir)/plugins
......@@ -192,8 +203,10 @@ install-data-hook: test-destdir
#
# Do full install if not rpm_install.
if [ "$(rpm_install)" = "no" ]; then \
if [ -d $(DESTDIR)$(ICON_PATH) ]; then \
ln -sf $(icondir)/$(ICON_FILE) $(DESTDIR)$(ICON_PATH)/$(ICON_FILE); \
if [ "$(ICON_FILE)" != "" ]; then \
if [ -d $(DESTDIR)$(ICON_PATH) ]; then \
ln -sf $(icondir)/$(ICON_FILE) $(DESTDIR)$(ICON_PATH)/$(ICON_FILE); \
fi \
fi \
fi
#
......@@ -224,7 +237,25 @@ install-data-hook: test-destdir
#
# Edit hpiod.conf in destdir.
echo -e "\n[$(PACKAGE)]\nversion=$(VERSION)\njdprobe=0\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf
echo -e "[dirs]\nhome=$(hplipdir)\nrun=$(rundir)\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf
echo -e "[dirs]\nhome=$(hplipdir)\nrun=$(rundir)\nppd=$(hpppddir)\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf
echo -ne "# Following values are determined at configure time and cannot be changed.\n[configure]\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf
if [ "$(rpm_install)" = "yes" ]; then \
echo -ne "rpm-install=1\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \
else \
echo -ne "rpm-install=0\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \
fi
if [ "$(network_build)" = "yes" ]; then \
echo -ne "network-build=1\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \
else \
echo -ne "network-build=0\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \
fi
if [ "$(pp_build)" = "yes" ]; then \
echo -ne "pp-build=1\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \
else \
echo -ne "pp-build=0\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf; \
fi
echo -ne "internal-tag=$(PACKAGE_BUGREPORT)\n" >> $(DESTDIR)$(hplipdir)/$(PACKAGE).conf;
#
# Edit hpiod.sh in destdir.
sed 's:HPIODDIR=:HPIODDIR=$(sbindir):' < $(DESTDIR)$(hplipdir)/$(PACKAGE).sh > $(DESTDIR)$(hplipdir)/$(PACKAGE).tmp; \
......@@ -251,6 +282,16 @@ install-data-hook: test-destdir
if [ "$(SHADOW)" != "" ]; then \
cp -f data/xml/unreleased/*.xml $(DESTDIR)$(hplipdir)/data/xml/; \
fi
#
# Install fax support. Let hpijs symlink hpppddir to cupsppddir.
mv $(DESTDIR)$(hpfaxdir)/hpfax.py $(DESTDIR)$(hpfaxdir)/hpfax
if [ "$(rpm_install)" = "no" ]; then \
$(mkinstalldirs) $(DESTDIR)$(cupsdir); \
$(INSTALL_SCRIPT) $(DESTDIR)$(hpfaxdir)/hpfax $(DESTDIR)$(cupsdir); \
$(mkinstalldirs) $(DESTDIR)$(hpppddir); \
$(INSTALL_SCRIPT) $(DESTDIR)$(faxppddir)/HP-Fax-hplip.ppd $(DESTDIR)$(hpppddir); \
gzip -qf $(DESTDIR)$(hpppddir)/HP-Fax-hplip.ppd; \
fi
#
# Add prerequisites for testing (or building?) "make install DESTDIR=/build".
......
This diff is collapsed.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# $Revision: 1.5 $
# $Date: 2004/11/17 19:51:14 $
# $Author: dwelch $
#
# (c) Copyright 2003-2004 Hewlett-Packard Development Company, L.P.
# (c) Copyright 2003-2006 Hewlett-Packard Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......
This diff is collapsed.
......@@ -326,6 +326,41 @@ mordor:
return len+len2;
}
int PState()
{
char message[LINE_SIZE*64];
int len=0;
MsgAttributes ma;
len = sprintf(message, "msg=PState\n");
if (send(hpiod_socket, message, len, 0) == -1)
{
bug("unable to send PState: %m\n");
goto bugout;
}
if ((len = recv(hpiod_socket, message, sizeof(message), 0)) == -1)
{
bug("unable to receive PStateResult: %m\n");
goto bugout;
}
message[len] = 0;
hplip_ParseMsg(message, len, &ma);
len = 0;
if (ma.result == R_AOK && ma.length)
{
len = ma.length;
fprintf(stdout, "%s", ma.data);
}
bugout:
return len;
}
int DeviceEvent(char *dev, char *jobid, int code, char *type, int timeout)
{
char message[512];
......@@ -368,6 +403,13 @@ int main(int argc, char *argv[])
fprintf(stdout, "(c) 2003-2004 Copyright Hewlett-Packard Development Company, LP\n");
exit(0);
}
if ((arg[0] == '-') && (arg[1] == 's'))
{
hplip_Init();
PState();
hplip_Exit();
exit(0);
}
}
if (argc == 1)
......@@ -499,7 +541,10 @@ int main(int argc, char *argv[])
}
} /* while (copies > 0) */
/* If uni-di hpiod uses blocking i/o. This means we don't need to wait for i/o to finish. */
/* Wait for I/O to complete over the wire. */
sleep(2);
/* If not uni-di mode, monitor printer status and wait for I/O to finish. */
if (ma.prt_mode != UNI_MODE)
{
/*
......@@ -521,7 +566,7 @@ int main(int argc, char *argv[])
else
{
/* No valid status, use fixed delay. */
sleep(10);
sleep(8);
}
}
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# $Revision: 1.5 $
# $Date: 2004/11/17 19:57:55 $
# $Author: dwelch $
#
# (c) Copyright 2003-2004 Hewlett-Packard Development Company, L.P.
# (c) Copyright 2003-2006 Hewlett-Packard Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......
This diff is collapsed.
# -*- Mode: Python -*-
# -*- coding: utf-8 -*-
# Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp
# Modified for hplips 2003/06/20
# Author: Sam Rushing <rushing@nightmare.com>
......@@ -25,11 +25,7 @@
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
# ======================================================================
#
# $Revision: 1.11 $
# $Date: 2005/10/28 18:34:16 $
# $Author: dwelch $
#
# (c) Copyright 2003-2004 Hewlett-Packard Development Company, L.P.
# (c) Copyright 2003-2006 Hewlett-Packard Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -90,25 +86,25 @@ from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, \
ENOTCONN, ESHUTDOWN, EINTR, EISCONN, EAGAIN
class ExitNow( Exception ):
class ExitNow(Exception):
pass
channels = {}
class dispatcher( QObject ):
class dispatcher(QObject):
connected = False
accepting = False
closing = False
addr = None
def __init__ (self, sock=None ):
def __init__ (self, sock=None):
self.sock_write_notifier = None
self.sock_read_notifier = None
if sock:
self.set_socket( sock )
self.socket.setblocking( 0 )
self.set_socket(sock)
self.socket.setblocking(0)
self.connected = True
try:
self.addr = sock.getpeername()
......@@ -119,49 +115,49 @@ class dispatcher( QObject ):
self.socket = None
def add_channel ( self ):
def add_channel(self):
global channels
channels[ self._fileno ] = self
channels[self._fileno] = self
self.sock_read_notifier = QSocketNotifier( self._fileno, QSocketNotifier.Read )
QObject.connect( self.sock_read_notifier, SIGNAL( "activated(int)" ), self.handle_read_event )
self.sock_read_notifier = QSocketNotifier(self._fileno, QSocketNotifier.Read)
QObject.connect(self.sock_read_notifier, SIGNAL("activated(int)"), self.handle_read_event)
self.sock_read_notifier.setEnabled( True )
self.sock_read_notifier.setEnabled(True)
self.sock_write_notifier = QSocketNotifier( self._fileno, QSocketNotifier.Write )
QObject.connect( self.sock_write_notifier, SIGNAL( "activated(int)" ), self.handle_write_event )
self.sock_write_notifier = QSocketNotifier(self._fileno, QSocketNotifier.Write)
QObject.connect(self.sock_write_notifier, SIGNAL("activated(int)"), self.handle_write_event)
self.sock_write_notifier.setEnabled( False )
self.sock_write_notifier.setEnabled(False)
def del_channel( self ):
QObject.disconnect( self.sock_read_notifier, SIGNAL( "activated(int)" ), self.handle_read_event )
QObject.disconnect( self.sock_write_notifier, SIGNAL( "activated(int)" ), self.handle_write_event )
def del_channel(self):
QObject.disconnect(self.sock_read_notifier, SIGNAL("activated(int)"), self.handle_read_event)
QObject.disconnect(self.sock_write_notifier, SIGNAL("activated(int)"), self.handle_write_event)
self.sock_write_notifier.setEnabled( False )
self.sock_read_notifier.setEnabled( False )
self.sock_write_notifier.setEnabled(False)
self.sock_read_notifier.setEnabled(False)
global channels
try:
del channels[ self._fileno ]
del channels[self._fileno]
except KeyError:
pass
self._fileno = 0
def create_socket( self, family, type ):
def create_socket(self, family, type):
self.family_and_type = family, type
self.socket = socket.socket (family, type)
self.socket.setblocking( 0 )
self.socket.setblocking(0)
self._fileno = self.socket.fileno()
self.add_channel()
def set_socket( self, sock ):
def set_socket(self, sock):
self.socket = sock
self._fileno = sock.fileno()
self.add_channel()
def set_reuse_addr( self ):
def set_reuse_addr(self):
# try to re-use a server port if possible
try:
self.socket.setsockopt (
......@@ -179,20 +175,20 @@ class dispatcher( QObject ):
def listen (self, num):
self.accepting = True
return self.socket.listen( num )
return self.socket.listen(num)
def bind( self, addr ):
def bind(self, addr):
self.addr = addr
return self.socket.bind( addr )
return self.socket.bind(addr)
def connect( self, address ):
def connect(self, address):
self.connected = False
err = self.socket.connect_ex( address )
err = self.socket.connect_ex(address)
if err in ( EINPROGRESS, EALREADY, EWOULDBLOCK ):
#print "1"
if err in (EINPROGRESS, EALREADY, EWOULDBLOCK):
r, w, e = select.select([], [self.socket.fileno()], [], 5.0)
err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
if err in (0, EISCONN):
self.addr = address
self.connected = True
......@@ -212,20 +208,20 @@ class dispatcher( QObject ):
def send (self, data):
try:
result = self.socket.send( data )
result = self.socket.send(data)
except socket.error, why:
if why[0] == EWOULDBLOCK:
return 0
elif why[0] == EAGAIN:
self.sock_write_notifier.setEnabled( True )
self.sock_write_notifier.setEnabled(True)
return 0
else:
raise socket.error, why
else: # write succeeded
self.sock_write_notifier.setEnabled( False )
self.sock_write_notifier.setEnabled(False)
return result
def recv( self, buffer_size ):
def recv(self, buffer_size):
try:
data = self.socket.recv (buffer_size)
if not data:
......@@ -253,7 +249,7 @@ class dispatcher( QObject ):
def __getattr__ (self, attr):
return getattr (self.socket, attr)
def handle_read_event( self ):
def handle_read_event(self):
if self.accepting:
# for an accepting socket, getting a read implies
# that we are connected
......@@ -267,36 +263,35 @@ class dispatcher( QObject ):
else:
self.handle_read()
def handle_write_event( self ):
def handle_write_event(self):
# getting a write implies that we are connected
if not self.connected:
self.handle_connect()
self.connected = True
self.handle_write()
def handle_expt_event( self ):
def handle_expt_event(self):
self.handle_expt()
def handle_error( self ):
def handle_error(self):
self.handle_close()
def handle_expt( self ):
def handle_expt(self):
raise Error
def handle_read( self ):
def handle_read(self):
raise Error
def handle_write( self ):
def handle_write(self):
raise Error
def handle_connect( self ):
#raise Error
def handle_connect(self):
pass
def handle_accept( self ):
def handle_accept(self):
raise Error
def handle_close( self ):
def handle_close(self):
self.close()
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# $Revision: 1.34 $
# $Date: 2005/09/14 22:49:39 $
# $Author: dwelch $
#
# (c) Copyright 2003-2004 Hewlett-Packard Development Company, L.P.
# (c) Copyright 2003-2006 Hewlett-Packard Development Company, L.P.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -76,8 +72,11 @@ ERROR_INVALID_HOSTNAME = 45
ERROR_INVALID_PORT_NUMBER = 46
ERROR_NO_CUPS_QUEUE_FOUND_FOR_DEVICE = 47
ERROR_UNSUPPORTED_MODEL = 48
ERROR_UNABLE_TO_BIND_SOCKET = 95
ERROR_FAX_FILE_NOT_FOUND = 49
ERROR_FAX_INCOMPATIBLE_OPTIONS = 50
ERROR_FAX_INVALID_FAX_FILE = 51
# --> add new codes here <--
ERROR_UNABLE_TO_BIND_SOCKET = 95
ERROR_UNABLE_TO_CONTACT_SERVICE = 96
ERROR_DEVICE_NOT_OPEN = 98
ERROR_INTERNAL = 99
......@@ -196,6 +195,9 @@ EVENT_SCANNER_FAIL = 2002
EVENT_START_FAX_JOB = 3000
EVENT_END_FAX_JOB = 3001
EVENT_FAX_JOB_FAIL = 3002
EVENT_FAX_JOB_CANCELED = 3003
STATUS_FAX_TX_ACTIVE = 3004
STATUS_FAX_RX_ACTIVE = 3005
#end
# copy
......@@ -256,18 +258,21 @@ EVENT_PCARD_UNABLE_TO_MOUNT = 6003
EVENT_PCARD_FILES_TRANSFERED = 6004
# end
# toolbox
EVENT_UI_SHOW_TOOLBOX = 7000
EVENT_UI_HIDE_TOOLBOX = 7001
# end
EVENT_MAX_USER_EVENT = 7999
# end of user events
# start of internal events
# fax
# fax (internal events)
EVENT_FAX_MIN = 8000
EVENT_FAX_RENDERED = 8000 # sent by hpfax: after job rendered and spooled
EVENT_FAX_RECEIPTS_SET = 8001 # sent by sendfax after receips and options gathered
EVENT_FAX_RENDER_COMPLETE = 8000 # sent by hpssd to hp-sendfax after job rendered
EVENT_FAX_ADDRESS_BOOK_UPDATED = 8002 # Sent by FAB to indicate that the dB has changed
EVENT_FAX_RENDER_DISTANT_EARLY_WARNING = 8003
EVENT_FAX_MAX = 8999
# end
# end of events
# Error states
ERROR_STATE_CLEAR = 0 # Show icon w/o overlay
ERROR_STATE_OK = 1 # Icon w/ "OK" overlay
......@@ -275,6 +280,7 @@ ERROR_STATE_WARNING = 2 # Icon w/ triangle "!" overlay
ERROR_STATE_ERROR = 3 # Icon w/ circle "X" overlay
ERROR_STATE_LOW_SUPPLIES = 4 # Icon w/ supplies overlay
ERROR_STATE_BUSY = 5 # Icon with busy overlay
ERROR_STATE_LOW_PAPER = 6 # Icon w/ paper low overlay
#end
......@@ -321,7 +327,7 @@ STATUS_TO_ERROR_STATE_MAP = {
STATUS_PRINTER_OUTPUT_TRAY_CLOSED : ERROR_STATE_ERROR,
STATUS_PRINTER_MANUAL_FEED_BLOCKED : ERROR_STATE_ERROR,
STATUS_PRINTER_REAR_FEED_BLOCKED : ERROR_STATE_ERROR,
STATUS_PRINTER_TRAY_2_OUT_OF_PAPER : ERROR_STATE_ERROR,
STATUS_PRINTER_TRAY_2_OUT_OF_PAPER : ERROR_STATE_LOW_PAPER,
STATUS_PRINTER_UNABLE_TO_LOAD_FROM_LOCKED_TRAY : ERROR_STATE_ERROR,
STATUS_PRINTER_NON_HP_INK : ERROR_STATE_WARNING,
STATUS_PRINTER_PEN_CALIBRATION_RESUME : ERROR_STATE_WARNING,
......@@ -330,7 +336,7 @@ STATUS_TO_ERROR_STATE_MAP = {
STATUS_PRINTER_PEN_CLEANING : ERROR_STATE_WARNING,
STATUS_PRINTER_PEN_CLEANING : ERROR_STATE_WARNING,
STATUS_PRINTER_WARMING_UP : ERROR_STATE_BUSY,
STATUS_PRINTER_LOW_PAPER : ERROR_STATE_LOW_SUPPLIES,
STATUS_PRINTER_LOW_PAPER : ERROR_STATE_LOW_PAPER,
STATUS_PRINTER_DOOR_OPEN : ERROR_STATE_ERROR,
STATUS_PRINTER_OFFLINE : ERROR_STATE_ERROR,
STATUS_PRINTER_LOW_TONER : ERROR_STATE_LOW_SUPPLIES,
......@@ -378,17 +384,24 @@ STATUS_TO_ERROR_STATE_MAP = {
EVENT_ERROR_INTERFACE_BUSY : ERROR_STATE_BUSY,
EVENT_ERROR_DEVICEOPEN_FAILED_ONE_DEVICE_ONLY : ERROR_STATE_ERROR,