src/irc_net_internal.h
author Tero Marttila <terom@fixme.fi>
Wed, 27 May 2009 23:57:48 +0300
branchnew-lib-errors
changeset 217 7728d6ec3abf
parent 154 f4472119de3b
permissions -rw-r--r--
nexus.c compiles
#ifndef IRC_NET_INTERNAL_H
#define IRC_NET_INTERNAL_H

/**
 * Private irc_net interface
 */
#include "irc_net.h"

/**
 * Our callbacks for irc_conn
 */
extern struct irc_conn_callbacks irc_net_conn_callbacks;

/**
 * Our irc_conn::handlers list
 */
extern struct irc_cmd_handler irc_net_cmd_handlers[];

/**
 * Destroy our irc_conn, and mark ourselves as disconnected.
 */
void irc_net_disconnect (struct irc_net *net);

/**
 * Fixed delay between reconnection attempts in seconds
 */
#define IRC_NET_RECONNECT_INTERVAL (5 * 60)

/**
 * Establish a new connection to our server, either right away (if \a now give), or after IRC_NET_RECONNETC_INTERVAL.
 */
err_t irc_net_connect (struct irc_net *net, bool now, struct error_info *err);

/**
 * Initialize the connect state
 */
err_t irc_net_connect_init (struct irc_net *net, struct error_info *err);

/**
 * Destroy the connect state
 */
void irc_net_connect_destroy (struct irc_net *net);

#endif