summaryrefslogtreecommitdiff
path: root/slixmpp/stanza/handshake.py
blob: 70f890bee2c3cd2019998ec1b864b6bb4dd56cf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Slixmpp: The Slick XMPP Library
# Copyright (C) 2021 Mathieu Pasquet
# This file is part of Slixmpp.
# See the file LICENSE for copying permission.

from slixmpp.xmlstream import StanzaBase
from typing import Optional


class Handshake(StanzaBase):

    """
    Jabber Component protocol handshake
    """
    namespace = 'jabber:component:accept'
    name = 'handshake'
    interfaces = {'value'}

    def set_value(self, value: str):
        self.xml.text = value

    def get_value(self) -> Optional[str]:
        return self.xml.text

    def del_value(self):
        self.xml.text = ''