XEP 0004

1.6 Documentation

«  Plugin index   ::   Contents   ::   XEP 0009  »

XEP 0004

class slixmpp.plugins.xep_0004.XEP_0004(xmpp, config=None)[source]

XEP-0004: Data Forms

stanza = <module 'slixmpp.plugins.xep_0004.stanza' from '/home/docs/checkouts/readthedocs.org/user_builds/slixmpp/checkouts/slix-1.6.0/slixmpp/plugins/xep_0004/stanza/__init__.py'>

Stanza elements

Slixmpp: The Slick XMPP Library Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout This file is part of Slixmpp.

See the file LICENSE for copying permission.

class slixmpp.plugins.xep_0004.stanza.field.FieldOption(xml=None, parent=None)[source]
interfaces = {'label', 'value'}
name = 'option'
namespace = 'jabber:x:data'
plugin_attrib = 'option'
plugin_multi_attrib = 'options'
sub_interfaces = {'value'}
class slixmpp.plugins.xep_0004.stanza.field.FormField(xml=None, parent=None)[source]
addOption(label='', value='')
add_option(label='', value='')[source]
delOptions()
delRequired()
delValue()
del_options()[source]
del_required()[source]
del_value()[source]
field_types = {'boolean', 'fixed', 'hidden', 'jid-multi', 'jid-single', 'list-multi', 'list-single', 'text-multi', 'text-private', 'text-single'}
getAnswer()
getOptions()
getRequired()
getValue(convert=True)
get_answer()[source]
get_options()[source]
get_required()[source]
get_value(convert=True)[source]
interfaces = {'answer', 'desc', 'label', 'required', 'type', 'value', 'var'}
multi_line_types = {'hidden', 'text-multi'}
multi_value_types = {'hidden', 'jid-multi', 'list-multi', 'text-multi'}
name = 'field'
namespace = 'jabber:x:data'
option_types = {'list-multi', 'list-single'}
plugin_attrib = 'field'
plugin_attrib_map = {}
plugin_multi_attrib = 'fields'
plugin_tag_map = {}
setAnswer(answer)
setFalse()
setOptions(options)
setRequired(required)
setTrue()
setValue(value)
set_answer(answer)[source]
set_false()[source]
set_options(options)[source]
set_required(required)[source]
set_true()[source]
set_type(value)[source]
set_value(value)[source]
setup(xml=None)[source]

Initialize the stanza’s XML contents.

Will return True if XML was generated according to the stanza’s definition instead of building a stanza object from an existing XML object.

Parameters

xml – An existing XML object to use for the stanza’s content instead of generating new XML.

sub_interfaces = {'desc'}
true_values = {True, '1', 'true'}

Slixmpp: The Slick XMPP Library Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout This file is part of Slixmpp.

See the file LICENSE for copying permission.

class slixmpp.plugins.xep_0004.stanza.form.Form(*args, **kwargs)[source]
addField(var='', ftype=None, label='', desc='', required=False, value=None, options=None, **kwargs)
addReported(var, ftype=None, label='', desc='', **kwargs)
add_field(var='', ftype=None, label='', desc='', required=False, value=None, options=None, **kwargs)[source]
add_item(values)[source]
add_reported(var, ftype=None, label='', desc='', **kwargs)[source]
cancel()[source]
delFields()
delInstructions()
delReported()
del_fields()[source]
del_instructions()[source]
del_items()[source]
del_reported()[source]
property field
form_types = {'cancel', 'form', 'result', 'submit'}
getFields(use_dict=False)
getInstructions()
getReported()
getValues()
get_fields(use_dict=False)[source]
get_instructions()[source]
get_items()[source]
get_reported()[source]
get_values()[source]
interfaces = OrderedSet(['instructions', 'reported', 'title', 'type', 'items', 'values'])
merge(other)[source]
name = 'x'
namespace = 'jabber:x:data'
plugin_attrib = 'form'
reply()[source]
setFields(fields)
setInstructions(instructions)
setReported(reported)

This either needs a dictionary of dictionaries or a dictionary of form fields. :param reported: :return:

setValues(values)
set_fields(fields)[source]
set_instructions(instructions)[source]
set_items(items)[source]
set_reported(reported)[source]

This either needs a dictionary of dictionaries or a dictionary of form fields. :param reported: :return:

set_type(ftype)[source]
set_values(values)[source]
setup(xml=None)[source]

Initialize the stanza’s XML contents.

Will return True if XML was generated according to the stanza’s definition instead of building a stanza object from an existing XML object.

Parameters

xml – An existing XML object to use for the stanza’s content instead of generating new XML.

sub_interfaces = {'title'}

«  Plugin index   ::   Contents   ::   XEP 0009  »