2 SleekXMPP: The Sleek XMPP Library
3 Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout
4 This file is part of SleekXMPP.
6 See the file LICENSE for copying permission.
9 from sleekxmpp
.xmlstream
import ElementBase
12 class LastActivity(ElementBase
):
15 namespace
= 'jabber:iq:last'
16 plugin_attrib
= 'last_activity'
17 interfaces
= set(('seconds', 'status'))
19 def get_seconds(self
):
20 return int(self
._get
_attr
('seconds'))
22 def set_seconds(self
, value
):
23 self
._set
_attr
('seconds', str(value
))
28 def set_status(self
, value
):
29 self
.xml
.text
= str(value
)