z]1:dZdZddlmZddlmZGddeZy))ServerreStructuredText)_Server) ConnectionceZdZdZeddffd ZdZdZdZdZ e e jZ e e jZe e j ZxZS)ra%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 Nc2tt| |||||S)aConstruct 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__)clsaddressconnection_classmainloopauth_mechanisms __class__s -/usr/lib/python3/dist-packages/dbus/server.pyr zServer.__new__+s%"VS)#w8H/+ +c0i|_g|_ g|_yN)_Server__connectionson_connection_addedon_connection_removed)selfargskwargss r__init__zServer.__init__?s'#%  K&(" rc\|j|j|j|yr)call_on_disconnectionconnection_removedconnection_added)rconns r_on_new_connectionzServer._on_new_connectionNs$ ""4#:#:; d#rcP|jr|jD] }|| yy)aRespond 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)rrr cbs rrzServer.connection_addedRs.  # #.. 4  $rcP|jr|jD] }|| yy)aRespond 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)rr#s rrzServer.connection_removedcs.  % %00 4  &r)__name__ __module__ __qualname____doc__rr rr!rrpropertyr get_addressr get_ididget_is_connected is_connected __classcell__)rs@rrr s[0:t+( $""G//0GGNN+BG445LrrN)__all__ __docformat___dbus_bindingsrdbus.connectionrrrrr6s%4 " "&V6WV6r