http://prdownloads.sourceforge.net/lufs/lufs-0.9.7.tar.gz?download
[lufs.git] / filesystems / gnetfs / search.h
1 #ifndef _SEARCH_H_
2 #define _SEARCH_H_
3
4 #define SEARCH_DIR      "/SEARCH"
5
6 struct result {
7     struct list_head    list;
8     struct list_head    locators;
9     unsigned            nr_locators;
10     time_t              stamp;
11     char                *name;
12     unsigned long       size;
13 };
14
15 struct search {
16     struct list_head    list;
17     struct list_head    results;
18     char                *txt;
19     unsigned long       id;
20     time_t              stamp;
21     
22 };
23
24 void delete_result(struct result*);
25 void delete_search(struct search*);
26 int start_search(struct local_ctx*, char*);
27 struct search *find_search_by_id(struct global_ctx*, unsigned long); 
28 struct search *find_search_by_txt(struct global_ctx*, char*);
29 struct result *find_result_by_name(struct search*, char*);
30
31 #endif