diff options
Diffstat (limited to 'src/fs_event_handler.h')
-rw-r--r-- | src/fs_event_handler.h | 74 |
1 files changed, 72 insertions, 2 deletions
diff --git a/src/fs_event_handler.h b/src/fs_event_handler.h index d883545f..68d0c3f8 100644 --- a/src/fs_event_handler.h +++ b/src/fs_event_handler.h | |||
@@ -27,20 +27,90 @@ | |||
27 | 27 | ||
28 | 28 | ||
29 | /** | 29 | /** |
30 | * Context we keep for a search tab. | ||
31 | */ | ||
32 | struct SearchTab | ||
33 | { | ||
34 | /** | ||
35 | * This is a doubly-linked list. | ||
36 | */ | ||
37 | struct SearchTab *next; | ||
38 | |||
39 | /** | ||
40 | * This is a doubly-linked list. | ||
41 | */ | ||
42 | struct SearchTab *prev; | ||
43 | |||
44 | struct GNUNET_FS_SearchContext *sc; | ||
45 | |||
46 | char *query_txt; | ||
47 | |||
48 | GtkBuilder *builder; | ||
49 | |||
50 | GtkWidget *frame; | ||
51 | |||
52 | GtkWidget *tab_label; | ||
53 | |||
54 | GtkWidget *close_button; | ||
55 | |||
56 | GtkWidget *clear_button; | ||
57 | |||
58 | GtkWidget *play_button; | ||
59 | |||
60 | GtkWidget *pause_button; | ||
61 | |||
62 | GtkLabel *label; | ||
63 | |||
64 | GtkTreeStore *ts; | ||
65 | |||
66 | unsigned int num_results; | ||
67 | |||
68 | }; | ||
69 | |||
70 | |||
71 | struct SearchResult; | ||
72 | |||
73 | |||
74 | /** | ||
30 | * Setup a new top-level entry in the URI tab. If necessary, create | 75 | * Setup a new top-level entry in the URI tab. If necessary, create |
31 | * the URI tab first. | 76 | * the URI tab first. |
32 | * | 77 | * |
33 | * @param iter set to the new entry | 78 | * @param iter set to the new entry |
79 | * @param srp set to search result | ||
34 | * @param meta metadata for the new entry | 80 | * @param meta metadata for the new entry |
35 | * @param uri URI for the new entry | 81 | * @param uri URI for the new entry |
36 | * @return NULL on error, otherwise tree store matching iter | 82 | * @return NULL on error, otherwise search tab with the new entry |
37 | */ | 83 | */ |
38 | GtkTreeStore * | 84 | struct SearchTab * |
39 | GNUNET_GTK_add_to_uri_tab (GtkTreeIter *iter, | 85 | GNUNET_GTK_add_to_uri_tab (GtkTreeIter *iter, |
86 | struct SearchResult **sr, | ||
40 | const struct GNUNET_CONTAINER_MetaData *meta, | 87 | const struct GNUNET_CONTAINER_MetaData *meta, |
41 | const struct GNUNET_FS_Uri *uri); | 88 | const struct GNUNET_FS_Uri *uri); |
42 | 89 | ||
43 | 90 | ||
91 | |||
92 | /** | ||
93 | * Add a search result to the given search tab. | ||
94 | * | ||
95 | * @param tab search tab to extend | ||
96 | * @param iter set to position where search result is added | ||
97 | * @param parent parent entry in search tab | ||
98 | * @param uri uri to add | ||
99 | * @param meta metadata of the entry | ||
100 | * @param result associated FS search result (can be NULL) | ||
101 | * @param applicability_rank how relevant is the result | ||
102 | * @return entry for the search result | ||
103 | */ | ||
104 | struct SearchResult * | ||
105 | GNUNET_GTK_add_search_result (struct SearchTab *tab, | ||
106 | GtkTreeIter *iter, | ||
107 | struct SearchResult *parent, | ||
108 | const struct GNUNET_FS_Uri *uri, | ||
109 | const struct GNUNET_CONTAINER_MetaData *meta, | ||
110 | struct GNUNET_FS_SearchResult *result, | ||
111 | uint32_t applicability_rank); | ||
112 | |||
113 | |||
44 | /** | 114 | /** |
45 | * Notification of FS to a client about the progress of an | 115 | * Notification of FS to a client about the progress of an |
46 | * operation. Callbacks of this type will be used for uploads, | 116 | * operation. Callbacks of this type will be used for uploads, |