diff options
Diffstat (limited to 'src/plugins/fs/fs.h')
-rw-r--r-- | src/plugins/fs/fs.h | 333 |
1 files changed, 0 insertions, 333 deletions
diff --git a/src/plugins/fs/fs.h b/src/plugins/fs/fs.h deleted file mode 100644 index 4241df69..00000000 --- a/src/plugins/fs/fs.h +++ /dev/null | |||
@@ -1,333 +0,0 @@ | |||
1 | /* | ||
2 | This file is part of GNUnet. | ||
3 | (C) 2005 Christian Grothoff (and other contributing authors) | ||
4 | |||
5 | GNUnet is free software; you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published | ||
7 | by the Free Software Foundation; either version 2, or (at your | ||
8 | option) any later version. | ||
9 | |||
10 | GNUnet is distributed in the hope that it will be useful, but | ||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with GNUnet; see the file COPYING. If not, write to the | ||
17 | Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
18 | Boston, MA 02111-1307, USA. | ||
19 | */ | ||
20 | |||
21 | /** | ||
22 | * @file src/plugins/fs/fs.h | ||
23 | * @brief file-sharing globals of gnunet-gtk | ||
24 | * @author Christian Grothoff | ||
25 | */ | ||
26 | |||
27 | #ifndef GTK_FS_H | ||
28 | #define GTK_FS_H | ||
29 | |||
30 | #include "platform.h" | ||
31 | #include <GNUnet/gnunet_ecrs_lib.h> | ||
32 | #include <GNUnet/gnunet_fsui_lib.h> | ||
33 | #include <GNUnet/gnunet_uritrack_lib.h> | ||
34 | #include "gnunetgtk_common.h" | ||
35 | |||
36 | /** | ||
37 | * On search box, for namespace selection | ||
38 | * (for input of search URI; lists known namespaces). | ||
39 | */ | ||
40 | enum | ||
41 | { | ||
42 | NS_SEARCH_DESCRIPTION = 0, | ||
43 | NS_SEARCH_NAME, | ||
44 | NS_SEARCH_METADATA, | ||
45 | NS_SEARCH_RATING, | ||
46 | NS_SEARCH_NUM, | ||
47 | }; | ||
48 | |||
49 | /** | ||
50 | * For listing of search results for main search. | ||
51 | * Represents a search result. | ||
52 | */ | ||
53 | enum | ||
54 | { | ||
55 | SEARCH_NAME = 0, | ||
56 | SEARCH_SIZE, | ||
57 | SEARCH_HSIZE, | ||
58 | SEARCH_MIME, | ||
59 | SEARCH_RAW_MIME, | ||
60 | SEARCH_DESC, | ||
61 | SEARCH_PIXBUF, | ||
62 | SEARCH_URI, | ||
63 | SEARCH_META, | ||
64 | SEARCH_INTERNAL, | ||
65 | SEARCH_INTERNAL_PARENT, | ||
66 | SEARCH_STATUS, | ||
67 | SEARCH_STATUS_LOGO, | ||
68 | SEARCH_AVAILABILITY_RANK, | ||
69 | SEARCH_AVAILABILITY_CERTAINTY, | ||
70 | SEARCH_APPLICABILITY_RANK, | ||
71 | SEARCH_RANK_PIXBUF, | ||
72 | SEARCH_RANK_SORT, | ||
73 | #ifdef HAVE_GIO | ||
74 | SEARCH_ICON, | ||
75 | #endif | ||
76 | SEARCH_NUM, | ||
77 | }; | ||
78 | |||
79 | /** | ||
80 | * Entry in download summary. | ||
81 | */ | ||
82 | enum | ||
83 | { | ||
84 | DOWNLOAD_FILENAME = 0, | ||
85 | DOWNLOAD_SHORTNAME, | ||
86 | DOWNLOAD_SIZE, | ||
87 | DOWNLOAD_HSIZE, | ||
88 | DOWNLOAD_PROGRESS, | ||
89 | DOWNLOAD_URISTRING, | ||
90 | DOWNLOAD_INTERNAL, /* struct DL */ | ||
91 | DOWNLOAD_META_DATA, | ||
92 | DOWNLOAD_NUM | ||
93 | }; | ||
94 | |||
95 | enum | ||
96 | { | ||
97 | NAMESPACE_FILENAME = 0, | ||
98 | NAMESPACE_SIZE, | ||
99 | NAMESPACE_HSIZE, | ||
100 | NAMESPACE_URISTRING, | ||
101 | NAMESPACE_URI, | ||
102 | NAMESPACE_META, | ||
103 | NAMESPACE_NUM | ||
104 | }; | ||
105 | |||
106 | enum | ||
107 | { | ||
108 | IN_NAMESPACE_FILENAME = 0, | ||
109 | IN_NAMESPACE_SIZE, | ||
110 | IN_NAMESPACE_HSIZE, | ||
111 | IN_NAMESPACE_DESCRIPTION, | ||
112 | IN_NAMESPACE_MIMETYPE, | ||
113 | IN_NAMESPACE_LAST_STRING, | ||
114 | IN_NAMESPACE_NEXT_STRING, | ||
115 | IN_NAMESPACE_URI, | ||
116 | IN_NAMESPACE_META, | ||
117 | IN_NAMESPACE_NUM | ||
118 | }; | ||
119 | |||
120 | /** | ||
121 | * Entry in upload summary. | ||
122 | */ | ||
123 | enum | ||
124 | { | ||
125 | UPLOAD_FILENAME = 0, | ||
126 | UPLOAD_PROGRESS, | ||
127 | UPLOAD_URISTRING, | ||
128 | UPLOAD_INTERNAL, | ||
129 | UPLOAD_NUM | ||
130 | }; | ||
131 | |||
132 | enum | ||
133 | { | ||
134 | META_TYPE = 0, | ||
135 | META_STYPE, | ||
136 | META_VALUE, | ||
137 | META_NUM, | ||
138 | }; | ||
139 | |||
140 | enum | ||
141 | { | ||
142 | KTYPE_STRING = 0, | ||
143 | KTYPE_TYPE, | ||
144 | KTYPE_NUM, | ||
145 | }; | ||
146 | |||
147 | |||
148 | /** | ||
149 | * @brief linked list of pages in the search notebook | ||
150 | */ | ||
151 | typedef struct SL | ||
152 | { | ||
153 | struct SL *next; | ||
154 | /** | ||
155 | * Reference to the glade XML context that was | ||
156 | * used to create the search page. | ||
157 | */ | ||
158 | GladeXML *searchXML; | ||
159 | |||
160 | /** | ||
161 | * Reference to the glade XML context that was | ||
162 | * used to create the search label. | ||
163 | */ | ||
164 | GladeXML *labelXML; | ||
165 | |||
166 | /** | ||
167 | * Tree view widget that is used to display the | ||
168 | * search results. | ||
169 | */ | ||
170 | GtkTreeView *treeview; | ||
171 | |||
172 | /** | ||
173 | * Model of the tree view. | ||
174 | */ | ||
175 | GtkTreeStore *tree; | ||
176 | |||
177 | /** | ||
178 | * The label used in the notebook page. | ||
179 | */ | ||
180 | GtkWidget *tab_label; | ||
181 | |||
182 | /** | ||
183 | * The notebook page that is associated with this | ||
184 | * search. | ||
185 | */ | ||
186 | GtkWidget *searchpage; | ||
187 | |||
188 | /** | ||
189 | * URI for this search. | ||
190 | */ | ||
191 | struct GNUNET_ECRS_URI *uri; | ||
192 | |||
193 | /** | ||
194 | * String describing the search. | ||
195 | */ | ||
196 | char *searchString; | ||
197 | |||
198 | /** | ||
199 | * FSUI search handle. | ||
200 | */ | ||
201 | struct GNUNET_FSUI_SearchList *fsui_list; | ||
202 | |||
203 | /** | ||
204 | * Maximum runtime for the search. | ||
205 | */ | ||
206 | GNUNET_CronTime max_delay; | ||
207 | |||
208 | /** | ||
209 | * Number of results received so far. | ||
210 | */ | ||
211 | unsigned int resultsReceived; | ||
212 | |||
213 | /** | ||
214 | * X-coordinate of the last right-click in the search list. | ||
215 | */ | ||
216 | unsigned int last_x; | ||
217 | |||
218 | /** | ||
219 | * Y-coordinate of the last right-click in the search list. | ||
220 | */ | ||
221 | unsigned int last_y; | ||
222 | |||
223 | /** | ||
224 | * Desired anonymity level. | ||
225 | */ | ||
226 | unsigned int anonymityLevel; | ||
227 | |||
228 | } SearchList; | ||
229 | |||
230 | |||
231 | typedef struct DL | ||
232 | { | ||
233 | struct DL *next; | ||
234 | |||
235 | /** | ||
236 | * URI of the download. | ||
237 | */ | ||
238 | struct GNUNET_ECRS_URI *uri; | ||
239 | |||
240 | /** | ||
241 | * Where is the download being saved to? | ||
242 | */ | ||
243 | char *filename; | ||
244 | |||
245 | /** | ||
246 | * Path in the summary view for this download. | ||
247 | */ | ||
248 | GtkTreeRowReference *summaryViewRowReference; | ||
249 | |||
250 | /** | ||
251 | * Search that this download belongs to. | ||
252 | * Maybe NULL. | ||
253 | */ | ||
254 | struct SL *searchList; | ||
255 | |||
256 | /** | ||
257 | * Path in the search view that this | ||
258 | * download is represented by. Maybe NULL | ||
259 | * if search has been closed or if download | ||
260 | * was initiated from URI without search. | ||
261 | */ | ||
262 | GtkTreeRowReference *searchViewRowReference; | ||
263 | |||
264 | /** | ||
265 | * FSUI reference for the download. | ||
266 | */ | ||
267 | struct GNUNET_FSUI_DownloadList *fsui_list; | ||
268 | |||
269 | /** | ||
270 | * Total size of the download. | ||
271 | */ | ||
272 | unsigned long long total; | ||
273 | |||
274 | /** | ||
275 | * Is this a GNUnet directory? (by mime-type) | ||
276 | */ | ||
277 | int is_directory; | ||
278 | |||
279 | int has_terminated; | ||
280 | |||
281 | } DownloadList; | ||
282 | |||
283 | typedef struct UL | ||
284 | { | ||
285 | struct UL *next; | ||
286 | |||
287 | /** | ||
288 | * Which file or directory are we uploading? | ||
289 | */ | ||
290 | char *filename; | ||
291 | |||
292 | /** | ||
293 | * Path in the summary view for this download. | ||
294 | */ | ||
295 | GtkTreeRowReference *summaryViewRowReference; | ||
296 | |||
297 | struct GNUNET_FSUI_UploadList *fsui_list; | ||
298 | |||
299 | /** | ||
300 | * Set to final URI upon successful completion. | ||
301 | */ | ||
302 | struct GNUNET_ECRS_URI *uri; | ||
303 | |||
304 | /** | ||
305 | * Total size of the upload. | ||
306 | */ | ||
307 | unsigned long long total; | ||
308 | |||
309 | int has_terminated; | ||
310 | |||
311 | int is_top; | ||
312 | |||
313 | } UploadList; | ||
314 | |||
315 | extern struct GNUNET_FSUI_Context *ctx; | ||
316 | |||
317 | extern struct GNUNET_GE_Context *ectx; | ||
318 | |||
319 | extern struct GNUNET_GC_Configuration *cfg; | ||
320 | |||
321 | extern SearchList *search_head; | ||
322 | |||
323 | extern DownloadList *download_head; | ||
324 | |||
325 | extern UploadList *upload_head; | ||
326 | |||
327 | extern GtkListStore *search_summary; | ||
328 | |||
329 | extern GtkTreeStore *download_summary; | ||
330 | |||
331 | extern GtkTreeStore *upload_summary; | ||
332 | |||
333 | #endif | ||