a 7^ @ s^ d Z dZddlZddlZddlZddlZzddlmZ W n eyV ddl mZ Y n0 ddl Z ddlmZm Z mZmZmZmZmZ ddlmZmZ ddlmZmZmZ ddlmZmZmZ dd lmZ dd l m!Z! e"dZ#G dd d e$Z%G dd de$Z&dd Z'dd Z(dd Z)G dd de*Z+e+de$fi Z,e$ Z-G dd de,Z.G dd de.Z/dS ))BusNameObjectFallbackObjectmethodsignalZrestructuredtext N)Sequence)INTROSPECTABLE_IFACE ObjectPath SessionBus SignatureStructvalidate_bus_namevalidate_object_path)r r ) DBusExceptionNameExistsExceptionUnknownMethodException)ErrorMessageMethodReturnMessageMethodCallMessage) LOCAL_PATH)is_py2zdbus.servicec @ s( e Zd ZdZdd Zdd Zer$eZdS )_VariantSignaturezA fake method signature which, when iterated, yields an endless stream of 'v' characters representing variants (handy with zip()). It has no string representation. c C s | S )zReturn self. selfr r 2/usr/lib64/python3.9/site-packages/dbus/service.py__iter__> s z_VariantSignature.__iter__c C s dS )zReturn 'v' whenever called.vr r r r r __next__B s z_VariantSignature.__next__N)__name__ __module____qualname____doc__r r r nextr r r r r 8 s r c @ sF e Zd ZdZdddZdd Zdd Zd d Zdd Zdd Z e Z dS )r aa A base class for exporting your own Named Services across the Bus. When instantiated, objects of this class attempt to claim the given well-known name on the given bus for the current process. The name is released when the BusName object becomes unreferenced. If a well-known name is requested multiple times, multiple references to the same BusName object will be returned. :Caveats: - Assumes that named services are only ever requested using this class - if you request names from the bus directly, confusion may occur. - Does not handle queueing. NFc C s t |ddd |du r4ddl}|jdtdd t }||jv rH|j| S |rRtjpTd|r^tjp`dB |rltj pndB }| ||}|tjkrn<|tjkrn0|tj krt|n|tjkrntd ||f t| } || _|| _| |j|<