aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-09-06 07:26:42 +0000
committerChristian Grothoff <christian@grothoff.org>2009-09-06 07:26:42 +0000
commit2a9ac93496169b01115de872e78103c6492f6a8c (patch)
treec688ba6f2a3d496baee965bebaaa0821e6b5f521 /src
parent593ccab46356928ca9a4538b5ccf7d9fd1704b85 (diff)
downloadgnunet-2a9ac93496169b01115de872e78103c6492f6a8c.tar.gz
gnunet-2a9ac93496169b01115de872e78103c6492f6a8c.zip
fixes
Diffstat (limited to 'src')
-rw-r--r--src/include/gnunet_fs_service.h44
1 files changed, 35 insertions, 9 deletions
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index 15aa85aa0..fb6b7f133 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -2122,6 +2122,35 @@ void
2122GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc); 2122GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc);
2123 2123
2124 2124
2125
2126
2127/**
2128 * Options for downloading. Compatible options
2129 * can be OR'ed together.
2130 */
2131enum GNUNET_FS_DownloadOptions
2132 {
2133 /**
2134 * No options (use defaults for everything).
2135 */
2136 GNUNET_FS_DOWNLOAD_OPTION_NONE = 0,
2137
2138 /**
2139 * Do a recursive download (that is, automatically trigger the
2140 * download of files in directories).
2141 */
2142 GNUNET_FS_DOWNLOAD_OPTION_RECURSIVE = 1,
2143
2144 /**
2145 * Do not append temporary data to
2146 * the target file (for the IBlocks).
2147 */
2148 GNUNET_FS_DOWNLOAD_NO_TEMPORARIES = 2
2149
2150 };
2151
2152
2153
2125/** 2154/**
2126 * Download parts of a file. Note that this will store 2155 * Download parts of a file. Note that this will store
2127 * the blocks at the respective offset in the given file. Also, the 2156 * the blocks at the respective offset in the given file. Also, the
@@ -2130,7 +2159,7 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc);
2130 * given boundaries (if offset and length do not match the 32k FS 2159 * given boundaries (if offset and length do not match the 32k FS
2131 * block boundaries). <p> 2160 * block boundaries). <p>
2132 * 2161 *
2133 * This function should be used to focus a download towards a 2162 * The given range can be used to focus a download towards a
2134 * particular portion of the file (optimization), not to strictly 2163 * particular portion of the file (optimization), not to strictly
2135 * limit the download to exactly those bytes. 2164 * limit the download to exactly those bytes.
2136 * 2165 *
@@ -2141,9 +2170,7 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc);
2141 * @param offset at what offset should we start the download (typically 0) 2170 * @param offset at what offset should we start the download (typically 0)
2142 * @param length how many bytes should be downloaded starting at offset 2171 * @param length how many bytes should be downloaded starting at offset
2143 * @param anonymity anonymity level to use for the download 2172 * @param anonymity anonymity level to use for the download
2144 * @param no_temporaries set to GNUNET_YES to disallow generation of temporary files 2173 * @param options various download options
2145 * @param recursive should this be a recursive download (useful for directories
2146 * to automatically trigger download of files in the directories)
2147 * @param parent parent download to associate this download with (use NULL 2174 * @param parent parent download to associate this download with (use NULL
2148 * for top-level downloads; useful for manually-triggered recursive downloads) 2175 * for top-level downloads; useful for manually-triggered recursive downloads)
2149 * @return context that can be used to control this download 2176 * @return context that can be used to control this download
@@ -2152,11 +2179,10 @@ struct GNUNET_FS_DownloadContext *
2152GNUNET_FS_file_download_start (struct GNUNET_FS_Handle *h, 2179GNUNET_FS_file_download_start (struct GNUNET_FS_Handle *h,
2153 const struct GNUNET_FS_Uri *uri, 2180 const struct GNUNET_FS_Uri *uri,
2154 const char *filename, 2181 const char *filename,
2155 unsigned long long offset, 2182 uint64_t offset,
2156 unsigned long long length, 2183 uint64_t length,
2157 unsigned int anonymity, 2184 uint32_t anonymity,
2158 int no_temporaries, 2185 enum GNUNET_FS_DownloadOptions options,
2159 int recursive,
2160 struct GNUNET_FS_DownloadContext *parent); 2186 struct GNUNET_FS_DownloadContext *parent);
2161 2187
2162 2188