aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk_event-handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-fs-gtk_event-handler.c')
-rw-r--r--src/fs/gnunet-fs-gtk_event-handler.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/fs/gnunet-fs-gtk_event-handler.c b/src/fs/gnunet-fs-gtk_event-handler.c
index d066ea57..a2e77e46 100644
--- a/src/fs/gnunet-fs-gtk_event-handler.c
+++ b/src/fs/gnunet-fs-gtk_event-handler.c
@@ -594,7 +594,7 @@ get_suggested_filename_anonymity2 (GtkTreeModel *tm,
594 char *filename; 594 char *filename;
595 char *tmp; 595 char *tmp;
596 int downloaded_anonymity = -1; 596 int downloaded_anonymity = -1;
597 struct GNUNET_CONTAINER_MetaData *meta; 597 struct GNUNET_FS_MetaData *meta;
598 size_t tmplen; 598 size_t tmplen;
599 int finished_chain; 599 int finished_chain;
600 600
@@ -1212,7 +1212,7 @@ check_for_embedded_uri (void *cls,
1212 * @param cls closure for @a cb 1212 * @param cls closure for @a cb
1213 */ 1213 */
1214static void 1214static void
1215find_embedded_uris (const struct GNUNET_CONTAINER_MetaData *meta, 1215find_embedded_uris (const struct GNUNET_FS_MetaData *meta,
1216 EmbeddedUriCallback cb, 1216 EmbeddedUriCallback cb,
1217 void *cls) 1217 void *cls)
1218{ 1218{
@@ -1220,7 +1220,7 @@ find_embedded_uris (const struct GNUNET_CONTAINER_MetaData *meta,
1220 1220
1221 ctx.cb = cb; 1221 ctx.cb = cb;
1222 ctx.cls = cls; 1222 ctx.cls = cls;
1223 GNUNET_CONTAINER_meta_data_iterate (meta, &check_for_embedded_uri, &ctx); 1223 GNUNET_FS_meta_data_iterate (meta, &check_for_embedded_uri, &ctx);
1224} 1224}
1225 1225
1226 1226
@@ -1753,7 +1753,7 @@ remove_results_in_subtree (GtkTreeModel *tm, GtkTreeIter *iter)
1753 } 1753 }
1754 if (NULL != sr->meta) 1754 if (NULL != sr->meta)
1755 { 1755 {
1756 GNUNET_CONTAINER_meta_data_destroy (sr->meta); 1756 GNUNET_FS_meta_data_destroy (sr->meta);
1757 sr->meta = NULL; 1757 sr->meta = NULL;
1758 } 1758 }
1759 GNUNET_free (sr); 1759 GNUNET_free (sr);
@@ -1828,7 +1828,7 @@ free_search_result (struct SearchResult *sr)
1828 } 1828 }
1829 if (NULL != sr->meta) 1829 if (NULL != sr->meta)
1830 { 1830 {
1831 GNUNET_CONTAINER_meta_data_destroy (sr->meta); 1831 GNUNET_FS_meta_data_destroy (sr->meta);
1832 sr->meta = NULL; 1832 sr->meta = NULL;
1833 } 1833 }
1834 GNUNET_free (sr); 1834 GNUNET_free (sr);
@@ -1939,7 +1939,7 @@ GNUNET_FS_GTK_search_treeview_cursor_changed (GtkTreeView *tv,
1939 gtk_image_clear (mctx->preview_image); 1939 gtk_image_clear (mctx->preview_image);
1940 1940
1941 if (NULL != sr->meta) 1941 if (NULL != sr->meta)
1942 GNUNET_CONTAINER_meta_data_iterate (sr->meta, 1942 GNUNET_FS_meta_data_iterate (sr->meta,
1943 &GNUNET_FS_GTK_add_meta_data_to_list_store, 1943 &GNUNET_FS_GTK_add_meta_data_to_list_store,
1944 mctx->md_liststore); 1944 mctx->md_liststore);
1945} 1945}
@@ -2168,9 +2168,9 @@ handle_search_error (struct SearchTab *tab, const char *emsg)
2168 * @return mime type to use, possibly NULL 2168 * @return mime type to use, possibly NULL
2169 */ 2169 */
2170static char * 2170static char *
2171get_mimetype_from_metadata (const struct GNUNET_CONTAINER_MetaData *meta) 2171get_mimetype_from_metadata (const struct GNUNET_FS_MetaData *meta)
2172{ 2172{
2173 return GNUNET_CONTAINER_meta_data_get_first_by_types (meta, 2173 return GNUNET_FS_meta_data_get_first_by_types (meta,
2174 EXTRACTOR_METATYPE_MIMETYPE, 2174 EXTRACTOR_METATYPE_MIMETYPE,
2175#if HAVE_EXTRACTOR_H 2175#if HAVE_EXTRACTOR_H
2176 EXTRACTOR_METATYPE_FORMAT, 2176 EXTRACTOR_METATYPE_FORMAT,
@@ -2192,7 +2192,7 @@ get_mimetype_from_metadata (const struct GNUNET_CONTAINER_MetaData *meta)
2192 */ 2192 */
2193static void 2193static void
2194update_search_result (struct SearchResult *sr, 2194update_search_result (struct SearchResult *sr,
2195 const struct GNUNET_CONTAINER_MetaData *meta, 2195 const struct GNUNET_FS_MetaData *meta,
2196 uint32_t applicability_rank, 2196 uint32_t applicability_rank,
2197 int32_t availability_rank, 2197 int32_t availability_rank,
2198 uint32_t availability_certainty, 2198 uint32_t availability_certainty,
@@ -2229,10 +2229,10 @@ update_search_result (struct SearchResult *sr,
2229 pixbuf = GNUNET_FS_GTK_get_thumbnail_from_meta_data (meta); 2229 pixbuf = GNUNET_FS_GTK_get_thumbnail_from_meta_data (meta);
2230 if (NULL != sr->meta) 2230 if (NULL != sr->meta)
2231 { 2231 {
2232 GNUNET_CONTAINER_meta_data_destroy (sr->meta); 2232 GNUNET_FS_meta_data_destroy (sr->meta);
2233 sr->meta = NULL; 2233 sr->meta = NULL;
2234 } 2234 }
2235 sr->meta = GNUNET_CONTAINER_meta_data_duplicate (meta); 2235 sr->meta = GNUNET_FS_meta_data_duplicate (meta);
2236 if (availability_certainty > 0) 2236 if (availability_certainty > 0)
2237 percent_avail = 2237 percent_avail =
2238 50 + (gint) (availability_rank * 50.0 / availability_certainty); 2238 50 + (gint) (availability_rank * 50.0 / availability_certainty);
@@ -2359,7 +2359,7 @@ GNUNET_GTK_add_search_result (struct SearchTab *tab,
2359 uint32_t anonymity, 2359 uint32_t anonymity,
2360 GtkTreeRowReference *parent_rr, 2360 GtkTreeRowReference *parent_rr,
2361 const struct GNUNET_FS_Uri *uri, 2361 const struct GNUNET_FS_Uri *uri,
2362 const struct GNUNET_CONTAINER_MetaData *meta, 2362 const struct GNUNET_FS_MetaData *meta,
2363 struct GNUNET_FS_SearchResult *result, 2363 struct GNUNET_FS_SearchResult *result,
2364 uint32_t applicability_rank) 2364 uint32_t applicability_rank)
2365{ 2365{
@@ -2451,7 +2451,7 @@ GNUNET_GTK_add_search_result (struct SearchTab *tab,
2451 ts = downloads_treestore; 2451 ts = downloads_treestore;
2452 } 2452 }
2453 sr->uri = (uri == NULL) ? NULL : GNUNET_FS_uri_dup (uri); 2453 sr->uri = (uri == NULL) ? NULL : GNUNET_FS_uri_dup (uri);
2454 sr->meta = GNUNET_CONTAINER_meta_data_duplicate (meta); 2454 sr->meta = GNUNET_FS_meta_data_duplicate (meta);
2455 gtk_tree_store_insert_with_values (ts, 2455 gtk_tree_store_insert_with_values (ts,
2456 &iter, 2456 &iter,
2457 pitr, 2457 pitr,
@@ -2626,7 +2626,7 @@ process_search_result (struct SearchTab *tab,
2626 uint32_t anonymity, 2626 uint32_t anonymity,
2627 struct SearchResult *parent, 2627 struct SearchResult *parent,
2628 const struct GNUNET_FS_Uri *uri, 2628 const struct GNUNET_FS_Uri *uri,
2629 const struct GNUNET_CONTAINER_MetaData *meta, 2629 const struct GNUNET_FS_MetaData *meta,
2630 struct GNUNET_FS_SearchResult *result, 2630 struct GNUNET_FS_SearchResult *result,
2631 uint32_t applicability_rank) 2631 uint32_t applicability_rank)
2632{ 2632{
@@ -2794,7 +2794,7 @@ setup_inner_search (struct GNUNET_FS_SearchContext *sc,
2794 */ 2794 */
2795struct SearchResult * 2795struct SearchResult *
2796GNUNET_GTK_add_to_uri_tab (uint32_t anonymity, 2796GNUNET_GTK_add_to_uri_tab (uint32_t anonymity,
2797 const struct GNUNET_CONTAINER_MetaData *meta, 2797 const struct GNUNET_FS_MetaData *meta,
2798 const struct GNUNET_FS_Uri *uri) 2798 const struct GNUNET_FS_Uri *uri)
2799{ 2799{
2800 struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context (); 2800 struct GNUNET_GTK_MainWindowContext *mctx = GNUNET_FS_GTK_get_main_context ();
@@ -2977,7 +2977,7 @@ static void
2977add_directory_entry (void *cls, 2977add_directory_entry (void *cls,
2978 const char *filename, 2978 const char *filename,
2979 const struct GNUNET_FS_Uri *uri, 2979 const struct GNUNET_FS_Uri *uri,
2980 const struct GNUNET_CONTAINER_MetaData *meta, 2980 const struct GNUNET_FS_MetaData *meta,
2981 size_t length, 2981 size_t length,
2982 const void *data) 2982 const void *data)
2983{ 2983{
@@ -3285,7 +3285,7 @@ setup_download (struct DownloadEntry *de,
3285 struct GNUNET_FS_DownloadContext *dc, 3285 struct GNUNET_FS_DownloadContext *dc,
3286 const struct GNUNET_FS_Uri *uri, 3286 const struct GNUNET_FS_Uri *uri,
3287 const char *filename, 3287 const char *filename,
3288 const struct GNUNET_CONTAINER_MetaData *meta, 3288 const struct GNUNET_FS_MetaData *meta,
3289 uint64_t size, 3289 uint64_t size,
3290 uint64_t completed) 3290 uint64_t completed)
3291{ 3291{
@@ -3399,7 +3399,7 @@ setup_download (struct DownloadEntry *de,
3399 } 3399 }
3400 else 3400 else
3401 { 3401 {
3402 struct GNUNET_CONTAINER_MetaData *meta; 3402 struct GNUNET_FS_MetaData *meta;
3403 3403
3404 /* get metadata from existing tab, might have a mime type */ 3404 /* get metadata from existing tab, might have a mime type */
3405 path = gtk_tree_row_reference_get_path (de->sr->rr); 3405 path = gtk_tree_row_reference_get_path (de->sr->rr);