aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk-download.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-fs-gtk-download.h')
-rw-r--r--src/fs/gnunet-fs-gtk-download.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/src/fs/gnunet-fs-gtk-download.h b/src/fs/gnunet-fs-gtk-download.h
index 0780afa1..3d7ac16c 100644
--- a/src/fs/gnunet-fs-gtk-download.h
+++ b/src/fs/gnunet-fs-gtk-download.h
@@ -23,14 +23,17 @@
23 * @brief functions for downloading 23 * @brief functions for downloading
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 */ 25 */
26
27#ifndef GNUNET_FS_GTK_DOWNLOAD_H 26#ifndef GNUNET_FS_GTK_DOWNLOAD_H
28#define GNUNET_FS_GTK_DOWNLOAD_H 27#define GNUNET_FS_GTK_DOWNLOAD_H
28
29#include "gnunet-fs-gtk-common.h" 29#include "gnunet-fs-gtk-common.h"
30 30
31
32/**
33 * Information we keep for a download.
34 */
31struct DownloadContext; 35struct DownloadContext;
32 36
33typedef void (*GNUNET_FS_DownloadAsCallback ) (struct DownloadContext *dc);
34 37
35/** 38/**
36 * Information we keep for a download. 39 * Information we keep for a download.
@@ -84,20 +87,29 @@ struct DownloadContext
84 */ 87 */
85 struct SearchTab *tab; 88 struct SearchTab *tab;
86 89
87 /**
88 * A function to call once a filename is picked.
89 */
90 GNUNET_FS_DownloadAsCallback cb;
91}; 90};
92 91
93 92
93/**
94 * Actually start the download that is specified by the given download
95 * context and its options. Will add a download entry to the
96 * respective tree model and trigger a start of the download using the
97 * FS-API.
98 *
99 * @param dc download context of the download to execute
100 */
94void 101void
95GNUNET_GTK_save_as_dialog_free_download_context (struct DownloadContext *dc); 102GNUNET_FS_GTK_download_context_start_download (struct DownloadContext *dc);
96 103
97 104
98void 105/**
99GNUNET_FS_GTK_default_open_download_as_callback (struct DownloadContext *dc); 106 * Open the 'save as' dialog for a download. Calls
100 107 * 'GNUNET_FS_GTK_download_context_start_download' when the dialog is
108 * complete. Will release the 'dc' resources if the dialog is
109 * cancelled.
110 *
111 * @param dc download context for the file/directory
112 */
101void 113void
102GNUNET_FS_GTK_open_download_as_dialog (struct DownloadContext *dc); 114GNUNET_FS_GTK_open_download_as_dialog (struct DownloadContext *dc);
103 115