f7427b835c9a396e33d22ee8f1ad4151cda8ad94
[citadel.git] / citadel / modules / xmpp / xmpp_xmacros.h
1
2 /*
3  * define the structures for one token each
4  * typename: TheToken_<Tokenname>
5  */
6 #define PAYLOAD(STRUCTNAME, NAME) StrBuf *NAME;int encoding_##NAME;
7 #define STRPROP(STRUCTNAME, NAME) StrBuf *NAME;
8 #define TOKEN(NAME, STRUCT) typedef struct __##NAME     \
9         STRUCT                                          \
10         TheToken_##NAME;
11 #include "token.def"
12 #undef STRPROP
13 #undef PAYLOAD
14 #undef TOKEN
15
16
17 /*
18  * forward declarations for freeing the members of one struct instance
19  # name: free_buf_<Tokenname>
20  */
21
22 #define TOKEN(NAME, STRUCT)                                             \
23         void free_buf_##NAME(TheToken_##NAME *pdata);
24 #include "token.def"
25 #undef STRPROP
26 #undef PAYLOAD
27 #undef TOKEN
28
29 /*
30  * forward declarations, freeing structs and member. 
31  * name: free_<Tokenname>
32  */
33 #define TOKEN(NAME, STRUCT)                                             \
34         void free_##NAME(TheToken_##NAME *pdata);
35
36 #include "token.def"
37 #undef STRPROP
38 #undef PAYLOAD
39 #undef TOKEN