3 ภ<ืe* ใ@sTddlmZddlmZmZddlmZddlmZddl m Z Gdd„de ƒZ dS) ้)ฺ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__..GetcsB|ˆjkrtd|ƒ‚|ˆjkr,td|ƒ‚ˆj|}||ƒdS)NzUnknown interface: %szNo such property: %s)r rฺ_property_setters)r r r ฺvalueฺsetter)rrrฺSets      z0DBusExporterWithProperties.__init__..Setcs*|ˆjkrtd|ƒ‚dd„ˆjjƒDƒS)NzUnknown interface: %scSsi|]\}}|ƒ|“qSrr)ฺ.0ฺnamerrrr๚ !szGDBusExporterWithProperties.__init__..GetAll..)r rr ฺitems)r r )rrrฺGetAlls  z3DBusExporterWithProperties.__init__..GetAllcs|ˆjkrtd|ƒ‚dS)NzUnknown interface: %s)r r)r r Zchanged_propertiesZinvalidated_properties)rrrฺPropertiesChanged#s z>DBusExporterWithProperties.__init__..PropertiesChangedZssฺv)ฺ in_signatureZ out_signaturerZssv)rrฺsza{sv}rzsa{sv}as)Z signaturer) ฺsuperrฺ__init__rr rrZ _dbus_methodsrZ_signalsฺadd) rZbus_namer Z object_nameฺ namespacerrrr)ฺ __class__)rrr! s    z#DBusExporterWithProperties.__init__cCs|jd|j||iiƒdS)Nr)Z send_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ฺs