From 2076d506b469b932fc330743f2e56e76f52a045b Mon Sep 17 00:00:00 2001 From: Lance Stout Date: Sat, 8 Jan 2011 22:38:13 -0500 Subject: Update the XEP-0092 plugin to the new style. --- sleekxmpp/plugins/xep_0092/stanza.py | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sleekxmpp/plugins/xep_0092/stanza.py (limited to 'sleekxmpp/plugins/xep_0092/stanza.py') diff --git a/sleekxmpp/plugins/xep_0092/stanza.py b/sleekxmpp/plugins/xep_0092/stanza.py new file mode 100644 index 00000000..77654e37 --- /dev/null +++ b/sleekxmpp/plugins/xep_0092/stanza.py @@ -0,0 +1,42 @@ +""" + SleekXMPP: The Sleek XMPP Library + Copyright (C) 2010 Nathanael C. Fritz + This file is part of SleekXMPP. + + See the file LICENSE for copying permission. +""" + +from sleekxmpp.xmlstream import ElementBase, ET + + +class Version(ElementBase): + + """ + XMPP allows for an agent to advertise the name and version of the + underlying software libraries, as well as the operating system + that the agent is running on. + + Example version stanzas: + + + + + + + SleekXMPP + 1.0 + Linux + + + + Stanza Interface: + name -- The human readable name of the software. + version -- The specific version of the software. + os -- The name of the operating system running the program. + """ + + name = 'query' + namespace = 'jabber:iq:version' + plugin_attrib = 'software_version' + interfaces = set(('name', 'version', 'os')) + sub_interfaces = interfaces -- cgit v1.2.3