src/irc_log.h
author Tero Marttila <terom@fixme.fi>
Tue, 10 Mar 2009 03:27:04 +0200
changeset 30 7f8dd120933f
parent 26 aec062af155d
child 55 6f7f6ae729d0
permissions -rw-r--r--
rework error to use a struct error_desc, and move ERR_SOCK/ERR_GNUTLS definitions to sock.h/sock_gnutls.h. error_desc definitions are still in error.c, though :(
#ifndef IRC_LOG_H
#define IRC_LOG_H

/**
 * @file
 *
 * Logging IRC events to an SQL database
 */
#include "error.h"
#include "irc_chan.h"
#include <event2/event.h>

/**
 * Configuration state for irc_log
 */
struct irc_log_info {
    /** Database connection string */
    const char *db_info;

    /** The channel to log */
    struct irc_chan *channel;
};

/**
 * Initialize the global irc_log module to use the given configuration
 *
 * XXX: db_info is still unused if not specified
 */
err_t irc_log_init (struct event_base *ev_base, const struct irc_log_info *info);

#endif