2010-08-08 01:06:34 -07:00
|
|
|
#ifndef H_UTIL_CRMESSAGE
|
|
|
|
#define H_UTIL_CRMESSAGE
|
|
|
|
|
|
|
|
#include "variant.h"
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-01-30 20:37:14 +01:00
|
|
|
struct locale;
|
|
|
|
struct message;
|
|
|
|
struct message_type;
|
2010-08-08 01:06:34 -07:00
|
|
|
|
2016-09-07 21:15:24 +02:00
|
|
|
void crmessage_done(void);
|
|
|
|
|
2015-01-30 20:37:14 +01:00
|
|
|
typedef int(*tostring_f) (variant data, char *buffer, const void *userdata);
|
|
|
|
void tsf_register(const char *name, tostring_f fun);
|
|
|
|
/* registers a new type->string-function */
|
2010-08-08 01:06:34 -07:00
|
|
|
|
2015-01-30 20:37:14 +01:00
|
|
|
int cr_string(variant v, char *buffer, const void *userdata);
|
|
|
|
int cr_int(variant v, char *buffer, const void *userdata);
|
|
|
|
int cr_ignore(variant v, char *buffer, const void *userdata);
|
2010-08-08 01:06:34 -07:00
|
|
|
|
2015-01-30 20:37:14 +01:00
|
|
|
void crt_register(const struct message_type *mtype);
|
|
|
|
int cr_render(const struct message *msg, char *buffer,
|
|
|
|
const void *userdata);
|
2010-08-08 01:06:34 -07:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|