src/test/irc_conn.h
author Tero Marttila <terom@fixme.fi>
Thu, 21 May 2009 16:57:56 +0300
changeset 213 f0e52e026197
parent 168 a58ad50911fc
permissions -rw-r--r--
implement lua_console_on_interrupt to abort any executing thread
#ifndef TEST_IRC_CONN_H
#define TEST_IRC_CONN_H

/**
 * @file
 *
 * Utility test functions for irc_conn related tests
 */
#include "../irc_conn.h"
#include "transport.h"

/**
 * Callback flags
 */
struct test_conn_ctx {
    /** Callback flags */
    bool on_registered, on_TEST, on_error, on_quit;
};

/**
 * Create and return a new irc_conn with the given ctx (will be initialized to zero).
 *
 * The returned irc_conn will be in the registered state.
 *
 * Use irc_conn_destroy to clean up the returned irc_conn.
 */
struct irc_conn* setup_irc_conn (struct transport_test *tp, bool noisy, struct test_conn_ctx *ctx);

#endif /* TEST_IRC_CONN_H */