diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-05-03 21:11:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-05-03 21:11:14 +0000 |
commit | 4092583a7dcb0844d5957909ef81f6766b3f2603 (patch) | |
tree | 84ef0918fa8a3cbdac9d5844577958f2727967c8 /src/fs/fs.h | |
parent | 1d59315240c1d0667c9777caf6ff54c7ec1346ce (diff) | |
download | gnunet-4092583a7dcb0844d5957909ef81f6766b3f2603.tar.gz gnunet-4092583a7dcb0844d5957909ef81f6766b3f2603.zip |
allow linking of downloads to search results
Diffstat (limited to 'src/fs/fs.h')
-rw-r--r-- | src/fs/fs.h | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/fs/fs.h b/src/fs/fs.h index f3b0a8624..7b30367ea 100644 --- a/src/fs/fs.h +++ b/src/fs/fs.h | |||
@@ -544,7 +544,7 @@ struct GNUNET_FS_QueueEntry | |||
544 | /** | 544 | /** |
545 | * Information we store for each search result. | 545 | * Information we store for each search result. |
546 | */ | 546 | */ |
547 | struct SearchResult | 547 | struct GNUNET_FS_SearchResult |
548 | { | 548 | { |
549 | 549 | ||
550 | /** | 550 | /** |
@@ -574,6 +574,14 @@ struct SearchResult | |||
574 | struct GNUNET_FS_DownloadContext *probe_ctx; | 574 | struct GNUNET_FS_DownloadContext *probe_ctx; |
575 | 575 | ||
576 | /** | 576 | /** |
577 | * ID of an associated download based on this search result (or | ||
578 | * NULL for none). | ||
579 | * | ||
580 | * FIXME: not yet serialized. | ||
581 | */ | ||
582 | struct GNUNET_FS_DownloadContext *download; | ||
583 | |||
584 | /** | ||
577 | * Name under which this search result is stored on disk. | 585 | * Name under which this search result is stored on disk. |
578 | */ | 586 | */ |
579 | char *serialization; | 587 | char *serialization; |
@@ -837,7 +845,7 @@ GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc); | |||
837 | * @param sr the search result | 845 | * @param sr the search result |
838 | */ | 846 | */ |
839 | void | 847 | void |
840 | GNUNET_FS_search_start_probe_ (struct SearchResult *sr); | 848 | GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr); |
841 | 849 | ||
842 | /** | 850 | /** |
843 | * Remove serialization/deserialization file from disk. | 851 | * Remove serialization/deserialization file from disk. |
@@ -907,7 +915,7 @@ GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc); | |||
907 | */ | 915 | */ |
908 | void | 916 | void |
909 | GNUNET_FS_search_result_sync_ (const GNUNET_HashCode *key, | 917 | GNUNET_FS_search_result_sync_ (const GNUNET_HashCode *key, |
910 | struct SearchResult *sr); | 918 | struct GNUNET_FS_SearchResult *sr); |
911 | 919 | ||
912 | /** | 920 | /** |
913 | * Synchronize this download struct with its mirror | 921 | * Synchronize this download struct with its mirror |
@@ -1237,7 +1245,7 @@ struct SearchRequestEntry | |||
1237 | GNUNET_HashCode query; | 1245 | GNUNET_HashCode query; |
1238 | 1246 | ||
1239 | /** | 1247 | /** |
1240 | * Map that contains a "struct SearchResult" for each result that | 1248 | * Map that contains a "struct GNUNET_FS_SearchResult" for each result that |
1241 | * was found under this keyword. Note that the entries will point | 1249 | * was found under this keyword. Note that the entries will point |
1242 | * to the same locations as those in the master result map (in | 1250 | * to the same locations as those in the master result map (in |
1243 | * "struct GNUNET_FS_SearchContext"), so they should not be freed. | 1251 | * "struct GNUNET_FS_SearchContext"), so they should not be freed. |
@@ -1321,7 +1329,7 @@ struct GNUNET_FS_SearchContext | |||
1321 | char *emsg; | 1329 | char *emsg; |
1322 | 1330 | ||
1323 | /** | 1331 | /** |
1324 | * Map that contains a "struct SearchResult" for each result that | 1332 | * Map that contains a "struct GNUNET_FS_SearchResult" for each result that |
1325 | * was found in the search. The key for each entry is the XOR of | 1333 | * was found in the search. The key for each entry is the XOR of |
1326 | * the key and query in the CHK URI (as a unique identifier for the | 1334 | * the key and query in the CHK URI (as a unique identifier for the |
1327 | * search result). | 1335 | * search result). |
@@ -1425,6 +1433,14 @@ struct GNUNET_FS_DownloadContext | |||
1425 | struct GNUNET_FS_DownloadContext *parent; | 1433 | struct GNUNET_FS_DownloadContext *parent; |
1426 | 1434 | ||
1427 | /** | 1435 | /** |
1436 | * Associated search (used when downloading files | ||
1437 | * based on search results), or NULL for none. | ||
1438 | * | ||
1439 | * FIXME: not yet serialized | ||
1440 | */ | ||
1441 | struct GNUNET_FS_SearchResult *search; | ||
1442 | |||
1443 | /** | ||
1428 | * Head of list of child downloads. | 1444 | * Head of list of child downloads. |
1429 | */ | 1445 | */ |
1430 | struct GNUNET_FS_DownloadContext *child_head; | 1446 | struct GNUNET_FS_DownloadContext *child_head; |