Mini Shell
3
��^�# � @ sV d dl mZ d dlmZ dddgZG dd� de�ZG dd� de�ZG dd� de�Z d S )
� )�
namedtuple)� XMLParser�DBusSpecificationError�DBusSpecification�DBusSpecificationParserc @ s e Zd ZdZdS )r z,Exception for the DBus specification errors.N)�__name__�
__module__�__qualname__�__doc__� r r �#/usr/lib/python3.6/specification.pyr # s c @ s� e Zd ZdZdZdZdZdZdZdZ dZ
ed d
ddg�Zed
d
dddg�Z
edd
ddddg�ZdgZedd� �Zdd� Zedd� �Zedd� �Zdd� Zdd� Zd S )!r zDBus XML specification.�in�out�read�writeZ readwrite�returna�
<node>
<interface name="org.freedesktop.DBus.Introspectable">
<method name="Introspect">
<arg type="s" name="xml_data" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping"/>
<method name="GetMachineId">
<arg type="s" name="machine_uuid" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Properties">
<method name="Get">
<arg type="s" name="interface_name" direction="in"/>
<arg type="s" name="property_name" direction="in"/>
<arg type="v" name="value" direction="out"/>
</method>
<method name="GetAll">
<arg type="s" name="interface_name" direction="in"/>
<arg type="a{sv}" name="properties" direction="out"/>
</method>
<method name="Set">
<arg type="s" name="interface_name" direction="in"/>
<arg type="s" name="property_name" direction="in"/>
<arg type="v" name="value" direction="in"/>
</method>
<signal name="PropertiesChanged">
<arg type="s" name="interface_name"/>
<arg type="a{sv}" name="changed_properties"/>
<arg type="as" name="invalidated_properties"/>
</signal>
</interface>
</node>
�Signal�name�interface_name�type�Method�in_type�out_type�Property�readable�writable�_membersc C s t j|| �S )z.Return a DBus specification for the given XML.)r �parse_specification)�cls�xmlr r r �from_xmlp s zDBusSpecification.from_xmlc C s
i | _ dS )z Create a new DBus specification.N)r )�selfr r r �__init__u s zDBusSpecification.__init__c C s t t| jj� �j� �S )z%Interfaces of the DBus specification.)�list�dictr �keys)r! r r r �
interfacesy s zDBusSpecification.interfacesc C s t | jj� �S )z"Members of the DBus specification.)r# r �values)r! r r r �members~ s zDBusSpecification.membersc C s || j |j|jf<