comparison sat/core/core_types.py @ 4033:5a42c7842556

core (plugins): implementation of XEP-0215 "External Service Discovery": rel 418
author Goffi <goffi@goffi.org>
date Fri, 07 Apr 2023 15:16:39 +0200
parents 8289ac1b34f4
children 3900626bc100
comparison
equal deleted inserted replaced
4032:bb211f80c3e6 4033:5a42c7842556
15 15
16 # You should have received a copy of the GNU Affero General Public License 16 # You should have received a copy of the GNU Affero General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. 17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 18
19 from collections import namedtuple 19 from collections import namedtuple
20 from typing import Dict 20 from typing import Dict, Callable, Optional
21 from typing_extensions import TypedDict 21 from typing_extensions import TypedDict
22
22 from twisted.words.protocols.jabber import jid as t_jid 23 from twisted.words.protocols.jabber import jid as t_jid
24 from twisted.words.protocols.jabber import xmlstream
23 from twisted.words.xish import domish 25 from twisted.words.xish import domish
24 26
25 27
26 class SatXMPPEntity: 28 class SatXMPPEntity:
27 29
28 jid: t_jid.JID 30 jid: t_jid.JID
29 is_component: bool 31 is_component: bool
30 32 server_jid: t_jid.JID
33 IQ: Callable[[Optional[str], Optional[int]], xmlstream.IQ]
31 34
32 EncryptionPlugin = namedtuple("EncryptionPlugin", ("instance", 35 EncryptionPlugin = namedtuple("EncryptionPlugin", ("instance",
33 "name", 36 "name",
34 "namespace", 37 "namespace",
35 "priority", 38 "priority",