Integrate listener into the core.
[jelmer/ctrlproxy.git] / src / ctrlproxy.h
index f9c14b27c4c488f126287f440a5a049031078c0e..60e7dee90f7cafb3133382818d4e6d7e789b1483 100644 (file)
@@ -56,6 +56,8 @@
 #include "repl.h"
 #include "ctcp.h"
 #include "admin.h"
+#include "log.h"
+#include "isupport.h"
 
 /**
  * Global information.
@@ -65,6 +67,7 @@ struct global {
        GList *new_network_notifiers;
        GList *networks;
        GList *nickserv_nicks;
+       GList *listeners;
 
        GIOChannel *unix_incoming;
        gint unix_incoming_id;
@@ -94,21 +97,22 @@ G_MODULE_EXPORT int str_asciicmp(const char *a, const char *b);
 G_MODULE_EXPORT char *g_io_channel_ip_get_description(GIOChannel *ch);
 
 /* log.c */
-enum log_level { LOG_DATA=5, LOG_TRACE=4, LOG_INFO=3, LOG_WARNING=2, LOG_ERROR=1 };
 G_MODULE_EXPORT void log_network(enum log_level, const struct network *, const char *fmt, ...);
 G_MODULE_EXPORT void log_client(enum log_level, const struct client *, const char *fmt, ...);
 G_MODULE_EXPORT void log_global(enum log_level, const char *fmt, ...);
 G_MODULE_EXPORT void log_network_state(enum log_level l, const struct network_state *st, const char *fmt, ...);
 
-#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 8
-gboolean    g_file_get_contents             (const gchar *filename,
+gboolean    rep_g_file_get_contents             (const gchar *filename,
                                              gchar **contents,
                                              gsize *length,
                                              GError **error);
-gboolean    g_file_set_contents             (const gchar *filename,
+gboolean    rep_g_file_set_contents             (const gchar *filename,
                                              const gchar *contents,
                                              gssize length,
                                              GError **error);
+#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 8
+#define g_file_get_contents rep_g_file_get_contents
+#define g_file_set_contents rep_g_file_set_contents
 #endif
 
 #endif /* __CTRLPROXY_H__ */