aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk_open-directory.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-fs-gtk_open-directory.c')
-rw-r--r--src/fs/gnunet-fs-gtk_open-directory.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/fs/gnunet-fs-gtk_open-directory.c b/src/fs/gnunet-fs-gtk_open-directory.c
index 9cc2640a..b6bf9759 100644
--- a/src/fs/gnunet-fs-gtk_open-directory.c
+++ b/src/fs/gnunet-fs-gtk_open-directory.c
@@ -40,6 +40,11 @@ struct AddChildContext
40 * Reference to the directorie's search result. 40 * Reference to the directorie's search result.
41 */ 41 */
42 struct SearchResult *sr; 42 struct SearchResult *sr;
43
44 /**
45 * Anonymity level to use for probes in the directory.
46 */
47 uint32_t anonymity;
43 48
44}; 49};
45 50
@@ -78,7 +83,8 @@ add_child (void *cls, const char *filename, const struct GNUNET_FS_Uri *uri,
78 EXTRACTOR_METAFORMAT_UTF8, "text/plain", 83 EXTRACTOR_METAFORMAT_UTF8, "text/plain",
79 acc->filename, 84 acc->filename,
80 strlen (acc->filename) + 1); 85 strlen (acc->filename) + 1);
81 acc->sr = GNUNET_GTK_add_to_uri_tab (dmeta, NULL); 86 acc->sr = GNUNET_GTK_add_to_uri_tab (acc->anonymity,
87 dmeta, NULL);
82 GNUNET_CONTAINER_meta_data_destroy (dmeta); 88 GNUNET_CONTAINER_meta_data_destroy (dmeta);
83 return; 89 return;
84 } 90 }
@@ -89,6 +95,7 @@ add_child (void *cls, const char *filename, const struct GNUNET_FS_Uri *uri,
89 } 95 }
90 GNUNET_assert (NULL != 96 GNUNET_assert (NULL !=
91 GNUNET_GTK_add_search_result (acc->sr->tab, 97 GNUNET_GTK_add_search_result (acc->sr->tab,
98 acc->anonymity,
92 acc->sr->rr, 99 acc->sr->rr,
93 uri, 100 uri,
94 meta, NULL, 0)); 101 meta, NULL, 0));
@@ -103,7 +110,7 @@ add_child (void *cls, const char *filename, const struct GNUNET_FS_Uri *uri,
103 * @param user_data the builder of the dialog 110 * @param user_data the builder of the dialog
104 */ 111 */
105void 112void
106GNUNET_GTK_open_directory_dialog_response_cb (GtkDialog * dialog, 113GNUNET_GTK_open_directory_dialog_response_cb (GtkDialog *dialog,
107 gint response_id, 114 gint response_id,
108 gpointer user_data) 115 gpointer user_data)
109{ 116{
@@ -122,6 +129,7 @@ GNUNET_GTK_open_directory_dialog_response_cb (GtkDialog * dialog,
122 g_object_unref (G_OBJECT (builder)); 129 g_object_unref (G_OBJECT (builder));
123 acc.filename = filename; 130 acc.filename = filename;
124 acc.sr = NULL; 131 acc.sr = NULL;
132 acc.anonymity = 1; // FIXME, might want to add this to dialog to allow user to set it.
125 GNUNET_FS_GTK_mmap_and_scan (filename, &add_child, &acc); 133 GNUNET_FS_GTK_mmap_and_scan (filename, &add_child, &acc);
126 GNUNET_free (filename); 134 GNUNET_free (filename);
127} 135}