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

if/core/bitzi.h

Go to the documentation of this file.
00001 /*
00002  * $Id: bitzi.h 13925 2007-06-22 05:24:10Z cbiere $
00003  *
00004  * Copyright (c) 2004, Alex Bennee <alex@bennee.com>
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_bitzi_h_
00027 #define _if_core_bitzi_h_
00028 
00029 #include "common.h"
00030 
00037 typedef enum {
00038     BITZI_FJ_UNKNOWN = 0,
00039     BITZI_FJ_FAILURE,
00040     BITZI_FJ_WRONG_FILESIZE,
00041     BITZI_FJ_DANGEROUS_MISLEADING,
00042     BITZI_FJ_INCOMPLETE_DAMAGED,
00043     BITZI_FJ_SUBSTANDARD,
00044     BITZI_FJ_OVERRATED,
00045     BITZI_FJ_NORMAL,
00046     BITZI_FJ_UNDERRATED,
00047     BITZI_FJ_COMPLETE,
00048     BITZI_FJ_RECOMMENDED,
00049     BITZI_FJ_BEST_VERSION,
00050 
00051     NUM_BITZI_FJ
00052 } bitzi_fj_t;
00053 
00054 struct sha1;
00055 
00059 typedef struct {
00060     const struct sha1 *sha1;    
00061     const gchar *mime_type;     
00062     const gchar *mime_desc;     
00063     filesize_t  size;           
00064     bitzi_fj_t  judgement;
00065     gfloat      goodness;
00066     time_t      expiry;         
00067 } bitzi_data_t;
00068 
00069 #ifdef CORE_SOURCES
00070 
00071 /*
00072  * Bitzi Core API declarations
00073  *
00074  * bitzi_query_* are initiated via the gui and will generate
00075  * notification events
00076  *
00077  * bitzi_query_cache_* are used internally for gui querys as well as
00078  * from within the core. They do not generate notification events
00079  */
00080 
00081 gboolean bitzi_has_cached_ticket(const struct sha1 *sha1);
00082 bitzi_data_t *bitzi_query_by_sha1(const struct sha1 *sha1, filesize_t filesize);
00083 
00084 #endif /* CORE_SOURCES */
00085 
00086 #endif /* _core_bitzi_h_ */
00087 /* -*- mode: cc-mode; tab-width:4; -*- */
00088 /* vi: set ts=4 sw=4 cindent: */

Generated on Sat Jun 30 17:53:22 2007 for gtk-gnutella by  doxygen 1.3.9.1