diff options
Diffstat (limited to 'src/fs/gnunet-fs-gtk-download.h')
-rw-r--r-- | src/fs/gnunet-fs-gtk-download.h | 32 |
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 | */ | ||
31 | struct DownloadContext; | 35 | struct DownloadContext; |
32 | 36 | ||
33 | typedef 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 | */ | ||
94 | void | 101 | void |
95 | GNUNET_GTK_save_as_dialog_free_download_context (struct DownloadContext *dc); | 102 | GNUNET_FS_GTK_download_context_start_download (struct DownloadContext *dc); |
96 | 103 | ||
97 | 104 | ||
98 | void | 105 | /** |
99 | GNUNET_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 | */ | ||
101 | void | 113 | void |
102 | GNUNET_FS_GTK_open_download_as_dialog (struct DownloadContext *dc); | 114 | GNUNET_FS_GTK_open_download_as_dialog (struct DownloadContext *dc); |
103 | 115 | ||