/* BTP library - Banana Tree Protocol
* Copyright (C) 1999-2001 The Regents of the University of Michigan
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef _B_CONN_HANDLER_H
#define _B_CONN_HANDLER_H
#include <glib.h>
#include "b_conn.h"
#include "b_packet.h"
typedef void (*BConnHandlerReceiveFunc)(BConn* conn, BPacket* packet, gpointer user_data);
typedef void (*BConnHandlerTimeoutFunc)(BConn* conn, gint type, gint subtype, gpointer user_data);
void b_conn_handler_add (BConn* conn, gint type, gint subtype,
BConnHandlerReceiveFunc receive, gpointer user_data);
void b_conn_handler_add_full (BConn* conn, gint type, gint subtype,
BConnHandlerReceiveFunc receive,
BConnHandlerTimeoutFunc timeout, guint time,
gpointer user_data);
void b_conn_handler_remove (BConn* conn, gint type, gint subtype, gpointer user_data);
void b_conn_handler_remove_all (BConn* conn);
void b_conn_handler_dispatch (BConn* conn, BPacket* packet);
void b_conn_handler_print (FILE* file, BConn* conn);
#endif /* _B_CONN_HANDLER_H */
syntax highlighted by Code2HTML, v. 0.9.1