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

Imported Upstream version 3.12.10

parent 86983410

Too many changes to show.

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

......@@ -59,7 +59,7 @@ endif
# The following is a interlibrary dependency that must be compiled first.
libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -ldl
#libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS)
libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS) -D_IPP_PRIVATE_STRUCTURES=1
endif # SCAN_BUILD
# hpmud library
......@@ -106,6 +106,10 @@ hp_mkuri_SOURCES = io/hpmud/hp-mkuri.c
hp_mkuri_LDADD = -ldl libhpmud.la
hp_mkuri_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\"
# cron files
crondir = /etc/cron.daily
dist_cron_DATA = data/rules/hplip_cron
# hpmud.rules
rulesdir = /etc/udev/rules.d
if UDEV_SYSFS_RULES
......@@ -145,6 +149,7 @@ dist_hplip_state_DATA =
# Log Files
hplip_Logdir=/var/log/hp
hplip_tmpdir=/var/log/hp/tmp
if FULL_BUILD
......@@ -156,7 +161,7 @@ cmddir = $(hplipdir)
dist_cmd_SCRIPTS = align.py info.py print.py toolbox.py clean.py colorcal.py unload.py testpage.py makeuri.py check.py fab.py levels.py \
sendfax.py setup.py makecopies.py probe.py timedate.py firmware.py scan.py systray.py plugin.py linefeedcal.py pqdiag.py \
faxsetup.py devicesettings.py printsettings.py query.py pkservice.py wificonfig.py check-plugin.py diagnose_plugin.py uninstall.py \
upgrade.py config_usb_printer.py diagnose_queues.py
upgrade.py config_usb_printer.py diagnose_queues.py logcapture.py
# base
basedir = $(hplipdir)/base
......@@ -217,6 +222,7 @@ localzdir = $(hplipdir)/data/localization
dist_postscript_DATA = data/ps/testpage.ps.gz data/ps/clean_page.pdf.gz
dist_models_DATA = data/models/models.dat
dist_hplip_Log_DATA=
dist_hplip_tmp_DATA=
if GUI_BUILD
dist_images_16x16_DATA = data/images/16x16/*
......@@ -260,7 +266,7 @@ cupsextdir = $(pyexecdir)
cupsext_LTLIBRARIES = cupsext.la
cupsext_la_LDFLAGS = -module -avoid-version
cupsext_la_SOURCES = prnt/cupsext/cupsext.c
cupsext_la_CFLAGS = -I$(PYTHONINCLUDEDIR)
cupsext_la_CFLAGS = -I$(PYTHONINCLUDEDIR) -D_IPP_PRIVATE_STRUCTURES=1
cupsext_la_LIBADD = -lcups
if SCAN_BUILD
......@@ -374,6 +380,7 @@ hppgsz_CXXFLAGS = $(libapdk_la_CXXFLAGS)
hppgsz_CFLAGS = $(libapdk_la_CFLAGS)
hppgsz_LDADD = libapdk.la -ljpeg -ldl
if GUI_BUILD
# hplip.desktop
hplip_desktopdir = $(icondir)
hplip_desktop_DATA = hplip.desktop
......@@ -381,6 +388,7 @@ hplip_desktop_DATA = hplip.desktop
# hplip-systray.desktop
hplip_systraydir = $(systraydir)
hplip_systray_DATA = hplip-systray.desktop
endif
# hpipjs (CUPS filter)
hplipjsdir = $(cupsfilterdir)
......@@ -540,6 +548,7 @@ cupsdrv2dir = $(drvdir)
cupsdrv2_DATA = $(cups_drv)
endif
install-dist_hplip_LogDATA:
if FULL_BUILD
test -z "$(DESTDIR)$(hplip_Logdir)" || mkdir -p $(DESTDIR)$(hplip_Logdir)
......@@ -552,6 +561,30 @@ if HPLIP_BUILD
chmod 774 $(DESTDIR)$(hplip_Logdir)
endif #FULL_BUILD
install-dist_hplip_tmpDATA:
if FULL_BUILD
test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir)
chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
chmod 1774 $(DESTDIR)$(hplip_tmpdir)
endif #FULL_BUILD
if HPLIP_BUILD
test -z "$(DESTDIR)$(hplip_tmpdir)" || mkdir -p $(DESTDIR)$(hplip_tmpdir)
chgrp "lp" -R $(DESTDIR)$(hplip_tmpdir)
chmod 1774 $(DESTDIR)$(hplip_tmpdir)
endif #FULL_BUILD
install-dist_cronDATA:$(dist_cron_DATA)
test -z "$(DESTDIR)$(crondir)" || $(MKDIR_P) "$(DESTDIR)$(crondir)"; \
list='$(dist_cron_DATA)'; test -n "$(crondir)" || list=; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL) -m755 $$files '$(DESTDIR)$(crondir)'"; \
$(INSTALL) -m755 $$files "$(DESTDIR)$(crondir)" || exit $$?; \
done
install-data-hook:
if HPLIP_BUILD
# If scanner build, add hpaio entry to sane dll.conf.
......
This diff is collapsed.
This diff is collapsed.
......@@ -171,7 +171,9 @@ 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
STATUS_MANUALLY_FEED=1062
STATUS_PRINTER_PRINTHEAD_FAILED = 1063
STATUS_PRINTER_PRINTHEAD_INCOMPATIBLE = 1064
# derived codes
......@@ -438,7 +440,7 @@ STATUS_TO_ERROR_STATE_MAP = {
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,
STATUS_MANUALLY_FEED: ERROR_STATE_WARNING,
# The following block are EVENTs because they are only
......
......@@ -1307,6 +1307,9 @@ class Device(object):
def openLEDM(self):
return self.__openChannel(hpmudext.HPMUD_S_LEDM_SCAN)
def openMarvell_EWS(self):
return self.__openChannel(hpmudext.HPMUD_S_MARVELL_EWS_CHANNEL)
def closePrint(self):
return self.__closeChannel(hpmudext.HPMUD_S_PRINT_CHANNEL)
......@@ -1334,6 +1337,9 @@ class Device(object):
def closeLEDM(self):
return self.__closeChannel(hpmudext.HPMUD_S_LEDM_SCAN)
def closeMarvell_EWS(self):
return self.__closeChannel(hpmudext.HPMUD_S_MARVELL_EWS_CHANNEL)
def openCfgUpload(self):
return self.__openChannel(hpmudext.HPMUD_S_CONFIG_UPLOAD_CHANNEL)
......@@ -2146,6 +2152,9 @@ class Device(object):
def readLEDM(self, bytes_to_read, stream=None, timeout=prop.read_timeout, allow_short_read=True):
return self.__readChannel(self.openLEDM, bytes_to_read, stream, timeout, allow_short_read)
def readMarvell_EWS(self, bytes_to_read, stream=None, timeout=prop.read_timeout, allow_short_read=True):
return self.__readChannel(self.openMarvell_EWS, bytes_to_read, stream, timeout, allow_short_read)
def readSoapFax(self, bytes_to_read, stream=None, timeout=prop.read_timeout, allow_short_read=True):
return self.__readChannel(self.openSoapFax, bytes_to_read, stream, timeout, allow_short_read)
......@@ -2232,6 +2241,9 @@ class Device(object):
def writeLEDM(self, data):
return self.__writeChannel(self.openLEDM, data)
def writeMarvell_EWS(self, data):
return self.__writeChannel(self.openMarvell_EWS, data)
def writeCfgDownload(self, data):
return self.__writeChannel(self.openCfgDownload, data)
......@@ -2543,7 +2555,8 @@ class Device(object):
return ""
xmlDict = utils.XMLToDictParser().parseXML(data)
try:
return str(xmlDict[attribute])
#return str(xmlDict[attribute])
return xmlDict[attribute]
except:
return str("")
......@@ -2682,10 +2695,23 @@ class LocalOpener_LEDM(urllib.URLopener):
dev.writeLEDM("""GET %s HTTP/1.1\r\nAccept: text/plain\r\nHost:localhost\r\nUser-Agent:hplip\r\n\r\n""" % loc)
reply = xStringIO()
while dev.readLEDM(512, reply, timeout=3):
pass
#TODO:Need to add following code in order to improve the delay.
#exp_end_of_data="0\r\n\r\n"
#num_of_bytes_read = dev.readEWS_LEDM(512, reply, timeout=5)
#while num_of_bytes_read:
#temp_buf = xStringIO()
#num_of_bytes_read = dev.readEWS_LEDM(512, temp_buf, timeout=5)
#reply.write(temp_buf.getvalue())
#if num_of_bytes_read == 5 and exp_end_of_data == temp_buf.getvalue():
# break
#pass
reply.seek(0)
return reply.getvalue()
......
......@@ -149,6 +149,9 @@ class SysConfig(ConfigBase):
class State(ConfigBase):
def __init__(self):
if not os.path.exists('/var/lib/hp/') and os.geteuid() == 0:
os.makedirs('/var/lib/hp/')
os.system('chmod 644 /var/lib/hp/')
ConfigBase.__init__(self, '/var/lib/hp/hplip.state')
......
......@@ -683,6 +683,7 @@ def dataModelHelper(dev, func, ui2):
def AlignType16Manual(dev, a, b, c, d, e, f, g, h, i):
log.debug("a=%s b=%s c=%s d=%s e=%s f=%s g=%s h=%s i=%s" % (a, b, c, d, e, f, g, h, i ))
func = dev.getEWSUrl_LEDM
data = status.StatusType10FetchUrl(func, "/Calibration/State")
if not data:
......
......@@ -1728,10 +1728,7 @@ def StatusType10(func): # Low End Data Model
elif e.text == "insertOrCloseTray":
status_block['status-code'] = STATUS_PRINTER_TRAY_2_3_DOOR_OPEN
elif e.text == "failedPrintHead" or e.text == "incompatiblePrintHead":
status_block['status-code'] = STATUS_PRINTER_PRINTHEAD_MISSING
elif e.text == "inkTooLowToPrime":
status_block['status-code'] = STATUS_PRINTER_INK_TOO_LOW_TO_PRIME
......@@ -1765,4 +1762,7 @@ def StatusType10(func): # Low End Data Model
elif e.text == "unexpectedTypeInTray":
status_block['status-code'] = STATUS_PRINTER_MEDIA_TYPE_MISMATCH
elif e.text == "manuallyFeed":
status_block['status-code'] = STATUS_MANUALLY_FEED
return status_block
......@@ -99,9 +99,9 @@ class StringTable:
'1046' : (self.__tr('In power save mode'), ''),
'1047' : (self.__tr('Incorrect cartridge'), ''),
'1048' : (self.__tr('Missing cartridge'), ''),
'1049' : (self.__tr('Printhead(s): Missing or Damaged'), ''),
'1049' : (self.__tr('Missing Printhead(s)'), ''),
#Alert messages for Pentane products RQ 8888
#Alert messages for Pentane products RQ 8888
'1050' : (self.__tr('ADF can not load original, please try reloading'), ''),