ó
    V#ÓgO"  ã                   óÜ   • S r SSKJr  SrSrSSKJr  SSKJrJ	r	J
r
JrJrJrJrJrJrJrJrJr  SSKJr  SSKJr  SS	KJr   " S
 S\5      r " S S\5      r " S S\5      r " S S\5      rg)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                   óÈ   ^ • \ rS rSrSr0 r\R                  SS4S jrU 4S jr	S r
\" \
SSS5      rSS	 jr\" \5      rSS
 jr\" \5      rSS jr\" \5      rS r\rSrU =r$ )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                 ó2  • U(       d  XR                   ;   a  U R                   U   $ U[        :X  a  [        nO0U[        :X  a  [        nOU[
        :X  a  [        nO[        SU-  5      e[        R                  " XAUS9nXl
        U(       d  XPR                   U'   U$ )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   ÚBus.__new__9   sŠ   € ö2 ˜H×(=Ñ(=Ó=Ø×(Ñ(¨Ñ2Ð2ð ”{Ó"Ü!‰HØœÓ#Ü ‰HØœÓ$Ü!‰HäÐ2°XÑ=Ó>Ð>ä×#Ò# HÀÑJˆà ŒæØ.1×!Ñ! (Ñ+àˆ
ó    c                 óÀ   >• U R                   nU R                  R                  R                  U5      U L a  U R                  R                  U	 [        [
        U ]  5         g )N)r    Ú	__class__r   ÚgetÚsuperr   Úclose)ÚselfÚtr*   s     €r&   r-   Ú	Bus.closel   sH   ø€ Ø�N‰NˆØ�>‰>×+Ñ+×/Ñ/°Ó2°dÒ:Ø—‘×0Ñ0°Ð3ÜŒc�4ÑÕ r(   c                 ó   • U $ )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_connectionÚ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                 ó   • [        U S9$ )z“Static method that returns a connection to the session bus.

:Parameters:
    `private` : bool
        If true, do not return a shared connection.
©r#   )r   r6   s    r&   Úget_sessionÚBus.get_session~   ó   € ô  'Ñ*Ð*r(   c                 ó   • [        U S9$ )z’Static method that returns a connection to the system bus.

:Parameters:
    `private` : bool
        If true, do not return a shared connection.
r6   )r   r6   s    r&   Ú
get_systemÚBus.get_system‰   s   € ô  Ñ)Ð)r(   c                 ó   • [        U S9$ )z“Static method that returns a connection to the starter bus.

:Parameters:
    `private` : bool
        If true, do not return a shared connection.
r6   )r   r6   s    r&   Úget_starterÚBus.get_starter•   r9   r(   c                 ó  • U R                   [        :X  a  SnO0U R                   [        :X  a  SnOU R                   [        :X  a  SnOSnSU R                  R
                  U R                  R                  U[        U 5      4-  $ )NÚsessionÚsystemÚstarterzunknown bus typez<%s.%s (%s) at %#x>)r    r   r   r   r*   Ú
__module__Ú__name__Úid)r.   Únames     r&   Ú__repr__ÚBus.__repr__    sn   € Ø�>‰>œ[Ó(Ø‰DØ�^‰^œzÓ)Ø‰DØ�^‰^œ{Ó*Ø‰Dà%ˆDà$¨¯©×(AÑ(AØ(,¯©×(?Ñ(?Ø(,¬b°«hð(8ñ 8ð 	8r(   r2   )F)rE   rD   Ú__qualname__Ú__firstlineno__Ú__doc__r   r   ÚTYPE_SESSIONr   r-   r3   ÚpropertyÚ_connectionr7   Ústaticmethodr;   r>   rH   Ú__str__Ú__static_attributes__Ú__classcell__)r*   s   @r&   r   r   .   s†   ø† ñð Ðà+×8Ñ8À%Øô1õf!òñ ˜>¨4°ðJóK€Kô
+ñ ˜{Ó+€Kô*ñ ˜jÓ)€Jô+ñ ˜{Ó+€Kò8ð †Gr(   r   c                   ó"   • \ rS rSrSrSS jrSrg)r   é²   zThe system-wide message bus.Nc                 óJ   • [         R                  U [         R                  UUS9$ )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   ÚSystemBus.__new__´   s'   € ô �{‰{˜3¤§¡¸(Ø#*ð ð ,ð 	,r(   r2   ©FN©rE   rD   rJ   rK   rL   r   rR   r2   r(   r&   r   r   ²   s
   † Ù&÷,r(   r   c                   ó"   • \ rS rSrSrSS jrSrg)r   éÃ   z(The session (current login) message bus.Nc                 óJ   • [         R                  U [         R                  UUS9$ )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   rM   rX   s      r&   r   ÚSessionBus.__new__Å   ó)   € ô �{‰{˜3¤× 0Ñ 0¸'Ø$,ð ð .ð 	.r(   r2   rZ   r[   r2   r(   r&   r   r   Ã   s
   † Ù2÷.r(   r   c                   ó"   • \ rS rSrSrSS jrSrg)r   éÔ   zbThe bus that activated this process (only valid if
this process was launched by DBus activation).
Nc                 óJ   • [         R                  U [         R                  UUS9$ )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.
r_   )r   r   ÚTYPE_STARTERrX   s      r&   r   ÚStarterBus.__new__Ø   ra   r(   r2   rZ   r[   r2   r(   r&   r   r   Ô   s   † ñ÷.r(   r   N)rL   Ú
__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   r2   r(   r&   Ú<module>ro      sp   ðÙ ?õ: "à
:€Ø"€å )÷I÷ I÷ Ió Iõ
 #Ý 'Ý ôˆ-ô ôH,�ô ,ô".�ô .ô".�õ .r(   