view src/gt_search_exec.h @ 0:d39e1d0d75b6

initial add
author paulo@hit-nxdomain.opendns.com
date Sat, 20 Feb 2010 21:18:28 -0800
parents
children
line source
1 /*
2 * $Id: gt_search_exec.h,v 1.9 2004/01/04 05:15:28 hipnod Exp $
3 *
4 * Copyright (C) 2001-2003 giFT project (gift.sourceforge.net)
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2, or (at your option) any
9 * later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
15 */
17 #ifndef __GT_SEARCH_EXEC_H__
18 #define __GT_SEARCH_EXEC_H__
20 /******************************************************************************/
22 #define LOG_RESULTS gt_config_get_int("search/log_results=0")
24 /******************************************************************************/
26 typedef struct gt_token_set
27 {
28 uint32_t *data;
29 size_t data_len;
30 size_t len;
31 } GtTokenSet;
33 /******************************************************************************/
35 GtTokenSet *gt_token_set_new (void);
36 void gt_token_set_free (GtTokenSet *ts);
37 void gt_token_set_append (GtTokenSet *ts, uint32_t token);
39 /******************************************************************************/
41 void gt_search_exec_add (Share *share);
42 void gt_search_exec_remove (Share *share);
43 void gt_search_exec_sync (void);
45 void gt_search_exec_init (void);
46 void gt_search_exec_cleanup (void);
48 /******************************************************************************/
50 List *gt_search_exec (char *query, gt_search_type_t type, void *extended,
51 uint8_t ttl, uint8_t hops);
53 /******************************************************************************/
55 #endif /* __GT_SEARCH_EXEC_H__ */