summaryrefslogtreecommitdiff
path: root/src/fs/fs_api.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/fs_api.h')
-rw-r--r--src/fs/fs_api.h231
1 files changed, 91 insertions, 140 deletions
diff --git a/src/fs/fs_api.h b/src/fs/fs_api.h
index ad054ef06..dcc487eb1 100644
--- a/src/fs/fs_api.h
+++ b/src/fs/fs_api.h
@@ -11,12 +11,12 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19*/ 19 */
20 20
21/** 21/**
22 * @file fs/fs_api.h 22 * @file fs/fs_api.h
@@ -90,9 +90,7 @@
90 * @brief complete information needed 90 * @brief complete information needed
91 * to download a file. 91 * to download a file.
92 */ 92 */
93struct FileIdentifier 93struct FileIdentifier {
94{
95
96 /** 94 /**
97 * Total size of the file in bytes. (network byte order (!)) 95 * Total size of the file in bytes. (network byte order (!))
98 */ 96 */
@@ -102,7 +100,6 @@ struct FileIdentifier
102 * Query and key of the top GNUNET_EC_IBlock. 100 * Query and key of the top GNUNET_EC_IBlock.
103 */ 101 */
104 struct ContentHashKey chk; 102 struct ContentHashKey chk;
105
106}; 103};
107 104
108 105
@@ -110,8 +107,7 @@ struct FileIdentifier
110 * Information about a file and its location 107 * Information about a file and its location
111 * (peer claiming to share the file). 108 * (peer claiming to share the file).
112 */ 109 */
113struct Location 110struct Location {
114{
115 /** 111 /**
116 * Information about the shared file. 112 * Information about the shared file.
117 */ 113 */
@@ -132,14 +128,12 @@ struct Location
132 * peer identity and expiration time. 128 * peer identity and expiration time.
133 */ 129 */
134 struct GNUNET_CRYPTO_EddsaSignature contentSignature; 130 struct GNUNET_CRYPTO_EddsaSignature contentSignature;
135
136}; 131};
137 132
138/** 133/**
139 * Types of URIs. 134 * Types of URIs.
140 */ 135 */
141enum GNUNET_FS_UriType 136enum GNUNET_FS_UriType {
142{
143 /** 137 /**
144 * Content-hash-key (simple file). 138 * Content-hash-key (simple file).
145 */ 139 */
@@ -165,17 +159,14 @@ enum GNUNET_FS_UriType
165/** 159/**
166 * A Universal Resource Identifier (URI), opaque. 160 * A Universal Resource Identifier (URI), opaque.
167 */ 161 */
168struct GNUNET_FS_Uri 162struct GNUNET_FS_Uri {
169{
170 /** 163 /**
171 * Type of the URI. 164 * Type of the URI.
172 */ 165 */
173 enum GNUNET_FS_UriType type; 166 enum GNUNET_FS_UriType type;
174 167
175 union 168 union {
176 { 169 struct {
177 struct
178 {
179 /** 170 /**
180 * Keywords start with a '+' if they are mandatory (in which 171 * Keywords start with a '+' if they are mandatory (in which
181 * case the '+' is NOT part of the keyword) and with a simple 172 * case the '+' is NOT part of the keyword) and with a simple
@@ -193,8 +184,7 @@ struct GNUNET_FS_Uri
193 unsigned int keywordCount; 184 unsigned int keywordCount;
194 } ksk; 185 } ksk;
195 186
196 struct 187 struct {
197 {
198 /** 188 /**
199 * Identifier of the namespace. 189 * Identifier of the namespace.
200 */ 190 */
@@ -205,7 +195,6 @@ struct GNUNET_FS_Uri
205 * namespace. 195 * namespace.
206 */ 196 */
207 char *identifier; 197 char *identifier;
208
209 } sks; 198 } sks;
210 199
211 /** 200 /**
@@ -220,7 +209,6 @@ struct GNUNET_FS_Uri
220 */ 209 */
221 struct Location loc; 210 struct Location loc;
222 } data; 211 } data;
223
224}; 212};
225 213
226 214
@@ -228,9 +216,7 @@ struct GNUNET_FS_Uri
228 * Information for a file or directory that is 216 * Information for a file or directory that is
229 * about to be published. 217 * about to be published.
230 */ 218 */
231struct GNUNET_FS_FileInformation 219struct GNUNET_FS_FileInformation {
232{
233
234 /** 220 /**
235 * Files in a directory are kept as a linked list. 221 * Files in a directory are kept as a linked list.
236 */ 222 */
@@ -309,15 +295,11 @@ struct GNUNET_FS_FileInformation
309 /** 295 /**
310 * Data describing either the file or the directory. 296 * Data describing either the file or the directory.
311 */ 297 */
312 union 298 union {
313 {
314
315 /** 299 /**
316 * Data for a file. 300 * Data for a file.
317 */ 301 */
318 struct 302 struct {
319 {
320
321 /** 303 /**
322 * Function that can be used to read the data for the file. 304 * Function that can be used to read the data for the file.
323 */ 305 */
@@ -356,15 +338,12 @@ struct GNUNET_FS_FileInformation
356 * #GNUNET_YES if this step has been completed. 338 * #GNUNET_YES if this step has been completed.
357 */ 339 */
358 int index_start_confirmed; 340 int index_start_confirmed;
359
360 } file; 341 } file;
361 342
362 /** 343 /**
363 * Data for a directory. 344 * Data for a directory.
364 */ 345 */
365 struct 346 struct {
366 {
367
368 /** 347 /**
369 * Linked list of entries in the directory. 348 * Linked list of entries in the directory.
370 */ 349 */
@@ -391,9 +370,7 @@ struct GNUNET_FS_FileInformation
391 * Sum of all of the sizes of all of the files in the directory. 370 * Sum of all of the sizes of all of the files in the directory.
392 */ 371 */
393 uint64_t contents_size; 372 uint64_t contents_size;
394
395 } dir; 373 } dir;
396
397 } data; 374 } data;
398 375
399 /** 376 /**
@@ -405,15 +382,13 @@ struct GNUNET_FS_FileInformation
405 * Are we done publishing this file? 382 * Are we done publishing this file?
406 */ 383 */
407 int is_published; 384 int is_published;
408
409}; 385};
410 386
411 387
412/** 388/**
413 * Priorities for the queue. 389 * Priorities for the queue.
414 */ 390 */
415enum GNUNET_FS_QueuePriority 391enum GNUNET_FS_QueuePriority {
416{
417 /** 392 /**
418 * This is a probe (low priority). 393 * This is a probe (low priority).
419 */ 394 */
@@ -429,8 +404,7 @@ enum GNUNET_FS_QueuePriority
429/** 404/**
430 * Entry in the job queue. 405 * Entry in the job queue.
431 */ 406 */
432struct GNUNET_FS_QueueEntry 407struct GNUNET_FS_QueueEntry {
433{
434 /** 408 /**
435 * This is a linked list. 409 * This is a linked list.
436 */ 410 */
@@ -501,16 +475,13 @@ struct GNUNET_FS_QueueEntry
501 * #GNUNET_YES if the job is active now. 475 * #GNUNET_YES if the job is active now.
502 */ 476 */
503 int active; 477 int active;
504
505}; 478};
506 479
507 480
508/** 481/**
509 * Information we store for each search result. 482 * Information we store for each search result.
510 */ 483 */
511struct GNUNET_FS_SearchResult 484struct GNUNET_FS_SearchResult {
512{
513
514 /** 485 /**
515 * File-sharing context this result belongs to. 486 * File-sharing context this result belongs to.
516 */ 487 */
@@ -625,7 +596,6 @@ struct GNUNET_FS_SearchResult
625 * search result. 596 * search result.
626 */ 597 */
627 uint32_t availability_trials; 598 uint32_t availability_trials;
628
629}; 599};
630 600
631 601
@@ -641,12 +611,12 @@ struct GNUNET_FS_SearchResult
641 * @return queue handle 611 * @return queue handle
642 */ 612 */
643struct GNUNET_FS_QueueEntry * 613struct GNUNET_FS_QueueEntry *
644GNUNET_FS_queue_ (struct GNUNET_FS_Handle *h, 614GNUNET_FS_queue_(struct GNUNET_FS_Handle *h,
645 GNUNET_SCHEDULER_TaskCallback start, 615 GNUNET_SCHEDULER_TaskCallback start,
646 GNUNET_SCHEDULER_TaskCallback stop, 616 GNUNET_SCHEDULER_TaskCallback stop,
647 void *cls, 617 void *cls,
648 unsigned int blocks, 618 unsigned int blocks,
649 enum GNUNET_FS_QueuePriority priority); 619 enum GNUNET_FS_QueuePriority priority);
650 620
651 621
652/** 622/**
@@ -655,7 +625,7 @@ GNUNET_FS_queue_ (struct GNUNET_FS_Handle *h,
655 * @param qe handle for the job 625 * @param qe handle for the job
656 */ 626 */
657void 627void
658GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qe); 628GNUNET_FS_dequeue_(struct GNUNET_FS_QueueEntry *qe);
659 629
660 630
661/** 631/**
@@ -675,11 +645,11 @@ GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qe);
675 * @return number of bytes written, usually "max", 0 on error 645 * @return number of bytes written, usually "max", 0 on error
676 */ 646 */
677size_t 647size_t
678GNUNET_FS_data_reader_file_ (void *cls, 648GNUNET_FS_data_reader_file_(void *cls,
679 uint64_t offset, 649 uint64_t offset,
680 size_t max, 650 size_t max,
681 void *buf, 651 void *buf,
682 char **emsg); 652 char **emsg);
683 653
684 654
685/** 655/**
@@ -689,7 +659,7 @@ GNUNET_FS_data_reader_file_ (void *cls,
689 * @return closure to use 659 * @return closure to use
690 */ 660 */
691void * 661void *
692GNUNET_FS_make_file_reader_context_ (const char *filename); 662GNUNET_FS_make_file_reader_context_(const char *filename);
693 663
694 664
695 665
@@ -710,11 +680,11 @@ GNUNET_FS_make_file_reader_context_ (const char *filename);
710 * @return number of bytes written, usually @a max, 0 on error 680 * @return number of bytes written, usually @a max, 0 on error
711 */ 681 */
712size_t 682size_t
713GNUNET_FS_data_reader_copy_ (void *cls, 683GNUNET_FS_data_reader_copy_(void *cls,
714 uint64_t offset, 684 uint64_t offset,
715 size_t max, 685 size_t max,
716 void *buf, 686 void *buf,
717 char **emsg); 687 char **emsg);
718 688
719 689
720/** 690/**
@@ -733,8 +703,8 @@ GNUNET_FS_data_reader_copy_ (void *cls,
733 * field in the `struct GNUNET_FS_ProgressInfo`. 703 * field in the `struct GNUNET_FS_ProgressInfo`.
734 */ 704 */
735void * 705void *
736GNUNET_FS_search_probe_progress_ (void *cls, 706GNUNET_FS_search_probe_progress_(void *cls,
737 const struct GNUNET_FS_ProgressInfo *info); 707 const struct GNUNET_FS_ProgressInfo *info);
738 708
739 709
740/** 710/**
@@ -743,7 +713,7 @@ GNUNET_FS_search_probe_progress_ (void *cls,
743 * @param cls `struct GNUNET_FS_PublishContext` identifies the upload 713 * @param cls `struct GNUNET_FS_PublishContext` identifies the upload
744 */ 714 */
745void 715void
746GNUNET_FS_publish_main_ (void *cls); 716GNUNET_FS_publish_main_(void *cls);
747 717
748 718
749/** 719/**
@@ -754,8 +724,8 @@ GNUNET_FS_publish_main_ (void *cls);
754 * @param file_id computed hash, NULL on error 724 * @param file_id computed hash, NULL on error
755 */ 725 */
756void 726void
757GNUNET_FS_unindex_process_hash_ (void *cls, 727GNUNET_FS_unindex_process_hash_(void *cls,
758 const struct GNUNET_HashCode *file_id); 728 const struct GNUNET_HashCode *file_id);
759 729
760 730
761/** 731/**
@@ -764,7 +734,7 @@ GNUNET_FS_unindex_process_hash_ (void *cls,
764 * @param uc context for the unindex operation. 734 * @param uc context for the unindex operation.
765 */ 735 */
766void 736void
767GNUNET_FS_unindex_do_extract_keywords_ (struct GNUNET_FS_UnindexContext *uc); 737GNUNET_FS_unindex_do_extract_keywords_(struct GNUNET_FS_UnindexContext *uc);
768 738
769 739
770/** 740/**
@@ -773,7 +743,7 @@ GNUNET_FS_unindex_do_extract_keywords_ (struct GNUNET_FS_UnindexContext *uc);
773 * @param uc context for the unindex operation. 743 * @param uc context for the unindex operation.
774 */ 744 */
775void 745void
776GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc); 746GNUNET_FS_unindex_do_remove_kblocks_(struct GNUNET_FS_UnindexContext *uc);
777 747
778 748
779/** 749/**
@@ -787,10 +757,10 @@ GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc);
787 * @return value returned from callback 757 * @return value returned from callback
788 */ 758 */
789void * 759void *
790GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi, 760GNUNET_FS_publish_make_status_(struct GNUNET_FS_ProgressInfo *pi,
791 struct GNUNET_FS_PublishContext *pc, 761 struct GNUNET_FS_PublishContext *pc,
792 const struct GNUNET_FS_FileInformation *p, 762 const struct GNUNET_FS_FileInformation *p,
793 uint64_t offset); 763 uint64_t offset);
794 764
795 765
796/** 766/**
@@ -801,8 +771,8 @@ GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
801 * @param dc overall download context 771 * @param dc overall download context
802 */ 772 */
803void 773void
804GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi, 774GNUNET_FS_download_make_status_(struct GNUNET_FS_ProgressInfo *pi,
805 struct GNUNET_FS_DownloadContext *dc); 775 struct GNUNET_FS_DownloadContext *dc);
806 776
807 777
808/** 778/**
@@ -812,7 +782,7 @@ GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
812 * @param cls the 'struct GNUNET_FS_DownloadContext' 782 * @param cls the 'struct GNUNET_FS_DownloadContext'
813 */ 783 */
814void 784void
815GNUNET_FS_download_start_task_ (void *cls); 785GNUNET_FS_download_start_task_(void *cls);
816 786
817 787
818 788
@@ -825,9 +795,9 @@ GNUNET_FS_download_start_task_ (void *cls);
825 * @param offset where we are in the file (for progress) 795 * @param offset where we are in the file (for progress)
826 */ 796 */
827void 797void
828GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi, 798GNUNET_FS_unindex_make_status_(struct GNUNET_FS_ProgressInfo *pi,
829 struct GNUNET_FS_UnindexContext *uc, 799 struct GNUNET_FS_UnindexContext *uc,
830 uint64_t offset); 800 uint64_t offset);
831 801
832/** 802/**
833 * Fill in all of the generic fields for a search event and 803 * Fill in all of the generic fields for a search event and
@@ -839,9 +809,9 @@ GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
839 * @return value returned by the callback 809 * @return value returned by the callback
840 */ 810 */
841void * 811void *
842GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi, 812GNUNET_FS_search_make_status_(struct GNUNET_FS_ProgressInfo *pi,
843 struct GNUNET_FS_Handle *h, 813 struct GNUNET_FS_Handle *h,
844 struct GNUNET_FS_SearchContext *sc); 814 struct GNUNET_FS_SearchContext *sc);
845 815
846 816
847/** 817/**
@@ -850,7 +820,7 @@ GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
850 * @param uc context for the unindex operation. 820 * @param uc context for the unindex operation.
851 */ 821 */
852void 822void
853GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc); 823GNUNET_FS_unindex_do_remove_(struct GNUNET_FS_UnindexContext *uc);
854 824
855/** 825/**
856 * Build the request and actually initiate the search using the 826 * Build the request and actually initiate the search using the
@@ -860,7 +830,7 @@ GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc);
860 * @return GNUNET_OK on success, GNUNET_SYSERR on error 830 * @return GNUNET_OK on success, GNUNET_SYSERR on error
861 */ 831 */
862int 832int
863GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc); 833GNUNET_FS_search_start_searching_(struct GNUNET_FS_SearchContext *sc);
864 834
865/** 835/**
866 * Start the downloading process (by entering the queue). 836 * Start the downloading process (by entering the queue).
@@ -868,7 +838,7 @@ GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc);
868 * @param dc our download context 838 * @param dc our download context
869 */ 839 */
870void 840void
871GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc); 841GNUNET_FS_download_start_downloading_(struct GNUNET_FS_DownloadContext *dc);
872 842
873 843
874/** 844/**
@@ -877,7 +847,7 @@ GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc);
877 * @param sr the search result 847 * @param sr the search result
878 */ 848 */
879void 849void
880GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr); 850GNUNET_FS_search_start_probe_(struct GNUNET_FS_SearchResult *sr);
881 851
882 852
883/** 853/**
@@ -888,9 +858,9 @@ GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr);
888 * @param ent entity identifier 858 * @param ent entity identifier
889 */ 859 */
890void 860void
891GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, 861GNUNET_FS_remove_sync_file_(struct GNUNET_FS_Handle *h,
892 const char *ext, 862 const char *ext,
893 const char *ent); 863 const char *ent);
894 864
895 865
896/** 866/**
@@ -901,9 +871,9 @@ GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h,
901 * @param uni unique name of parent 871 * @param uni unique name of parent
902 */ 872 */
903void 873void
904GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, 874GNUNET_FS_remove_sync_dir_(struct GNUNET_FS_Handle *h,
905 const char *ext, 875 const char *ext,
906 const char *uni); 876 const char *uni);
907 877
908 878
909/** 879/**
@@ -915,7 +885,7 @@ GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h,
915 * @param fi the struct to sync 885 * @param fi the struct to sync
916 */ 886 */
917void 887void
918GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f); 888GNUNET_FS_file_information_sync_(struct GNUNET_FS_FileInformation *f);
919 889
920 890
921/** 891/**
@@ -927,7 +897,7 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f);
927 * @param pc the struct to sync 897 * @param pc the struct to sync
928 */ 898 */
929void 899void
930GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc); 900GNUNET_FS_publish_sync_(struct GNUNET_FS_PublishContext *pc);
931 901
932 902
933/** 903/**
@@ -939,7 +909,7 @@ GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc);
939 * @param uc the struct to sync 909 * @param uc the struct to sync
940 */ 910 */
941void 911void
942GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc); 912GNUNET_FS_unindex_sync_(struct GNUNET_FS_UnindexContext *uc);
943 913
944 914
945/** 915/**
@@ -951,7 +921,7 @@ GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc);
951 * @param sc the struct to sync 921 * @param sc the struct to sync
952 */ 922 */
953void 923void
954GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc); 924GNUNET_FS_search_sync_(struct GNUNET_FS_SearchContext *sc);
955 925
956 926
957/** 927/**
@@ -963,7 +933,7 @@ GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc);
963 * @param sr the struct to sync 933 * @param sr the struct to sync
964 */ 934 */
965void 935void
966GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr); 936GNUNET_FS_search_result_sync_(struct GNUNET_FS_SearchResult *sr);
967 937
968 938
969/** 939/**
@@ -975,7 +945,7 @@ GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr);
975 * @param dc the struct to sync 945 * @param dc the struct to sync
976 */ 946 */
977void 947void
978GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc); 948GNUNET_FS_download_sync_(struct GNUNET_FS_DownloadContext *dc);
979 949
980 950
981/** 951/**
@@ -985,7 +955,7 @@ GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc);
985 * @param cls the `struct GNUNET_FS_PublishContext` to signal for 955 * @param cls the `struct GNUNET_FS_PublishContext` to signal for
986 */ 956 */
987void 957void
988GNUNET_FS_publish_signal_suspend_ (void *cls); 958GNUNET_FS_publish_signal_suspend_(void *cls);
989 959
990 960
991/** 961/**
@@ -995,7 +965,7 @@ GNUNET_FS_publish_signal_suspend_ (void *cls);
995 * @param cls the 'struct GNUNET_FS_SearchContext' to signal for 965 * @param cls the 'struct GNUNET_FS_SearchContext' to signal for
996 */ 966 */
997void 967void
998GNUNET_FS_search_signal_suspend_ (void *cls); 968GNUNET_FS_search_signal_suspend_(void *cls);
999 969
1000 970
1001/** 971/**
@@ -1005,7 +975,7 @@ GNUNET_FS_search_signal_suspend_ (void *cls);
1005 * @param cls the `struct GNUNET_FS_DownloadContext` to signal for 975 * @param cls the `struct GNUNET_FS_DownloadContext` to signal for
1006 */ 976 */
1007void 977void
1008GNUNET_FS_download_signal_suspend_ (void *cls); 978GNUNET_FS_download_signal_suspend_(void *cls);
1009 979
1010 980
1011/** 981/**
@@ -1015,7 +985,7 @@ GNUNET_FS_download_signal_suspend_ (void *cls);
1015 * @param cls the `struct GNUNET_FS_UnindexContext` to signal for 985 * @param cls the `struct GNUNET_FS_UnindexContext` to signal for
1016 */ 986 */
1017void 987void
1018GNUNET_FS_unindex_signal_suspend_ (void *cls); 988GNUNET_FS_unindex_signal_suspend_(void *cls);
1019 989
1020 990
1021/** 991/**
@@ -1031,8 +1001,7 @@ typedef void (*SuspendSignalFunction) (void *cls);
1031 * We track all of the top-level activities of FS 1001 * We track all of the top-level activities of FS
1032 * so that we can signal 'suspend' on shutdown. 1002 * so that we can signal 'suspend' on shutdown.
1033 */ 1003 */
1034struct TopLevelActivity 1004struct TopLevelActivity {
1035{
1036 /** 1005 /**
1037 * This is a doubly-linked list. 1006 * This is a doubly-linked list.
1038 */ 1007 */
@@ -1064,9 +1033,9 @@ struct TopLevelActivity
1064 * @return fresh top-level activity handle 1033 * @return fresh top-level activity handle
1065 */ 1034 */
1066struct TopLevelActivity * 1035struct TopLevelActivity *
1067GNUNET_FS_make_top (struct GNUNET_FS_Handle *h, 1036GNUNET_FS_make_top(struct GNUNET_FS_Handle *h,
1068 SuspendSignalFunction ssf, 1037 SuspendSignalFunction ssf,
1069 void *ssf_cls); 1038 void *ssf_cls);
1070 1039
1071 1040
1072/** 1041/**
@@ -1076,16 +1045,15 @@ GNUNET_FS_make_top (struct GNUNET_FS_Handle *h,
1076 * @param top top level activity entry 1045 * @param top top level activity entry
1077 */ 1046 */
1078void 1047void
1079GNUNET_FS_end_top (struct GNUNET_FS_Handle *h, 1048GNUNET_FS_end_top(struct GNUNET_FS_Handle *h,
1080 struct TopLevelActivity *top); 1049 struct TopLevelActivity *top);
1081 1050
1082 1051
1083 1052
1084/** 1053/**
1085 * Master context for most FS operations. 1054 * Master context for most FS operations.
1086 */ 1055 */
1087struct GNUNET_FS_Handle 1056struct GNUNET_FS_Handle {
1088{
1089 /** 1057 /**
1090 * Configuration to use. 1058 * Configuration to use.
1091 */ 1059 */
@@ -1188,15 +1156,13 @@ struct GNUNET_FS_Handle
1188 * Maximum number of parallel requests. 1156 * Maximum number of parallel requests.
1189 */ 1157 */
1190 unsigned int max_parallel_requests; 1158 unsigned int max_parallel_requests;
1191
1192}; 1159};
1193 1160
1194 1161
1195/** 1162/**
1196 * Handle for controlling a publication process. 1163 * Handle for controlling a publication process.
1197 */ 1164 */
1198struct GNUNET_FS_PublishContext 1165struct GNUNET_FS_PublishContext {
1199{
1200 /** 1166 /**
1201 * Handle to the global fs context. 1167 * Handle to the global fs context.
1202 */ 1168 */
@@ -1322,8 +1288,7 @@ struct GNUNET_FS_PublishContext
1322/** 1288/**
1323 * Phases of unindex processing (state machine). 1289 * Phases of unindex processing (state machine).
1324 */ 1290 */
1325enum UnindexState 1291enum UnindexState {
1326{
1327 /** 1292 /**
1328 * We're currently hashing the file. 1293 * We're currently hashing the file.
1329 */ 1294 */
@@ -1366,9 +1331,7 @@ enum UnindexState
1366/** 1331/**
1367 * Handle for controlling an unindexing operation. 1332 * Handle for controlling an unindexing operation.
1368 */ 1333 */
1369struct GNUNET_FS_UnindexContext 1334struct GNUNET_FS_UnindexContext {
1370{
1371
1372 /** 1335 /**
1373 * The content hash key of the last block we processed, will in the 1336 * The content hash key of the last block we processed, will in the
1374 * end be set to the CHK from the URI. Used to remove the KBlocks. 1337 * end be set to the CHK from the URI. Used to remove the KBlocks.
@@ -1482,16 +1445,13 @@ struct GNUNET_FS_UnindexContext
1482 * Current operatinonal phase. 1445 * Current operatinonal phase.
1483 */ 1446 */
1484 enum UnindexState state; 1447 enum UnindexState state;
1485
1486}; 1448};
1487 1449
1488 1450
1489/** 1451/**
1490 * Information we keep for each keyword in a keyword search. 1452 * Information we keep for each keyword in a keyword search.
1491 */ 1453 */
1492struct SearchRequestEntry 1454struct SearchRequestEntry {
1493{
1494
1495 /** 1455 /**
1496 * Hash of the public key, also known as the query. 1456 * Hash of the public key, also known as the query.
1497 */ 1457 */
@@ -1523,15 +1483,13 @@ struct SearchRequestEntry
1523 * (started with '+')? 1483 * (started with '+')?
1524 */ 1484 */
1525 int mandatory; 1485 int mandatory;
1526
1527}; 1486};
1528 1487
1529 1488
1530/** 1489/**
1531 * Handle for controlling a search. 1490 * Handle for controlling a search.
1532 */ 1491 */
1533struct GNUNET_FS_SearchContext 1492struct GNUNET_FS_SearchContext {
1534{
1535 /** 1493 /**
1536 * Handle to the global FS context. 1494 * Handle to the global FS context.
1537 */ 1495 */
@@ -1627,8 +1585,7 @@ struct GNUNET_FS_SearchContext
1627 * order of progression is linear through the states, alternatives 1585 * order of progression is linear through the states, alternatives
1628 * are documented in the comments. 1586 * are documented in the comments.
1629 */ 1587 */
1630enum BlockRequestState 1588enum BlockRequestState {
1631{
1632 /** 1589 /**
1633 * Initial state, block has only been allocated (since it is 1590 * Initial state, block has only been allocated (since it is
1634 * relevant to the overall download request). 1591 * relevant to the overall download request).
@@ -1695,9 +1652,7 @@ enum BlockRequestState
1695/** 1652/**
1696 * Information about an active download request. 1653 * Information about an active download request.
1697 */ 1654 */
1698struct DownloadRequest 1655struct DownloadRequest {
1699{
1700
1701 /** 1656 /**
1702 * Parent in the CHK-tree. 1657 * Parent in the CHK-tree.
1703 */ 1658 */
@@ -1740,7 +1695,6 @@ struct DownloadRequest
1740 * State in the FSM. 1695 * State in the FSM.
1741 */ 1696 */
1742 enum BlockRequestState state; 1697 enum BlockRequestState state;
1743
1744}; 1698};
1745 1699
1746 1700
@@ -1750,7 +1704,7 @@ struct DownloadRequest
1750 * @param dr request to free 1704 * @param dr request to free
1751 */ 1705 */
1752void 1706void
1753GNUNET_FS_free_download_request_ (struct DownloadRequest *dr); 1707GNUNET_FS_free_download_request_(struct DownloadRequest *dr);
1754 1708
1755 1709
1756/** 1710/**
@@ -1759,15 +1713,13 @@ GNUNET_FS_free_download_request_ (struct DownloadRequest *dr);
1759 * @param sr result to start pinging for. 1713 * @param sr result to start pinging for.
1760 */ 1714 */
1761void 1715void
1762GNUNET_FS_stop_probe_ping_task_ (struct GNUNET_FS_SearchResult *sr); 1716GNUNET_FS_stop_probe_ping_task_(struct GNUNET_FS_SearchResult *sr);
1763 1717
1764 1718
1765/** 1719/**
1766 * Context for controlling a download. 1720 * Context for controlling a download.
1767 */ 1721 */
1768struct GNUNET_FS_DownloadContext 1722struct GNUNET_FS_DownloadContext {
1769{
1770
1771 /** 1723 /**
1772 * Global FS context. 1724 * Global FS context.
1773 */ 1725 */
@@ -1959,7 +1911,6 @@ struct GNUNET_FS_DownloadContext
1959 * Are we ready to issue requests (reconstructions are finished)? 1911 * Are we ready to issue requests (reconstructions are finished)?
1960 */ 1912 */
1961 int issue_requests; 1913 int issue_requests;
1962
1963}; 1914};
1964 1915
1965 1916