src/irc_net_internal.h
author Tero Marttila <terom@fixme.fi>
Mon, 04 May 2009 20:55:04 +0300
branchnew-transport
changeset 168 a58ad50911fc
parent 154 f4472119de3b
permissions -rw-r--r--
refactor test.c into tests/*
#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