
    V#g1                     :    S r SrSSKJr  SSKJr   " S S\5      rg))ServerreStructuredText    )_Server)
Connectionc                      ^  \ rS rSrSr\SS4U 4S jjrS rS rS r	S r
\" \R                  5      r\" \R                  5      r\" \R"                  5      rS	rU =r$ )
r       a  An opaque object representing a server that listens for connections from
other applications.

This class is not useful to instantiate directly: you must subclass it and
either extend the method connection_added, or append to the
list on_connection_added.

:Since: 0.83
Nc                 .   > [         [        U ]  XUX45      $ )a8  Construct a new Server.

:Parameters:
    `address` : str
        Listen on this address.
    `connection_class` : type
        When new connections come in, instantiate this subclass
        of dbus.connection.Connection to represent them.
        The default is Connection.
    `mainloop` : dbus.mainloop.NativeMainLoop or None
        The main loop with which to associate the new connections.
    `auth_mechanisms` : sequence of str
        Authentication mechanisms to allow. The default is to allow
        any authentication mechanism supported by ``libdbus``.
)superr   __new__)clsaddressconnection_classmainloopauth_mechanisms	__class__s        -/usr/lib/python3/dist-packages/dbus/server.pyr   Server.__new__+   s!    " VS)#8H+ 	+    c                 0    0 U l         / U l         / U l        g N)_Server__connectionson_connection_addedon_connection_removed)selfargskwargss      r   __init__Server.__init__?   s'    #% 	K &("	r   c                 \    UR                  U R                  5        U R                  U5        g r   )call_on_disconnectionconnection_removedconnection_added)r   conns     r   _on_new_connectionServer._on_new_connectionN   s$    ""4#:#:;d#r   c                 ^    U R                   (       a  U R                    H  nU" U5        M     gg)at  Respond to the creation of a new Connection.

This base-class implementation just invokes the callbacks in
the on_connection_added attribute.

:Parameters:
    `conn` : dbus.connection.Connection
        A D-Bus connection which has just been added.

        The type of this parameter is whatever was passed
        to the Server constructor as the ``connection_class``.
N)r   r   r#   cbs      r   r"   Server.connection_addedR   s)     ##..4 / $r   c                 ^    U R                   (       a  U R                    H  nU" U5        M     gg)a  Respond to the disconnection of a Connection.

This base-class implementation just invokes the callbacks in
the on_connection_removed attribute.

:Parameters:
    `conn` : dbus.connection.Connection
        A D-Bus connection which has just become disconnected.

        The type of this parameter is whatever was passed
        to the Server constructor as the ``connection_class``.
N)r   r'   s      r   r!   Server.connection_removedc   s)     %%004 1 &r   )__connectionsr   r   )__name__
__module____qualname____firstlineno____doc__r   r   r   r$   r"   r!   propertyr   get_addressr   get_ididget_is_connectedis_connected__static_attributes____classcell__)r   s   @r   r   r       s[     0:t+($"" G//0GGNN+BG445Lr   r   N)__all____docformat___dbus_bindingsr   dbus.connectionr   r    r   r   <module>r?      s%   4 " " &V6W V6r   