2 Slixmpp: The Slick XMPP Library
3 Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout
4 This file is part of Slixmpp.
6 See the file LICENSE for copying permission.
9 from slixmpp
.xmlstream
import ElementBase
, ET
12 class Attention(ElementBase
):
18 namespace
= 'urn:xmpp:attention:0'
19 plugin_attrib
= 'attention'
20 interfaces
= set(('attention',))
26 def set_attention(self
, value
):
28 xml
= ET
.Element(self
.tag_name())
29 self
.parent().xml
.append(xml
)
33 def get_attention(self
):
34 xml
= self
.parent().xml
.find(self
.tag_name())
35 return xml
is not None
37 def del_attention(self
):
38 xml
= self
.parent().xml
.find(self
.tag_name())
40 self
.parent().xml
.remove(xml
)