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

ignore.h File Reference


Detailed Description

Management of download ignoring list.

Author:
Raphael Manfredi
Date:
2002-2003

#include "common.h"

Go to the source code of this file.

Enumerations

enum  ignore_val {
  IGNORE_FALSE = 0, IGNORE_SHA1, IGNORE_NAMESIZE, IGNORE_LIBRARY,
  IGNORE_HOSTILE, IGNORE_OURSELVES, IGNORE_SPAM
}

Functions

void ignore_init (void)
 Initialize the ignore tables.
void ignore_close (void)
 Called during servent shutdown to free up resources.
void ignore_timer (time_t now)
 Called periodically to check the file timestamps.
enum ignore_val ignore_is_requested (const gchar *file, filesize_t size, const struct sha1 *sha1)
 Is ignoring requested for `filename' of size `size' and SHA1 `sha1'? `filename' and `size' are only used if `sha1' is NULL.
const gchar * ignore_reason_to_string (enum ignore_val)
void ignore_add_filesize (const gchar *file, filesize_t size)
 Add `file', `size' to the set of ignored entries.
void ignore_add_sha1 (const gchar *file, const struct sha1 *sha1)
 Add `sha1' to the set of ignored entries.
const gchar * ignore_sha1_filename (const struct sha1 *sha1)


Enumeration Type Documentation

enum ignore_val
 

Enumeration values:
IGNORE_FALSE  Do not ignore.
IGNORE_SHA1  Ignore because of SHA1.
IGNORE_NAMESIZE  Ignore because of Name & Size.
IGNORE_LIBRARY  Ignore because SHA1 present in library.
IGNORE_HOSTILE  Ignore because IP address is hostile.
IGNORE_OURSELVES  Ignore because IP:port points to ourselves.
IGNORE_SPAM  Ignore because SHA1 is known spam.


Function Documentation

void ignore_add_filesize const gchar *  file,
filesize_t  size
 

Add `file', `size' to the set of ignored entries.

void ignore_add_sha1 const gchar *  file,
const struct sha1 sha1
 

Add `sha1' to the set of ignored entries.

void ignore_close void   ) 
 

Called during servent shutdown to free up resources.

void ignore_init void   ) 
 

Initialize the ignore tables.

enum ignore_val ignore_is_requested const gchar *  filename,
filesize_t  size,
const struct sha1 sha1
 

Is ignoring requested for `filename' of size `size' and SHA1 `sha1'? `filename' and `size' are only used if `sha1' is NULL.

Parameters:
filename Must be a basename, without any directory separator
size the filesize
sha1 must point to a SHA1 (binary) or NULL

const gchar* ignore_reason_to_string enum  ignore_val  ) 
 

const gchar* ignore_sha1_filename const struct sha1 sha1  ) 
 

Returns:
the filename associated with the digest if known, NULL otherwise.

void ignore_timer time_t  unused_now  ) 
 

Called periodically to check the file timestamps.

If files are newer, they are reloaded, but the previously recorded ignores are NOT forgotten. Therefore, we can ONLY append new ignores.


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