Viewing File: /lib/python3.6/site-packages/tuned/exports/__pycache__/dbus_exporter_with_properties.cpython-36.pyc

3

�<�e*�@sTddlmZddlmZmZddlmZddlmZddl	m
Z
Gdd�de
�ZdS)	�)�ismethod)�method�signal)�PROPERTIES_IFACE)�
DBusException)�DBusExportercs4eZdZ�fdd�Zdd�Zdd�Zdd�Z�ZS)	�DBusExporterWithPropertiesc	s�tt��j||||�i�_i�_�fdd�}�fdd�}�fdd�}�fdd�}ttd	d
d�|��jd<ttd
d�|��jd<ttddd�|��jd<ttdd�|��jd<�j	j
d�dS)Ncs<|�jkrtd|��|�jkr,td|���j|}|�S)NzUnknown interface: %szNo such property: %s)�_interface_namer�_property_getters)�_�interface_name�
property_name�getter)�self��3/usr/lib/python3.6/dbus_exporter_with_properties.py�Gets


z0DBusExporterWithProperties.__init__.<locals>.GetcsB|�jkrtd|��|�jkr,td|���j|}||�dS)NzUnknown interface: %szNo such property: %s)r	r�_property_setters)rrr
�value�setter)rrr�Sets


z0DBusExporterWithProperties.__init__.<locals>.Setcs*|�jkrtd|��dd��jj�D�S)NzUnknown interface: %scSsi|]\}}|�|�qSrr)�.0�namerrrr�
<dictcomp>!szGDBusExporterWithProperties.__init__.<locals>.GetAll.<locals>.<dictcomp>)r	rr
�items)rr)rrr�GetAlls
z3DBusExporterWithProperties.__init__.<locals>.GetAllcs|�jkrtd|��dS)NzUnknown interface: %s)r	r)rrZchanged_propertiesZinvalidated_properties)rrr�PropertiesChanged#s
z>DBusExporterWithProperties.__init__.<locals>.PropertiesChangedZss�v)�in_signatureZ
out_signaturerZssv)rr�sza{sv}rzsa{sv}as)Z	signaturer)�superr�__init__rr
rrZ
_dbus_methodsrZ_signals�add)	rZbus_namerZobject_name�	namespacerrrr)�	__class__)rrr!	sz#DBusExporterWithProperties.__init__cCs|jd|j||ii�dS)Nr)Zsend_signalr	)rr
rrrr�property_changed-sz+DBusExporterWithProperties.property_changedcCs0t|�std��||jkr"td��||j|<dS)Nz#Only bound methods can be exported.z1A getter for this property is already registered.)r�	Exceptionr
)rrr
rrr�property_getter0s

z*DBusExporterWithProperties.property_gettercCs0t|�std��||jkr"td��||j|<dS)Nz#Only bound methods can be exported.z1A setter for this property is already registered.)rr&r)rrr
rrr�property_setter7s

z*DBusExporterWithProperties.property_setter)�__name__�
__module__�__qualname__r!r%r'r(�
__classcell__rr)r$rrs$rN)�inspectrZdbus.servicerrZdbusrZdbus.exceptionsrZtuned.exports.dbus_exporterrrrrrr�<module>s

Back to Directory File Manager
<