root/trunk/src/forms.h

Revision 340, 1.2 kB (checked in by jajcus, 6 years ago)

- parent parameter added to form creating functions so less memory copying is done

Line 
1 #ifndef forms_h
2 #define forms_h
3
4 /*
5  * creates a new jabber:x:data form
6  * returns the node created added
7  */
8 xmlnode form_new(xmlnode parent,const char *title,const char *instructions);
9
10 /*
11  * adds a field to a jabber:x:data form
12  * returns the field added
13  */
14 xmlnode form_add_field(xmlnode form,const char *type,const char *var,
15                                 const char *label,const char *val,int required);
16
17 /*
18  * adds an option to list field of jabber:x:data form
19  * returns the node added
20  */
21 xmlnode form_add_option(xmlnode field,const char *label,const char *val);
22
23 /*
24  * adds "fixed" field to a jabber:x:data form
25  * returns the field added
26  */
27 xmlnode form_add_fixed(xmlnode form,const char *val);
28
29 /*
30  * creates a new jabber:x:data result form
31  * returns the node created added
32  */
33 xmlnode form_new_result(const char *title);
34
35 /*
36  * adds a field declaration to a jabber:x:data report
37  * returns the field added
38  */
39 xmlnode form_add_result_field(xmlnode form,const char *var,const char *label,const char *type);
40
41 /*
42  * adds an item jabber:x:data report
43  * returns the item added
44  */
45 xmlnode form_add_result_item(xmlnode form);
46
47
48 /*
49  * adds a value to a jabber:x:data report item
50  * returns the field added
51  */
52 xmlnode form_add_result_value(xmlnode item,const char *var,const char *val);
53
54 #endif
Note: See TracBrowser for help on using the browser.