Commit 86983410 authored by Didier 'OdyX' Raboud's avatar Didier 'OdyX' Raboud

Imported Upstream version 3.12.6

parent b6f7e80d

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -38,6 +38,7 @@ hpdir = $(cupsbackenddir)
hp_PROGRAMS = hp
hp_SOURCES = prnt/backend/hp.c
hp_LDADD = libhpmud.la $(DBUS_LIBS)
hp_LDFLAGS = $(libhpmud_la_LDFLAGS)
hp_CFLAGS = $(DBUS_CFLAGS)
# hpaio sane backend
......@@ -49,7 +50,7 @@ libsane_hpaio_la_SOURCES = scan/sane/hpaio.c scan/sane/mfpdtf.c scan/sane/pml.c
scan/sane/common.c scan/sane/common.h scan/sane/soap.h scan/sane/soapht.h scan/sane/sanei_debug.h scan/sane/sanei.h \
scan/sane/sanei_init_debug.c scan/sane/marvell.h scan/sane/marvelli.h scan/sane/marvell.c scan/sane/soapht.c scan/sane/soap.c \
scan/sane/soaphti.h scan/sane/soapi.h scan/sane/xml.c scan/sane/xml.h scan/sane/ledm.h scan/sane/ledmi.h scan/sane/ledm.c \
scan/sane/bb_ledm.c scan/sane/http.h scan/sane/http.c
scan/sane/bb_ledm.c scan/sane/http.h scan/sane/http.c scan/sane/sclpml.c scan/sane/sclpml.h
if DARWIN_BUILD
libsane_hpaio_la_LDFLAGS = -module -framework CoreFoundation -version-info 1:0:0
else
......@@ -64,15 +65,30 @@ endif # SCAN_BUILD
# hpmud library
MUDNAME=hpmud
lib_LTLIBRARIES += libhpmud.la
libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/musb.c io/hpmud/pml.c \
io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/musb.h io/hpmud/pml.h io/hpmud/dot4.c \
io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h
if LIBUSB01_BUILD
libhpmud_la_CFLAGS = -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \
io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \
io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb_libusb01.c
else
libhpmud_la_CFLAGS = -I/usr/include/libusb-1.0 -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
libhpmud_la_SOURCES = io/hpmud/hpmud.c io/hpmud/mlc.c io/hpmud/model.c io/hpmud/pml.c \
io/hpmud/hpmud.h io/hpmud/hpmudi.h io/hpmud/list.h io/hpmud/mlc.h io/hpmud/pml.h io/hpmud/dot4.c \
io/hpmud/dot4.h io/hpmud/jd.c io/hpmud/jd.h io/hpmud/pp.c io/hpmud/pp.h io/hpmud/musb.h io/hpmud/musb.c
endif
if NETWORK_BUILD
libhpmud_la_LDFLAGS = -version-info 0:6:0 -lusb -lpthread -l$(SNMPLIB) -lcrypto
libhpmud_la_LDFLAGS = -version-info 0:6:0 -lpthread -l$(SNMPLIB) -lcrypto
else
libhpmud_la_LDFLAGS = -version-info 0:6:0 -lusb -lpthread
libhpmud_la_LDFLAGS = -version-info 0:6:0 -lpthread
endif
if LIBUSB01_BUILD
libhpmud_la_LDFLAGS += -lusb
else
libhpmud_la_LDFLAGS += -lusb-1.0
endif
libhpmud_la_CFLAGS = -DMUDNAME=\"$(MUDNAME)\" -DCONFDIR=\"$(hplip_confdir)\"
# ip library
lib_LTLIBRARIES += libhpip.la
......@@ -92,6 +108,16 @@ hp_mkuri_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\"
# hpmud.rules
rulesdir = /etc/udev/rules.d
if UDEV_SYSFS_RULES
dist_rules_DATA = data/rules/56-hpmud_support_sysfs.rules
dist_rules_DATA += data/rules/86-hpmud_plugin_sysfs.rules
dist_rules_DATA += data/rules/56-hpmud_add_printer_sysfs.rules
if UDEV_ACL_RULES
dist_rules_DATA += data/rules/40-hplip_sysfs.rules
else
dist_rules_DATA += data/rules/55-hpmud_sysfs.rules
endif
else
dist_rules_DATA = data/rules/56-hpmud_support.rules
dist_rules_DATA += data/rules/86-hpmud_plugin.rules
dist_rules_DATA += data/rules/56-hpmud_add_printer.rules
......@@ -100,6 +126,7 @@ dist_rules_DATA += data/rules/40-hplip.rules
else
dist_rules_DATA += data/rules/55-hpmud.rules
endif
endif
halpredir = /usr/share/hal/fdi/preprobe/10osvendor
dist_halpre_DATA = data/rules/20-hplip-devices.fdi
......@@ -255,7 +282,13 @@ hpmudext_LTLIBRARIES = hpmudext.la
hpmudext_la_LDFLAGS = -module -avoid-version
hpmudext_la_SOURCES = io/mudext/hpmudext.c
hpmudext_la_LIBADD = libhpmud.la
if LIBUSB01_BUILD
hpmudext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
else
hpmudext_la_CFLAGS =-I/usr/include/libusb-1.0 -I$(PYTHONINCLUDEDIR)
endif
# ui (qt3)
if GUI_BUILD
if QT3_INSTALL
......@@ -440,7 +473,7 @@ hpcups_SOURCES = prnt/hpcups/HPCupsFilter.cpp prnt/hpcups/HPCupsFilter.h prnt/hp
prnt/hpcups/Pcl3Gui.cpp prnt/hpcups/Pcl3Gui.h prnt/hpcups/Pcl3Gui2.cpp prnt/hpcups/Pcl3Gui2.h \
prnt/hpcups/LJMono.cpp prnt/hpcups/LJMono.h prnt/hpcups/LJColor.cpp prnt/hpcups/LJColor.h \
prnt/hpcups/LJFastRaster.cpp prnt/hpcups/LJFastRaster.h prnt/hpcups/LJJetReady.cpp prnt/hpcups/LJJetReady.h \
prnt/hpcups/LJZjStream.cpp prnt/hpcups/LJZjStream.h \
prnt/hpcups/LJZjStream.cpp prnt/hpcups/LJZjStream.h \
prnt/hpcups/LJZxStream.cpp prnt/hpcups/LJZxStream.h prnt/hpcups/Job.cpp prnt/hpcups/Job.h \
prnt/hpcups/Pipeline.cpp prnt/hpcups/Pipeline.h prnt/hpcups/Processor.cpp prnt/hpcups/Processor.h \
prnt/hpcups/RasterSender.cpp prnt/hpcups/RasterSender.h prnt/hpcups/ColorMatcher.cpp prnt/hpcups/ColorMatcher.h \
......@@ -449,20 +482,21 @@ prnt/hpcups/LJZjStream.cpp prnt/hpcups/LJZjStream.h \
prnt/hpcups/dj4100ColorMaps.cpp \
prnt/hpcups/BreakTables.cpp prnt/hpcups/PrinterCommands.h prnt/hpcups/Utils.cpp prnt/hpcups/Utils.h \
prnt/hpcups/SystemServices.cpp prnt/hpcups/SystemServices.h prnt/hpcups/CommonDefinitions.h prnt/hpcups/hpjbig_wrapper.h \
prnt/hpcups/apPrintModes.h prnt/hpcups/dj400PrintModes.h prnt/hpcups/dj540PrintModes.h prnt/hpcups/dj600PrintModes.h \
prnt/hpcups/dj630PrintModes.h prnt/hpcups/dj690PrintModes.h prnt/hpcups/dj850PrintModes.h prnt/hpcups/dj890PrintModes.h \
prnt/hpcups/dj895PrintModes.h prnt/hpcups/dj8x5PrintModes.h prnt/hpcups/dj970PrintModes.h prnt/hpcups/Pcl3GuiPrintModes.h \
prnt/hpcups/Pcl3PrintModes.h prnt/hpcups/ColorMaps.h \
prnt/hpcups/QuickConnect.cpp prnt/hpcups/QuickConnect.h \
prnt/hpcups/ModeJpeg.cpp prnt/hpcups/ModeJpeg.h \
prnt/hpcups/jccolor.c prnt/hpcups/jinclude.h \
prnt/hpcups/jdatadbf.c prnt/hpcups/jinclude.h \
prnt/hpcups/Lidil.cpp prnt/hpcups/Lidil.h \
prnt/hpcups/LidilCompress.cpp prnt/hpcups/LidilCompress.h \
prnt/hpcups/LidilPrintModes.h prnt/hpcups/dj3320ColorMaps.cpp \
prnt/hpcups/dj3600ColorMaps.cpp prnt/hpcups/dj3320PrintModes.h \
prnt/hpcups/dj4100PrintModes.h
prnt/hpcups/apPrintModes.h prnt/hpcups/dj400PrintModes.h prnt/hpcups/dj540PrintModes.h prnt/hpcups/dj600PrintModes.h \
prnt/hpcups/dj630PrintModes.h prnt/hpcups/dj690PrintModes.h prnt/hpcups/dj850PrintModes.h prnt/hpcups/dj890PrintModes.h \
prnt/hpcups/dj895PrintModes.h prnt/hpcups/dj8x5PrintModes.h prnt/hpcups/dj970PrintModes.h prnt/hpcups/Pcl3GuiPrintModes.h \
prnt/hpcups/Pcl3PrintModes.h prnt/hpcups/ColorMaps.h \
prnt/hpcups/QuickConnect.cpp prnt/hpcups/QuickConnect.h \
prnt/hpcups/ModeJpeg.cpp prnt/hpcups/ModeJpeg.h \
prnt/hpcups/jccolor.c prnt/hpcups/jinclude.h \
prnt/hpcups/jdatadbf.c prnt/hpcups/jinclude.h \
prnt/hpcups/Lidil.cpp prnt/hpcups/Lidil.h \
prnt/hpcups/LidilCompress.cpp prnt/hpcups/LidilCompress.h \
prnt/hpcups/LidilPrintModes.h prnt/hpcups/dj3320ColorMaps.cpp \
prnt/hpcups/dj3600ColorMaps.cpp prnt/hpcups/dj3320PrintModes.h \
prnt/hpcups/dj4100PrintModes.h \
prnt/hpcups/Hbpl1.cpp prnt/hpcups/Hbpl1.h prnt/hpcups/Hbpl1_Wrapper.h
hpcups_CXXFLAGS = $(APDK_ENDIAN_FLAG) $(DBUS_CFLAGS)
hpcups_LDADD = -ljpeg -ldl -lcups -lcupsimage $(DBUS_LIBS)
#else
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
......@@ -158,6 +158,22 @@ STATUS_PRINTER_CARTRIDGE_WRONG = 1047
STATUS_PRINTER_CARTRIDGE_MISSING = 1048
STATUS_PRINTER_PRINTHEAD_MISSING = 1049
#Alert messages for Pentane products RQ 8888
STATUS_SCANNER_ADF_MISPICK = 1050
STATUS_PRINTER_PAPER_TOO_SHORT_TO_AUTODUPLEX = 1051
STATUS_PRINTER_TRAY_2_3_DOOR_OPEN = 1052
STATUS_PRINTER_INK_TOO_LOW_TO_PRIME = 1053
STATUS_PRINTER_VERY_LOW_ON_INK = 1054
STATUS_PRINTER_SERVICE_INK_CONTAINER_ALMOST_FULL =1055
STATUS_PRINTER_SERVICE_INK_CONTAINER_FULL=1056
STATUS_PRINTER_SERVICE_INK_CONTAINER_FULL_PROMPT=1057
STATUS_PRINTER_DUPLEX_MODULE_MISSING=1058
STATUS_PRINTER_PRINTHEAD_JAM=1059
STATUS_PRINTER_CLEAR_OUTPUT_AREA=1060
STATUS_PRINTER_RESEAT_DUPLEXER=1061
STATUS_PRINTER_MEDIA_TYPE_MISMATCH=1062
# derived codes
# set to AGENT_TYPE + base (base: 1500=ink, 1600=laser )
STATUS_PRINTER_LOW_INK_BASE = 1500
......@@ -408,6 +424,23 @@ STATUS_TO_ERROR_STATE_MAP = {
STATUS_PRINTER_CARTRIDGE_MISSING : ERROR_STATE_ERROR,
STATUS_PRINTER_CARTRIDGE_WRONG : ERROR_STATE_ERROR,
STATUS_PRINTER_PRINTHEAD_MISSING : ERROR_STATE_ERROR,
#Alert messages for Pentane products RQ 8888
STATUS_SCANNER_ADF_MISPICK : ERROR_STATE_ERROR,
STATUS_PRINTER_PAPER_TOO_SHORT_TO_AUTODUPLEX : ERROR_STATE_ERROR,
STATUS_PRINTER_TRAY_2_3_DOOR_OPEN : ERROR_STATE_ERROR,
STATUS_PRINTER_INK_TOO_LOW_TO_PRIME : ERROR_STATE_WARNING,
STATUS_PRINTER_VERY_LOW_ON_INK : ERROR_STATE_OK,
STATUS_PRINTER_SERVICE_INK_CONTAINER_ALMOST_FULL : ERROR_STATE_WARNING,
STATUS_PRINTER_SERVICE_INK_CONTAINER_FULL: ERROR_STATE_WARNING,
STATUS_PRINTER_SERVICE_INK_CONTAINER_FULL_PROMPT: ERROR_STATE_ERROR,
STATUS_PRINTER_DUPLEX_MODULE_MISSING: ERROR_STATE_ERROR,
STATUS_PRINTER_PRINTHEAD_JAM: ERROR_STATE_ERROR,
STATUS_PRINTER_CLEAR_OUTPUT_AREA: ERROR_STATE_WARNING,
STATUS_PRINTER_RESEAT_DUPLEXER: ERROR_STATE_WARNING,
STATUS_PRINTER_MEDIA_TYPE_MISMATCH: ERROR_STATE_WARNING,
# The following block are EVENTs because they are only
# recieved as events from hpmud, hp backend, etc.
# i.e., a device does not produce status codes in this range
......
......@@ -1820,27 +1820,44 @@ class Device(object):
'rr' : rr,
})
#Check if device itself is sending the supplies info. If so, then in that case we need not check model.dat static data and
#compare with region, kind and type values.
dynamic_sku_data = False
for agent in agents:
try:
if agent['agent-sku'] != '':
dynamic_sku_data = True
break
except:
pass
a, aa = 1, 1
while True:
mq_agent_kind = self.mq.get('r%d-agent%d-kind' % (r_value, a), -1)
if mq_agent_kind == -1:
break
mq_agent_type = self.mq.get('r%d-agent%d-type' % (r_value, a), 0)
mq_agent_sku = self.mq.get('r%d-agent%d-sku' % (r_value, a), '')
found = False
log.debug("Looking for kind=%d, type=%d..." % (mq_agent_kind, mq_agent_type))
for agent in agents:
if dynamic_sku_data:
if a > len(agents):
break
agent = agents[a-1]
mq_agent_sku = agent['agent-sku']
agent_kind = agent['kind']
agent_type = agent['type']
if agent_kind == mq_agent_kind and \
agent_type == mq_agent_type:
found = True
break
found = True
else:
mq_agent_kind = self.mq.get('r%d-agent%d-kind' % (r_value, a), -1)
if mq_agent_kind == -1:
break
mq_agent_type = self.mq.get('r%d-agent%d-type' % (r_value, a), 0)
mq_agent_sku = self.mq.get('r%d-agent%d-sku' % (r_value, a), '')
found = False
log.debug("Looking for kind=%d, type=%d..." % (mq_agent_kind, mq_agent_type))
for agent in agents:
agent_kind = agent['kind']
agent_type = agent['type']
if agent_kind == mq_agent_kind and \
agent_type == mq_agent_type:
found = True
break
if found:
log.debug("found: r%d-kind%d-type%d" % (r_value, agent_kind, agent_type))
......@@ -1863,7 +1880,7 @@ class Device(object):
# if agent health is OK, check for low supplies. If low, use
# the agent level trigger description for the agent description.