0x1949 Team - FAZEMRX - MANAGER
Edit File: bindgen.cpython-310.pyc
o ���`� � @ s� d Z ddlZddlmZ ddlm mZ ddlm Z ddl mZmZ ddl mZ G dd� d�Zd ZG d d� d�ZdZh d �Zdd� Zddd�Zdd� ZedkrUe� dS dS )z5Generate a wrapper class from DBus introspection data� N)�indent)�Introspectable)�open_dbus_connection�Proxy)�__version__c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�Methodc C s| |j d | _g | _g | _|�d�D ]*}z|j d }W n ty+ d�t| j��}Y nw | j�|� | j�|j d � qd S )N�namezarg[@direction='in']zarg{}�type) �attribr �in_args� signature�findall�KeyError�format�len�append)�self�xml_node�argr � r �1/usr/lib/python3/dist-packages/jeepney/bindgen.py�__init__ s ��zMethod.__init__c C s dj | jd�S )Nz=def {name}(self): return new_method_call(self, '{name}') )r )r r )r r r r �_make_code_noargs s �zMethod._make_code_noargsc C sV | j s| �� S d�| j �}d�| j�}t| j �dkrdnd�|�}dj| j|||d�S )Nz, � � z({},)z({})zxdef {name}(self, {args}): return new_method_call(self, '{name}', '{signature}', {tuple}) )r �argsr �tuple)r r �joinr r r r )r r r r r r r � make_code s �zMethod.make_codeN)�__name__� __module__�__qualname__r r r r r r r r s r z� class {cls_name}(MessageGenerator): interface = {interface!r} def __init__(self, object_path={path!r}, bus_name={bus_name!r}): super().__init__(object_path=object_path, bus_name=bus_name) c @ s e Zd Zdd� Zdd� ZdS )� Interfacec C s2 |j d | _|| _|| _dd� |�d�D �| _d S )Nr c S s g | ]}t |��qS r )r )�.0�noder r r � <listcomp>7 s z&Interface.__init__.<locals>.<listcomp>�method)r r �path�bus_namer �methods)r r r'