o ñt3b1ã@s4dZdZddlmZddlmZGdd„deƒZdS))ÚServerÚreStructuredTexté)Ú_Server)Ú ConnectioncsfeZdZdZeddf‡fdd„ Zdd„Zdd„Zd d „Zd d „Z e e j ƒZ e e jƒZe e jƒZ‡ZS) 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 Ncstt|ƒ |||||¡S)a 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__©ú-/usr/lib/python3/dist-packages/dbus/server.pyr+sÿzServer.__new__cOsi|_g|_ g|_dS©N)Ú_Server__connectionsÚon_connection_addedÚon_connection_removed)ÚselfÚargsÚkwargsrrrÚ__init__?s zServer.__init__cCs| |j¡| |¡dSr)Úcall_on_disconnectionÚconnection_removedÚconnection_added)rÚconnrrrÚ_on_new_connectionNs zServer._on_new_connectioncCó"|jr |jD]}||ƒqdSdS)a´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©rrÚcbrrrrRó   þzServer.connection_addedcCr)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)rrrrrrcr!zServer.connection_removed)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrrrÚpropertyrÚ get_addressr Úget_idÚidÚget_is_connectedÚ is_connectedÚ __classcell__rrr rr s ÿ  rN)Ú__all__Ú __docformat__Ú_dbus_bindingsrÚdbus.connectionrrrrrrÚs