28 |
|
|
29 |
typedef struct { |
typedef struct { |
30 |
tree hits; |
tree hits; |
|
gift_id id; |
|
31 |
GString *searchobj; /* Used to uniquely identify the search. */ |
GString *searchobj; /* Used to uniquely identify the search. */ |
32 |
char *search_term; |
char *search_term; |
33 |
int realm; |
int realm; |
36 |
void *formatting; |
void *formatting; |
37 |
int sorting_method; |
int sorting_method; |
38 |
int callback; |
int callback; |
39 |
|
unsigned active:1; /* New results may still come in. */ |
40 |
} query; |
} query; |
41 |
|
|
42 |
typedef struct { |
typedef struct { |
67 |
|
|
68 |
query *new_query(char *search_term, int realm); |
query *new_query(char *search_term, int realm); |
69 |
|
|
70 |
/* stop the search associated with id */ |
/* cancel a query */ |
71 |
void gift_search_stop(gift_id id, const char *type); |
void gift_query_cancel(query *q); |
72 |
|
|
73 |
/* stop text query, NULL stops all */ |
/* finish a query */ |
74 |
void gift_query_stop(query *q); |
void gift_query_finish(query *q); |
|
|
|
|
/* remove all hits from a query */ |
|
|
void gift_query_clear(query *q); |
|
|
|
|
|
/* free hit list */ |
|
|
void gift_hits_free(query *q); |
|
75 |
|
|
76 |
char *change_sort_method(int direction); |
char *change_sort_method(int direction); |
77 |
|
|
80 |
|
|
81 |
const char *meta_data_lookup(const hit *the_hit, const char *key); |
const char *meta_data_lookup(const hit *the_hit, const char *key); |
82 |
|
|
|
/* This thing parses search results for the UI part. */ |
|
|
void search_result_item_handler(ntree *data, query *q); |
|
|
|
|
83 |
/* remove all hits from this user, in current and future searches */ |
/* remove all hits from this user, in current and future searches */ |
84 |
void user_ignore(char *user); |
void user_ignore(char *user); |
85 |
|
|