00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _CTRLPROXY_LOG_SUPPORT_H_
00021 #define _CTRLPROXY_LOG_SUPPORT_H_
00022
00023 #include <stdio.h>
00024
00028 struct log_file_info {
00029 FILE *file;
00030 time_t last_used;
00031 };
00032
00038 struct log_support_context {
00039 GHashTable *files;
00040 int num_opened;
00041 };
00042
00043 G_MODULE_EXPORT G_GNUC_MALLOC struct log_support_context *log_support_init(void);
00044 G_MODULE_EXPORT gboolean log_support_write(struct log_support_context *ctx,
00045 const char *path,
00046 const char *text);
00047 G_MODULE_EXPORT G_GNUC_PRINTF(3, 4) void log_support_writef(struct log_support_context *ctx,
00048 const char *path,
00049 const char *fmt, ...);
00050 G_MODULE_EXPORT void free_log_support_context(struct log_support_context *);
00051 G_MODULE_EXPORT void log_support_reopen(struct log_support_context *);
00052
00053 #endif