3d5d94d539f941b07780c2c1506aca935f68b524
[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 STRPROP(STRUCTNAME, NAME) StrBuf *NAME;
7 #define TOKEN(NAME, STRUCT) typedef struct __##NAME     \
8         STRUCT                                          \
9         TheToken_##NAME;
10 #include "token.def"
11 #undef STRPROP
12 #undef TOKEN
13
14
15 /*
16  * forward declarations for freeing the members of one struct instance
17  # name: free_buf_<Tokenname>
18  */
19
20 #define TOKEN(NAME, STRUCT)                                             \
21         void free_buf_##NAME(TheToken_##NAME *pdata);
22 #include "token.def"
23 #undef STRPROP
24 #undef TOKEN
25
26 /*
27  * forward declarations, freeing structs and member. 
28  * name: free_<Tokenname>
29  */
30 #define TOKEN(NAME, STRUCT)                                             \
31         void free_##NAME(TheToken_##NAME *pdata);
32
33 #include "token.def"
34 #undef STRPROP
35 #undef TOKEN