%PDF- %PDF-
Direktori : /usr/share/hplip/base/__pycache__/ |
Current File : //usr/share/hplip/base/__pycache__/device.cpython-312.pyc |
� = ḟ � �< � d dl Z d dlZd dlZd dlZd dlZddlmZmZm Z d dl Z d dl mZ ddlmZ d dl Z d dlZd dlZddl� ddl� ddlmZ ddlmZ dd lmZ dd lmZ ddlmZ dd lmZ d dlmZmZmZ dd lmZmZmZmZ ddl� ddl m!Z!m"Z"m#Z#m$Z$m%Z%m&Z& ejN dejP � Z)dZ*dZ+ ejX d� Z- e-j\ Z/da7da8 d dl9Z9d dl9m:Z:m;Z; da7d dl=Z= e=j| de?� g d�Z@dZAdZBdZCdZDdZE ejN d ej� � ZG ejN d!ej� � ZH ejN d"ej� � ZI ejN d#ej� � ZJ ej� � ZL ejN d$ej� � ZM ejN d%ej� � ZN ejN d&ej� � ZO G d'� d(eP� ZQ G d)� d*eQ� ZR G d+� d,eQ� ZSdvd-�ZTdwd.�ZUd/� ZVd0� ZWe@d1d2eCd3d4dfd5�ZXd6geCfd7�ZYd6geCfd8�ZZd6geCfd9�Z[dxd:�Z\d;� Z]dyd<�Z^d=� Z_d>� Z`d?� Zad@� ZbdydA�ZcdB� Zdi eedC�efdD�egdD�ehdE�eidF�ejdG�ekdH�eldI�emdJ�endK�eodL�epdM�eqdN�erdO�esdP�etdQ�eudR�evdSewdMexdTeydUezdVe{dWe|dXi�Z}e~dCedYe�dZe�d[e�d\e�d]e�d^e�d_e�d`e�dae�dbiZ�e�dce�dde�dee�dfe�dge�dhe�die�dbiZ�e�dje�dje�dkiZ�i Z� G dl� dmeP� Z� G dn� doe�j2 � Z� G dp� dqe�j2 � Z� G dr� dse�j2 � Z� G dt� due�j2 � Z�y# e0$ r dZ/Y ��hw xY w# e1$ r8 ejd d� s"e3ji d� e5jm d� Y ���w xY w# e1$ r e3jy d� Y ���w xY w)z� N� )�urllib_request�urllib_parse�urllib_error)�BytesIO)�http_client)�*)�utils)�services)�os_utils)�status)�pml)�pcl�ldl�cups)�models�mdns�slp�avahi)�PY3� to_bytes_utf8� to_unicode�to_string_latin�to_string_utf8� xStringIOzHTTP/\d.\d\s(\d+)�� i� �hpmudext� �HPLIP_BUILDz>HPMUDEXT could not be loaded. Please check HPLIP installation.F)�lowlevel� SessionBusTzpython-dbus not installed.�ignore)�usb�parr )r$ �netr r# )r$ r% r# )�print�scan�fax�pcard�copy)�hpz�(.*):/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*)|ip=(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}[^&]*)|zc=(\S+)|hostname=(\S+))(?:&port=(\d))?z6/(.*?)/(\S*?)\?(?:serial=(\S*)|device=(\S*))&loc=(\S*)z$direct (.*?) "(.*?)" "(.*?)" "(.*?)"zCTR:\d*\s.*;z]\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\bz/dev/.+z(\d+):(\d+)c �^ � e Zd Zej dddfd�Zd� Zd� Zdd�Zd d�Z d� Z d � Zd � Zy)�Eventr � c �8 � t |� | _ t |� | _ t |� | _ t |� | _ t |� | _ t |� | _ |rt |� | _ nt j � | _ d| _ d| _ y )N�80s80sI32sI80sf�ssisisd) r � device_uri�printer_name�int� event_code�username�job_id�title�float�timedate�time�pipe_fmt�dbus_fmt)�selfr2 r3 r5 r6 r7 r8 r: s �/usr/share/hplip/base/device.py�__init__zEvent.__init__j st � � %�Z�0���&�|�4����j�/���"�8�,�� ��&�k�����&�� ��!�(�O�D�M� �I�I�K�D�M�)�� �!�� � c �� � t j d| j z � t j d| j z � t j d| j z � t j d| j z � t j d| j z � t j d| j z � t j d| j z � y )Nz device_uri=%sz printer_name=%sz event_code=%dz username=%sz job_id=%dz title=%sz timedate=%s) �log�debugr2 r3 r5 r6 r7 r8 r: �r>