Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

hsep.h

Go to the documentation of this file.
00001 /*
00002  * $Id: hsep.h,v 1.3 2005/06/25 01:37:42 daichik Exp $
00003  *
00004  * Copyright (c) 2004, Raphael Manfredi
00005  *
00006  *----------------------------------------------------------------------
00007  * This file is part of gtk-gnutella.
00008  *
00009  *  gtk-gnutella is free software; you can redistribute it and/or modify
00010  *  it under the terms of the GNU General Public License as published by
00011  *  the Free Software Foundation; either version 2 of the License, or
00012  *  (at your option) any later version.
00013  *
00014  *  gtk-gnutella is distributed in the hope that it will be useful,
00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with gtk-gnutella; if not, write to the Free Software
00021  *  Foundation, Inc.:
00022  *      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *----------------------------------------------------------------------
00024  */
00025 
00026 #ifndef _if_core_hsep_h_
00027 #define _if_core_hsep_h_
00028 
00029 #include <glib.h>
00030 
00031 #include "lib/event.h"      /* For frequency_t */
00032 
00033 typedef guint64 hsep_triple[3];
00034 
00035 #define HSEP_N_MAX 7        
00037 enum {
00038     HSEP_IDX_NODES = 0,
00039     HSEP_IDX_FILES = 1,
00040     HSEP_IDX_KIB = 2
00041 };
00042 
00043 /*
00044  * Public interface, visible from the bridge.
00045  */
00046 
00047 #ifdef CORE_SOURCES
00048 
00049 typedef struct {
00050     hsep_triple table[HSEP_N_MAX + 1];      
00051     hsep_triple sent_table[HSEP_N_MAX];     
00052     time_t last_sent;                       
00053     time_t last_received;                   
00054     guint32 msgs_received;                  
00055     guint32 triples_received;               
00056     guint32 msgs_sent;                      
00057     guint32 triples_sent;                   
00058     gint random_skew;       
00059 } hsep_ctx_t;
00060 
00061 const gchar *hsep_get_static_str(gint row, gint column);
00062 gint hsep_get_table_size(void);
00063 void hsep_get_non_hsep_triple(hsep_triple *tripledest);
00064 void hsep_add_global_table_listener(GCallback cb,
00065     frequency_t type, guint32 interval);
00066 void hsep_remove_global_table_listener(GCallback cb);
00067 
00068 #endif /* CORE_SOURCES */
00069 #endif /* _if_core_hsep_h */
00070 
00071 /* vi: set ts=4 sw=4 cindent: */

Generated on Sun Feb 12 10:49:56 2006 for Gtk-Gnutella by doxygen 1.3.6