ó J¡Vc@sedZdZdZdZddlZddlZddlTddlmZm Z m Z m Z ddl m Z d ZeZd d „Zd d „Zd„Zed defded defe je je je je jdd defdddefd ddefe jddedefe je jdd defdd defdd defded defd d defgZe jeeeeeefdd!ed"eƒZ!e!j"d#d$d%gd&eƒ\Z#Z$Z%Z&Z'Z(d'e)j*Z+ej,j-e+ƒr'yej.e+ƒWq'e/k r#q'Xne0j1e+ƒe0j2e0j3ƒy&ddl4Z4dd(l4m5Z5m6Z6Wn$e7k re0j8d)ƒeZnXeZye!j9d*Z:Wne;k rÁd Z:nXe0j<d+e:ƒe=e:ƒd,krùeƒej>ƒny:e:rej?e:ƒ\Z$Z@ZAne$s@e0jBd-ƒej>d*ƒne0j<d.e$ƒejCe$ƒZDeD seDjEd/eFƒeFkrœe0jBd0ƒej>d,ƒnd Z%e)jGZGd*ZHd1e$kròeƒrâee$e%eIeGeHd ƒqòe0jBd2ƒneDjEd3eJƒZKeKeJkr2e jLƒZMeMjNƒZOeOe jPkrGe0jQd4ƒn,eOe jRkrfe0jQd5ƒn e0jQd6ƒeOe jPkr·eƒr§ee$e%eSeGeHd7ƒq·e0jBd8ƒneDjEd9eƒZTeTr2d:e:ZUe0jQeUƒe jVeUƒ\ZWZXeWd*kre0j<d;e$ƒq/e0j8d<e$ƒq2nWneYk rSe0jBd=ƒnXe0j<d>ƒdS(?s1.2sHP device config using USBshp-config_usb_printersUdev invokes this tool. Tool detects the plugin, Smart Install (C/DVD-ROM) issues and notifies to logged-in user. Tool also downloads firmware to the device.iÿÿÿÿN(t*(tdevicetutilstmoduletservices(t pluginhandlerscom.hplip.StatusServicetc CsttkrdStjdƒ|||||||g}tjdtdƒ}|jdd|Œtƒj |ƒtjdƒdS(Nssend_message() enteredt/tEventt signaturetssisissssend_message() returning( tDBUS_AVIALABLEtFalsetlogtdebugtlowlevelt SignalMessaget DBUS_SERVICEtappendt SystemBust send_message( t device_urit printer_namet event_codetusernametjob_idttitlet pipe_nametargstmsg((sb/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/config_usb_printer.pyR+s  ttextcCs*tjt|tttƒtjdƒdS(Ni(Rt format_texttUSAGEt __title__t__mod__t __version__tsystexit(ttyp((sb/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/config_usb_printer.pytusage9scCs®ttkrtSt}tjdƒ\}}|tkrˆtjƒdkrYtjdƒqˆtjdƒt j ƒtjdƒ\}}n|t krªt }tj dƒn|S(Ns hp-systrayis@ hp-systray must be running. Run 'hp-systray &' in a terminal. sStarting hp-systray serviceshp-systray service is running ( R R RtIs_Process_RunningtostgetuidR terrortinfoRt run_systraytTrueR(tSystray_Is_Runningtstatustoutput((sb/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/config_usb_printer.pyt start_systray?s     tnames$Usage: %s [OPTIONS] [USB bus:device]tsummarys[USB bus:device]theadingsUSB bus:device :sx"xxx:yyy" where 'xxx' is the USB bus and 'yyy' is the USB device. (Note: The ':' and all leading zeros must be present.)toptions3Use the 'lsusb' command to obtain this information.sUSB, IDs specified:s $%s 001:002texamples-1. Using 'lsusb' to obtain USB IDs: (example)tnotes $ lsusbs9 Bus 003 Device 011: ID 03f0:c202 Hewlett-Packards $ %s 003:011sn (Note: You may have to run 'lsusb' from /sbin or another location. Use '$ locate lsusb' to determine this.)trun_as_root_oktquiettghs time-out=stimeout=thandle_device_printers%s/hplip_config_usb_printer.log(RRsFailed to Import DBUS isparam=%sisThis is not a valid devices Setting up device: %s s support-typesUnsupported printer model.tSMART_INSTALL_ENABLEDs€SMART INSTALL (CD/DVD-ROM) is enabled in the system. Refer http://hplipopensource.com/hplip-web/index.html for more information.tplugins"Device Plugin is already installedsHP Device Plug-in is not founds>HP Device Plug-in version mismatch or some files are corruptedt AutoConfigsVHP Device plugin's are not installed. Please install plugin's using hp-plugin command.s fw-downloadshp-firmware -y3 -s %ssFirmware downloaded to %s s(Failed to download firmware to %s devices User exitsDone.(ZR#R!R"t__doc__R$R)tbase.gtbaseRRRRt installerRRR R RR'R2R.t USAGE_OPTIONStUSAGE_LOGGING1tUSAGE_LOGGING2tUSAGE_LOGGING3t USAGE_HELPtUSAGE_EXAMPLESt USAGE_SPACEt USAGE_NOTESR tModuletINTERACTIVE_MODEtNonetmodt parseStdOptstoptsRRtmodet ui_toolkittloctproptuser_dirtLOG_FILEtpathtexiststremovetOSErrorR t set_logfilet set_wheretLOG_TO_CONSOLE_AND_FILEtdbusRRt ImportErrortwarnRtparamt IndexErrorRtlenR%tmakeURItsane_uritfax_uriR+tqueryModelByURItmqtgettSUPPORT_TYPE_NONERRtEVENT_DIAGNOSE_PRINTQUEUEt PLUGIN_NONER>t PluginHandlet pluginObjt getStatust plugin_ststPLUGIN_INSTALLEDR,tPLUGIN_NOT_INSTALLEDtEVENT_AUTO_CONFIGUREtfw_download_reqtfw_cmdtruntfw_ststfw_outtKeyboardInterrupt(((sb/builds/ul11u3sru-gate/components/hplip/build/prototype/i386/usr/share/hplip/config_usb_printer.pyts   "   00