summaryrefslogtreecommitdiff
path: root/slixmpp/stanza/handshake.py
blob: c58f69aabac5615478083b54332c68dd854a20f5 (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
# 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


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) -> str:
        return self.xml.text

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