§
    @iaO"  ã                   óö   — d Z ddlmZ dZdZddlmZ ddlmZm	Z	m
Z
mZmZmZmZmZmZmZmZmZ ddlmZ ddlmZ dd	lmZ  G d
„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        ZdS )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                   óÄ   ‡ — e Zd ZdZi Zej        ddfd„Zˆ fd„Zd„ Z	 e
e	ddd¦  «        Zdd„Z ee¦  «        Zdd	„Z ee¦  «        Zdd
„Z ee¦  «        Zd„ ZeZˆ xZS )r   a   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|| j         v r| j         |         S |t          k    rt          }n8|t          k    rt          }n%|t
          k    rt          }nt          d|z  ¦  «        ‚t          j	        |||¬¦  «        }||_
        |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.
        zinvalid bus_type %s)Úmainloop)Ú_shared_instancesr   r   r   r   r   r   Ú
ValueErrorr   Ú__new__Ú	_bus_type)ÚclsÚbus_typeÚprivater   ÚsubclassÚbuss         ú,/usr/lib/python3/dist-packages/dbus/_dbus.pyr   zBus.__new__9   s«   € ð2 ð 	3˜H¨Ô(=Ð=Ð=ØÔ(¨Ô2Ð2ð •{Ò"Ð"Ý!ˆHˆHØ�Ò#Ð#Ý ˆHˆHØ�Ò$Ð$Ý!ˆHˆHåÐ2°XÑ=Ñ>Ô>Ð>åÔ# H¨hÀÐJÑJÔJˆà ˆŒàð 	2Ø.1ˆCÔ! (Ñ+àˆ
ó    c                 óÀ   •— | j         }| j        j                             |¦  «        | u r| j        j        |= t	          t
          | ¦  «                             ¦   «          d S )N)r   Ú	__class__r   ÚgetÚsuperr   Úclose)ÚselfÚtr(   s     €r%   r+   z	Bus.closel   sW   ø€ ØŒ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_connectionzBus.get_connectionr   s	   € ð ˆ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"   )r   r2   s    r%   Úget_sessionzBus.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   )r   r2   s    r%   Ú
get_systemzBus.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   )r   r2   s    r%   Úget_starterzBus.get_starter•   r4   r&   c                 óÌ   — | j         t          k    rd}n(| j         t          k    rd}n| j         t          k    rd}nd}d| j        j        | j        j        |t          | ¦  «        fz  S )NÚsessionÚsystemÚstarterzunknown bus typez<%s.%s (%s) at %#x>)r   r   r   r   r(   Ú
__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__r   r   ÚTYPE_SESSIONr   r+   r0   ÚpropertyÚ_connectionr3   Ústaticmethodr6   r8   rA   Ú__str__Ú__classcell__)r(   s   @r%   r   r   .   s  ø€ € € € € ðð ð Ðà+Ô8À%Øð1ð 1ð 1ð 1ðf!ð !ð !ð !ð !ðð ð ð �(˜>¨4°ðJñKô K€Kð
+ð +ð +ð +ð �,˜{Ñ+Ô+€Kð*ð *ð *ð *ð �˜jÑ)Ô)€Jð+ð +ð +ð +ð �,˜{Ñ+Ô+€Kð8ð 8ð 8ð €G€G€G€G€Gr&   r   c                   ó   — e Zd ZdZdd„ZdS )r   zThe system-wide message bus.FNc                 óR   — t                                | t           j        ||¬¦  «        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.
        )r   r"   )r   r   ÚTYPE_SYSTEM©r    r"   r   s      r%   r   zSystemBus.__new__´   s*   € õ �{Š{˜3¥¤¸(Ø#*ð ñ ,ô ,ð 	,r&   ©FN©r>   r=   rB   rC   r   r/   r&   r%   r   r   ²   s.   € € € € € Ø&Ð&ð,ð ,ð ,ð ,ð ,ð ,r&   r   c                   ó   — e Zd ZdZdd„ZdS )r   z(The session (current login) message bus.FNc                 óR   — t                                | t           j        ||¬¦  «        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   )r   r   rD   rM   s      r%   r   zSessionBus.__new__Å   ó+   € õ �{Š{˜3¥Ô 0¸'Ø$,ð ñ .ô .ð 	.r&   rN   rO   r/   r&   r%   r   r   Ã   s.   € € € € € Ø2Ð2ð.ð .ð .ð .ð .ð .r&   r   c                   ó   — e Zd ZdZdd„ZdS )r   zjThe bus that activated this process (only valid if
    this process was launched by DBus activation).
    FNc                 óR   — t                                | t           j        ||¬¦  «        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   )r   r   ÚTYPE_STARTERrM   s      r%   r   zStarterBus.__new__Ø   rS   r&   rN   rO   r/   r&   r%   r   r   Ô   s2   € € € € € ðð ð.ð .ð .ð .ð .ð .r&   r   N)rC   Ú
__future__r   Ú__all__Ú__docformat__Údbus.exceptionsr	   Ú_dbus_bindingsr
   r   r   r   r   r   r   r   r   r   r   r   Údbus.busr   Údbus.lowlevelr   Údbus._compatr   r   r   r   r   r/   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&   