<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
ภ<ืe*  ใ               @   sT   d dl mZ d dlmZmZ d dlmZ d dlmZ d dl	m
Z
 G dd de
ZdS )	้    )ฺismethod)ฺmethodฺsignal)ฺPROPERTIES_IFACE)ฺDBusException)ฺDBusExporterc                   s4   e Zd Z fddZdd Zdd Zdd Z  ZS )	ฺDBusExporterWithPropertiesc       	         sพ   t t j|||| i  _i  _ fdd} fdd} fdd} fdd}ttd	d
d| jd< ttdd| jd< ttddd| jd< ttdd| jd<  j	j
d d S )Nc                s<   | j krtd| | jkr,td|  j| }| S )NzUnknown interface: %szNo such property: %s)ฺ_interface_namer   ฺ_property_getters)ฺ_ฺinterface_nameฺproperty_nameฺgetter)ฺselfฉ ๚3/usr/lib/python3.6/dbus_exporter_with_properties.pyฺGet   s    


z0DBusExporterWithProperties.__init__.<locals>.Getc                sB   | j krtd| | jkr,td|  j| }|| d S )NzUnknown interface: %szNo such property: %s)r	   r   ฺ_property_setters)r   r   r   ฺvalueฺsetter)r   r   r   ฺSet   s    


z0DBusExporterWithProperties.__init__.<locals>.Setc                s*   | j krtd| dd  jj D S )NzUnknown interface: %sc             S   s   i | ]\}}| |qS r   r   )ฺ.0ฺnamer   r   r   r   ๚
<dictcomp>!   s    zGDBusExporterWithProperties.__init__.<locals>.GetAll.<locals>.<dictcomp>)r	   r   r
   ฺitems)r   r   )r   r   r   ฺGetAll   s    
z3DBusExporterWithProperties.__init__.<locals>.GetAllc                s   | j krtd| d S )NzUnknown interface: %s)r	   r   )r   r   Zchanged_propertiesZinvalidated_properties)r   r   r   ฺPropertiesChanged#   s    
z>DBusExporterWithProperties.__init__.<locals>.PropertiesChangedZssฺv)ฺin_signatureZout_signaturer   Zssv)r   r   ฺsza{sv}r   zsa{sv}as)Z	signaturer   )ฺsuperr   ฺ__init__r   r
   r   r   Z_dbus_methodsr   Z_signalsฺadd)	r   Zbus_namer   Zobject_nameฺ	namespacer   r   r   r   )ฺ	__class__)r   r   r!   	   s    z#DBusExporterWithProperties.__init__c             C   s   | j d| j||ii  d S )Nr   )Zsend_signalr	   )r   r   r   r   r   r   ฺproperty_changed-   s    z+DBusExporterWithProperties.property_changedc             C   s0   t |std|| jkr"td|| j|< d S )Nz#Only bound methods can be exported.z1A getter for this property is already registered.)r   ฺ	Exceptionr
   )r   r   r   r   r   r   ฺproperty_getter0   s
    
z*DBusExporterWithProperties.property_getterc             C   s0   t |std|| jkr"td|| j|< d S )Nz#Only bound methods can be exported.z1A setter for this property is already registered.)r   r&   r   )r   r   r   r   r   r   ฺproperty_setter7   s
    
z*DBusExporterWithProperties.property_setter)ฺ__name__ฺ
__module__ฺ__qualname__r!   r%   r'   r(   ฺ__classcell__r   r   )r$   r   r      s   $r   N)ฺinspectr   Zdbus.servicer   r   Zdbusr   Zdbus.exceptionsr   Ztuned.exports.dbus_exporterr   r   r   r   r   r   ฺ<module>   s
   