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 '/build/slixmpp-bP7NsY/slixmpp-1.7.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='')¶
-
delOptions()¶
-
delRequired()¶
-
delValue()¶
-
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)¶
-
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)¶
-
setup(xml=None)[source]¶ Initialize the stanza’s XML contents.
Will return
Trueif 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]¶
-
delFields()¶
-
delInstructions()¶
-
delReported()¶
-
property
field¶
-
form_types= {'cancel', 'form', 'result', 'submit'}¶
-
getFields(use_dict=False)¶
-
getInstructions()¶
-
getReported()¶
-
getValues()¶
-
interfaces= OrderedSet(['instructions', 'reported', 'title', 'type', 'items', 'values'])¶
-
name= 'x'¶
-
namespace= 'jabber:x:data'¶
-
plugin_attrib= 'form'¶
-
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_reported(reported)[source]¶ This either needs a dictionary of dictionaries or a dictionary of form fields. :param reported: :return:
-
setup(xml=None)[source]¶ Initialize the stanza’s XML contents.
Will return
Trueif 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'}¶
-