X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fxmpp%2Fxmpp_xmacros.h;fp=citadel%2Fmodules%2Fxmpp%2Fxmpp_xmacros.h;h=f7427b835c9a396e33d22ee8f1ad4151cda8ad94;hp=0000000000000000000000000000000000000000;hb=6ae0819ac13984a0dfa583281fc0081af735c77d;hpb=1aa2da0249792527f99172681aecc77e0ad086af diff --git a/citadel/modules/xmpp/xmpp_xmacros.h b/citadel/modules/xmpp/xmpp_xmacros.h new file mode 100644 index 000000000..f7427b835 --- /dev/null +++ b/citadel/modules/xmpp/xmpp_xmacros.h @@ -0,0 +1,39 @@ + +/* + * define the structures for one token each + * typename: TheToken_ + */ +#define PAYLOAD(STRUCTNAME, NAME) StrBuf *NAME;int encoding_##NAME; +#define STRPROP(STRUCTNAME, NAME) StrBuf *NAME; +#define TOKEN(NAME, STRUCT) typedef struct __##NAME \ + STRUCT \ + TheToken_##NAME; +#include "token.def" +#undef STRPROP +#undef PAYLOAD +#undef TOKEN + + +/* + * forward declarations for freeing the members of one struct instance + # name: free_buf_ + */ + +#define TOKEN(NAME, STRUCT) \ + void free_buf_##NAME(TheToken_##NAME *pdata); +#include "token.def" +#undef STRPROP +#undef PAYLOAD +#undef TOKEN + +/* + * forward declarations, freeing structs and member. + * name: free_ + */ +#define TOKEN(NAME, STRUCT) \ + void free_##NAME(TheToken_##NAME *pdata); + +#include "token.def" +#undef STRPROP +#undef PAYLOAD +#undef TOKEN