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

huge.h

Go to the documentation of this file.
00001 /*
00002  * $Id: huge.h,v 1.8 2005/06/25 01:37:39 daichik Exp $
00003  *
00004  * Copyright (c) 2002-2003, Ch. Tronche & Raphael Manfredi
00005  *
00006  * Started by Ch. Tronche (http://tronche.com/) 28/04/2002
00007  *
00008  *----------------------------------------------------------------------
00009  * This file is part of gtk-gnutella.
00010  *
00011  *  gtk-gnutella is free software; you can redistribute it and/or modify
00012  *  it under the terms of the GNU General Public License as published by
00013  *  the Free Software Foundation; either version 2 of the License, or
00014  *  (at your option) any later version.
00015  *
00016  *  gtk-gnutella is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU General Public License for more details.
00020  *
00021  *  You should have received a copy of the GNU General Public License
00022  *  along with gtk-gnutella; if not, write to the Free Software
00023  *  Foundation, Inc.:
00024  *      59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025  *----------------------------------------------------------------------
00026  */
00027 
00040 #ifndef _core_huge_h_
00041 #define _core_huge_h_
00042 
00043 #include "common.h"
00044 
00045 struct shared_file;
00046 struct header;
00047 
00048 void huge_init(void);       
00049 void huge_close(void);      
00051 /*
00052  * Set the sha1_digest field in a newly created shared_file.
00053  * If value is found in the cache, it is used, else it is computed and
00054  * the computed value is saved in the cache.
00055  */
00056 
00057 void request_sha1(struct shared_file *);
00058 gboolean sha1_is_cached(const struct shared_file *sf);
00059 
00060 gboolean huge_improbable_sha1(const gchar *buf, size_t len);
00061 gboolean huge_sha1_extract32(const gchar *buf, size_t len, gchar *retval,
00062     gpointer header, gboolean check_old);
00063 void huge_collect_locations(gchar *sha1, struct header *header);
00064 
00065 #endif  /* _core_huge_h_ */
00066 
00067 /*
00068  * Emacs stuff:
00069  * Local Variables: ***
00070  * c-indentation-style: "bsd" ***
00071  * fill-column: 80 ***
00072  * tab-width: 4 ***
00073  * indent-tabs-mode: nil ***
00074  * End: ***
00075  */

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