summaryrefslogtreecommitdiff
path: root/wocky/wocky-data-form.h
diff options
context:
space:
mode:
authorWill Thompson <will.thompson@collabora.co.uk>2010-03-24 19:08:57 +0000
committerWill Thompson <will.thompson@collabora.co.uk>2010-03-25 15:20:06 +0000
commit6ab8b7622f8e00a0c100fa5a218b932f67530dd1 (patch)
treebd92a90783f3b61203b3c94f1270fc7f4e312c26 /wocky/wocky-data-form.h
parent889fa983b3a959c15de2a24debb8457f783c1f11 (diff)
Allow fields' type to be unspecified when submitting.
When we parse incoming forms, we never produce fields with unspecified type: if the XML doesn't specify the type, we default to text-single as specified by XEP-0004. This is not completely satisfactory: when parsing a form result, we should be able to pre-seed the WockyDataForm object with prior knowledge about the types of fields. But it'll do for now. When submitting a form, we allow fields to have unspecified type, and submit them with no type='' attribute. Quoth XEP-0004: > For data forms of type "submit", inclusion of the 'type' attribute is > OPTIONAL, since the form-processing entity is assumed to understand > the data types associated with forms that it processes.
Diffstat (limited to 'wocky/wocky-data-form.h')
-rw-r--r--wocky/wocky-data-form.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/wocky/wocky-data-form.h b/wocky/wocky-data-form.h
index e8cf3cc..826e1b3 100644
--- a/wocky/wocky-data-form.h
+++ b/wocky/wocky-data-form.h
@@ -30,6 +30,7 @@ G_BEGIN_DECLS
/*< prefix=WOCKY_DATA_FORM_FIELD_TYPE >*/
typedef enum
{
+ WOCKY_DATA_FORM_FIELD_TYPE_UNSPECIFIED, /*< skip >*/
WOCKY_DATA_FORM_FIELD_TYPE_BOOLEAN,
WOCKY_DATA_FORM_FIELD_TYPE_FIXED,
WOCKY_DATA_FORM_FIELD_TYPE_HIDDEN,