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

if/core/search.h File Reference

#include "common.h"
#include "lib/misc.h"
#include "lib/vendors.h"
#include "if/core/nodes.h"

Go to the source code of this file.

Data Structures

struct  gnet_ipv4_host_t
struct  gnet_ipv6_host_t
struct  gnet_host_vec
struct  gnet_results_set
 A results_set structure factorizes the common information from a Query Hit packet, and then has a list of individual records, one for each hit. More...
struct  gnet_record
 An individual hit. More...

Typedefs

typedef guint32 gnet_search_t
typedef gnet_host_vec gnet_host_vec_t
typedef gnet_results_set gnet_results_set_t
 A results_set structure factorizes the common information from a Query Hit packet, and then has a list of individual records, one for each hit.
typedef gnet_record gnet_record_t
 An individual hit.
typedef void(* search_got_results_listener_t )(GSList *, const gnet_results_set_t *)
 Search callbacks.

Enumerations

enum  {
  SEARCH_F_PASSIVE = 1 << 0, SEARCH_F_ENABLED = 1 << 1, SEARCH_F_BROWSE = 1 << 2, SEARCH_F_LITERAL = 1 << 3,
  SEARCH_F_LOCAL = 1 << 4
}
enum  {
  ST_GOOD_TOKEN = (1 << 22), ST_BROWSE = (1 << 21), ST_LOCAL = (1 << 20), ST_FW2FW = (1 << 19),
  ST_HOSTILE = (1 << 18), ST_UNREQUESTED = (1 << 17), ST_EVIL = (1 << 16), ST_ALT_SPAM = (1 << 15),
  ST_DUP_SPAM = (1 << 14), ST_NAME_SPAM = (1 << 13), ST_URL_SPAM = (1 << 12), ST_URN_SPAM = (1 << 11),
  ST_TLS = (1 << 10), ST_BH = (1 << 9), ST_KNOWN_VENDOR = (1 << 8), ST_PARSED_TRAILER = (1 << 7),
  ST_UDP = (1 << 6), ST_BOGUS = (1 << 5), ST_PUSH_PROXY = (1 << 4), ST_GGEP = (1 << 3),
  ST_UPLOADED = (1 << 2), ST_BUSY = (1 << 1), ST_FIREWALL = (1 << 0), ST_SPAM = (ST_ALT_SPAM|ST_DUP_SPAM|ST_NAME_SPAM|ST_URL_SPAM|ST_URN_SPAM)
}
enum  { SEARCH_IGN_DISPLAY_AS_IS, SEARCH_IGN_DISPLAY_MARKED, SEARCH_IGN_NO_DISPLAY }
enum  {
  SR_DOWNLOADED = (1 << 0), SR_IGNORED = (1 << 1), SR_DONT_SHOW = (1 << 2), SR_SPAM = (1 << 3),
  SR_SHARED = (1 << 4), SR_OWNED = (1 << 5), SR_PARTIAL = (1 << 6)
}

Functions

gint gnet_host_vec_count (const gnet_host_vec_t *hvec)
gnet_host_t gnet_host_vec_get (const gnet_host_vec_t *hvec, guint i)
gnet_host_vec_tgnet_host_vec_alloc (void)
void gnet_host_vec_free (gnet_host_vec_t **vec_ptr)
gnet_host_vec_tgnet_host_vec_copy (const gnet_host_vec_t *vec)
void gnet_host_vec_add (gnet_host_vec_t *vec, host_addr_t addr, guint16 port)
gnet_host_vec_tgnet_host_vec_create (gnet_host_t *hvec, gint hcnt)


Typedef Documentation

typedef struct gnet_host_vec gnet_host_vec_t
 

typedef struct gnet_record gnet_record_t
 

An individual hit.

It referes to a file entry on the remote servent, as identified by the parent results_set structure that contains this hit.

typedef struct gnet_results_set gnet_results_set_t
 

A results_set structure factorizes the common information from a Query Hit packet, and then has a list of individual records, one for each hit.

A single structure is created for each Query Hit packet we receive, but then it can be dispatched for displaying some of its records to the various searches in presence.

typedef guint32 gnet_search_t
 

typedef void(* search_got_results_listener_t)(GSList *, const gnet_results_set_t *)
 

Search callbacks.


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
SEARCH_F_PASSIVE  Start a passive ssearch.
SEARCH_F_ENABLED  Start an enabled search.
SEARCH_F_BROWSE  Start a browse-host search.
SEARCH_F_LITERAL  Don't parse the query string.
SEARCH_F_LOCAL  Search in local files.

anonymous enum
 

Enumeration values:
ST_GOOD_TOKEN  OOB v3 matched.
ST_BROWSE  Browse Host "search" result.
ST_LOCAL  Local search result.
ST_FW2FW  Firewall-to-Firewall support.
ST_HOSTILE  From an hostile host.
ST_UNREQUESTED  Unrequested (OOB) result.
ST_EVIL  Carries evil filename.
ST_ALT_SPAM  Carries alt-loc spam.
ST_DUP_SPAM  Carries spam known by URN.
ST_NAME_SPAM  Carries alt-loc spam.
ST_URL_SPAM  Carries action URL spam.
ST_URN_SPAM  Carries spam known by URN.
ST_TLS  Indicated support for TLS.
ST_BH  Browse Host support.
ST_KNOWN_VENDOR  Found known vendor code.
ST_PARSED_TRAILER  Was able to parse trailer.
ST_UDP  Got hit via UDP.
ST_BOGUS  Bogus IP address.
ST_PUSH_PROXY  Listed some push proxies.
ST_GGEP  Trailer has a GGEP extension.
ST_UPLOADED  Is "stable", people downloaded.
ST_BUSY  Has currently no slots.
ST_FIREWALL  Is behind a firewall.
ST_SPAM 

anonymous enum
 

Enumeration values:
SEARCH_IGN_DISPLAY_AS_IS  Display normally.
SEARCH_IGN_DISPLAY_MARKED  Display marked (lighter color).
SEARCH_IGN_NO_DISPLAY  Don't display.

anonymous enum
 

Enumeration values:
SR_DOWNLOADED 
SR_IGNORED 
SR_DONT_SHOW 
SR_SPAM 
SR_SHARED 
SR_OWNED 
SR_PARTIAL 


Function Documentation

void gnet_host_vec_add gnet_host_vec_t vec,
host_addr_t  addr,
guint16  port
 

gnet_host_vec_t* gnet_host_vec_alloc void   ) 
 

gnet_host_vec_t* gnet_host_vec_copy const gnet_host_vec_t vec  ) 
 

gint gnet_host_vec_count const gnet_host_vec_t hvec  )  [inline, static]
 

gnet_host_vec_t* gnet_host_vec_create gnet_host_t hvec,
gint  hcnt
 

void gnet_host_vec_free gnet_host_vec_t **  vec_ptr  ) 
 

gnet_host_t gnet_host_vec_get const gnet_host_vec_t hvec,
guint  i
[inline, static]
 


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