HEX
Server: Apache/2.4.67 (Debian)
System: Linux vps-b2547eb4 6.1.0-41-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
User: root (0)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/dbus/__pycache__/_dbus.cpython-311.pyc
�

@iaO"���dZddlmZdZdZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZmZmZmZmZmZddlmZddlmZdd	lmZGd
�de��ZGd�d
e��ZGd�de��ZGd�de��ZdS)z9Implementation for dbus.Bus. Not to be imported directly.�)�
generators)�Bus�	SystemBus�
SessionBus�
StarterBus�reStructuredText)�
DBusException)�BUS_DAEMON_IFACE�BUS_DAEMON_NAME�BUS_DAEMON_PATH�BUS_SESSION�BUS_STARTER�
BUS_SYSTEM� DBUS_START_REPLY_ALREADY_RUNNING�DBUS_START_REPLY_SUCCESS�validate_bus_name�validate_interface_name�validate_member_name�validate_object_path)�
BusConnection)�
SignalMessage)�is_py2c����eZdZdZiZejddfd�Z�fd�Zd�Z	e
e	ddd��Zdd�Ze
e��Zdd	�Ze
e��Zdd
�Ze
e��Zd�ZeZ�xZS)
ra A connection to one of three possible standard buses, the SESSION,
    SYSTEM, or STARTER bus. This class manages shared connections to those
    buses.

    If you're trying to subclass `Bus`, you may be better off subclassing
    `BusConnection`, which doesn't have all this magic.
    FNc� �|s||jvr
|j|S|tkrt}n8|tkrt}n%|t
krt}ntd|z���tj	|||���}||_
|s
||j|<|S)a�Constructor, returning an existing instance where appropriate.

        The returned instance is actually always an instance of `SessionBus`,
        `SystemBus` or `StarterBus`.

        :Parameters:
            `bus_type` : cls.TYPE_SESSION, cls.TYPE_SYSTEM or cls.TYPE_STARTER
                Connect to the appropriate bus
            `private` : bool
                If true, never return an existing shared instance, but instead
                return a private connection.

                :Deprecated: since 0.82.3. Use dbus.bus.BusConnection for
                    private connections.

            `mainloop` : dbus.mainloop.NativeMainLoop
                The main loop to use. The default is to use the default
                main loop if one has been set up, or raise an exception
                if none has been.
        :Changed: in dbus-python 0.80:
            converted from a wrapper around a Connection to a Connection
            subclass.
        zinvalid bus_type %s)�mainloop)�_shared_instancesr
rrrrr�
ValueErrorr�__new__�	_bus_type)�cls�bus_type�privater�subclass�buss      �,/usr/lib/python3/dist-packages/dbus/_dbus.pyrzBus.__new__9s���2�	3�H��(=�=�=��(��2�2��{�"�"�!�H�H�
��
#�
#� �H�H�
��
$�
$�!�H�H��2�X�=�>�>�>��#�H�h��J�J�J�� ��
��	2�.1�C�!�(�+��
�c���|j}|jj�|��|ur
|jj|=t	t
|�����dS)N)r�	__class__r�get�superr�close)�self�tr(s  �r%r+z	Bus.closelsW����N���>�+�/�/��2�2�d�:�:���0��3�
�c�4����� � � � � r&c��|S)z�Return self, for backwards compatibility with earlier dbus-python
        versions where Bus was not a subclass of Connection.

        :Deprecated: since 0.80.0
        �)r,s r%�get_connectionzBus.get_connectionrs	���r&z�self._connection == self, for backwards
                           compatibility with earlier dbus-python versions
                           where Bus was not a subclass of Connection.c�"�t|���S)z�Static method that returns a connection to the session bus.

        :Parameters:
            `private` : bool
                If true, do not return a shared connection.
        �r")rr2s r%�get_sessionzBus.get_session~����'�*�*�*�*r&c�"�t|���S)z�Static method that returns a connection to the system bus.

        :Parameters:
            `private` : bool
                If true, do not return a shared connection.
        r2)rr2s r%�
get_systemzBus.get_system�s����)�)�)�)r&c�"�t|���S)z�Static method that returns a connection to the starter bus.

        :Parameters:
            `private` : bool
                If true, do not return a shared connection.
        r2)rr2s r%�get_starterzBus.get_starter�r4r&c���|jtkrd}n(|jtkrd}n|jtkrd}nd}d|jj|jj|t|��fzS)N�session�system�starterzunknown bus typez<%s.%s (%s) at %#x>)rr
rrr(�
__module__�__name__�id)r,�names  r%�__repr__zBus.__repr__�so���>�[�(�(��D�D�
�^�z�
)�
)��D�D�
�^�{�
*�
*��D�D�%�D�$���(A�(,��(?�(,�b��h�h�(8�8�	8r&)F)r>r=�__qualname__�__doc__rr�TYPE_SESSIONrr+r0�property�_connectionr3�staticmethodr6r8rA�__str__�
__classcell__)r(s@r%rr.s�����������+�8�%��1�1�1�1�f!�!�!�!�!�����(�>�4��J�K�K�K�
+�+�+�+��,�{�+�+�K�*�*�*�*���j�)�)�J�+�+�+�+��,�{�+�+�K�8�8�8��G�G�G�G�Gr&rc��eZdZdZdd�ZdS)rzThe system-wide message bus.FNc�R�t�|tj||���S)a�Return a connection to the system bus.

        :Parameters:
            `private` : bool
                If true, never return an existing shared instance, but instead
                return a private connection.
            `mainloop` : dbus.mainloop.NativeMainLoop
                The main loop to use. The default is to use the default
                main loop if one has been set up, or raise an exception
                if none has been.
        )rr")rr�TYPE_SYSTEM�r r"rs   r%rzSystemBus.__new__�s*���{�{�3���(�#*��,�,�	,r&�FN�r>r=rBrCrr/r&r%rr�s.������&�&�
,�
,�
,�
,�
,�
,r&rc��eZdZdZdd�ZdS)rz(The session (current login) message bus.FNc�R�t�|tj||���S)a�Return a connection to the session bus.

        :Parameters:
            `private` : bool
                If true, never return an existing shared instance, but instead
                return a private connection.
            `mainloop` : dbus.mainloop.NativeMainLoop
                The main loop to use. The default is to use the default
                main loop if one has been set up, or raise an exception
                if none has been.
        �r"r)rrrDrMs   r%rzSessionBus.__new__��+���{�{�3�� 0�'�$,��.�.�	.r&rNrOr/r&r%rr�s.������2�2�
.�
.�
.�
.�
.�
.r&rc��eZdZdZdd�ZdS)rzjThe bus that activated this process (only valid if
    this process was launched by DBus activation).
    FNc�R�t�|tj||���S)a�Return a connection to the bus that activated this process.

        :Parameters:
            `private` : bool
                If true, never return an existing shared instance, but instead
                return a private connection.
            `mainloop` : dbus.mainloop.NativeMainLoop
                The main loop to use. The default is to use the default
                main loop if one has been set up, or raise an exception
                if none has been.
        rR)rr�TYPE_STARTERrMs   r%rzStarterBus.__new__�rSr&rNrOr/r&r%rr�s2��������
.�
.�
.�
.�
.�
.r&rN)rC�
__future__r�__all__�
__docformat__�dbus.exceptionsr	�_dbus_bindingsr
rrr
rrrrrrrr�dbus.busr�
dbus.lowlevelr�dbus._compatrrrrrr/r&r%�<module>r_s���?�?�:"�!�!�!�!�!�
:��"�
�)�)�)�)�)�)�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�I�
#�"�"�"�"�"�'�'�'�'�'�'������������-����H,�,�,�,�,��,�,�,�".�.�.�.�.��.�.�.�".�.�.�.�.��.�.�.�.�.r&