diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-05 15:09:28 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-05 15:09:28 +0200 |
commit | c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207 (patch) | |
tree | cac3ce030d77b4cbe7c7dc62ed58cfe6d24f73e1 /src/fs/fs_api.h | |
parent | fbb71d527c7d6babf269a8fefce1db291b9f7068 (diff) | |
download | gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.tar.gz gnunet-c4e9ba925ffd758aaa3feee2ccfc0b76f26fe207.zip |
global reindent, now with uncrustify hook enabled
Diffstat (limited to 'src/fs/fs_api.h')
-rw-r--r-- | src/fs/fs_api.h | 210 |
1 files changed, 117 insertions, 93 deletions
diff --git a/src/fs/fs_api.h b/src/fs/fs_api.h index dcc487eb1..f7eb40b42 100644 --- a/src/fs/fs_api.h +++ b/src/fs/fs_api.h | |||
@@ -90,7 +90,8 @@ | |||
90 | * @brief complete information needed | 90 | * @brief complete information needed |
91 | * to download a file. | 91 | * to download a file. |
92 | */ | 92 | */ |
93 | struct FileIdentifier { | 93 | struct FileIdentifier |
94 | { | ||
94 | /** | 95 | /** |
95 | * Total size of the file in bytes. (network byte order (!)) | 96 | * Total size of the file in bytes. (network byte order (!)) |
96 | */ | 97 | */ |
@@ -107,7 +108,8 @@ struct FileIdentifier { | |||
107 | * Information about a file and its location | 108 | * Information about a file and its location |
108 | * (peer claiming to share the file). | 109 | * (peer claiming to share the file). |
109 | */ | 110 | */ |
110 | struct Location { | 111 | struct Location |
112 | { | ||
111 | /** | 113 | /** |
112 | * Information about the shared file. | 114 | * Information about the shared file. |
113 | */ | 115 | */ |
@@ -133,7 +135,8 @@ struct Location { | |||
133 | /** | 135 | /** |
134 | * Types of URIs. | 136 | * Types of URIs. |
135 | */ | 137 | */ |
136 | enum GNUNET_FS_UriType { | 138 | enum GNUNET_FS_UriType |
139 | { | ||
137 | /** | 140 | /** |
138 | * Content-hash-key (simple file). | 141 | * Content-hash-key (simple file). |
139 | */ | 142 | */ |
@@ -159,14 +162,17 @@ enum GNUNET_FS_UriType { | |||
159 | /** | 162 | /** |
160 | * A Universal Resource Identifier (URI), opaque. | 163 | * A Universal Resource Identifier (URI), opaque. |
161 | */ | 164 | */ |
162 | struct GNUNET_FS_Uri { | 165 | struct GNUNET_FS_Uri |
166 | { | ||
163 | /** | 167 | /** |
164 | * Type of the URI. | 168 | * Type of the URI. |
165 | */ | 169 | */ |
166 | enum GNUNET_FS_UriType type; | 170 | enum GNUNET_FS_UriType type; |
167 | 171 | ||
168 | union { | 172 | union |
169 | struct { | 173 | { |
174 | struct | ||
175 | { | ||
170 | /** | 176 | /** |
171 | * Keywords start with a '+' if they are mandatory (in which | 177 | * Keywords start with a '+' if they are mandatory (in which |
172 | * case the '+' is NOT part of the keyword) and with a simple | 178 | * case the '+' is NOT part of the keyword) and with a simple |
@@ -184,7 +190,8 @@ struct GNUNET_FS_Uri { | |||
184 | unsigned int keywordCount; | 190 | unsigned int keywordCount; |
185 | } ksk; | 191 | } ksk; |
186 | 192 | ||
187 | struct { | 193 | struct |
194 | { | ||
188 | /** | 195 | /** |
189 | * Identifier of the namespace. | 196 | * Identifier of the namespace. |
190 | */ | 197 | */ |
@@ -216,7 +223,8 @@ struct GNUNET_FS_Uri { | |||
216 | * Information for a file or directory that is | 223 | * Information for a file or directory that is |
217 | * about to be published. | 224 | * about to be published. |
218 | */ | 225 | */ |
219 | struct GNUNET_FS_FileInformation { | 226 | struct GNUNET_FS_FileInformation |
227 | { | ||
220 | /** | 228 | /** |
221 | * Files in a directory are kept as a linked list. | 229 | * Files in a directory are kept as a linked list. |
222 | */ | 230 | */ |
@@ -295,11 +303,13 @@ struct GNUNET_FS_FileInformation { | |||
295 | /** | 303 | /** |
296 | * Data describing either the file or the directory. | 304 | * Data describing either the file or the directory. |
297 | */ | 305 | */ |
298 | union { | 306 | union |
307 | { | ||
299 | /** | 308 | /** |
300 | * Data for a file. | 309 | * Data for a file. |
301 | */ | 310 | */ |
302 | struct { | 311 | struct |
312 | { | ||
303 | /** | 313 | /** |
304 | * Function that can be used to read the data for the file. | 314 | * Function that can be used to read the data for the file. |
305 | */ | 315 | */ |
@@ -343,7 +353,8 @@ struct GNUNET_FS_FileInformation { | |||
343 | /** | 353 | /** |
344 | * Data for a directory. | 354 | * Data for a directory. |
345 | */ | 355 | */ |
346 | struct { | 356 | struct |
357 | { | ||
347 | /** | 358 | /** |
348 | * Linked list of entries in the directory. | 359 | * Linked list of entries in the directory. |
349 | */ | 360 | */ |
@@ -388,7 +399,8 @@ struct GNUNET_FS_FileInformation { | |||
388 | /** | 399 | /** |
389 | * Priorities for the queue. | 400 | * Priorities for the queue. |
390 | */ | 401 | */ |
391 | enum GNUNET_FS_QueuePriority { | 402 | enum GNUNET_FS_QueuePriority |
403 | { | ||
392 | /** | 404 | /** |
393 | * This is a probe (low priority). | 405 | * This is a probe (low priority). |
394 | */ | 406 | */ |
@@ -404,7 +416,8 @@ enum GNUNET_FS_QueuePriority { | |||
404 | /** | 416 | /** |
405 | * Entry in the job queue. | 417 | * Entry in the job queue. |
406 | */ | 418 | */ |
407 | struct GNUNET_FS_QueueEntry { | 419 | struct GNUNET_FS_QueueEntry |
420 | { | ||
408 | /** | 421 | /** |
409 | * This is a linked list. | 422 | * This is a linked list. |
410 | */ | 423 | */ |
@@ -481,7 +494,8 @@ struct GNUNET_FS_QueueEntry { | |||
481 | /** | 494 | /** |
482 | * Information we store for each search result. | 495 | * Information we store for each search result. |
483 | */ | 496 | */ |
484 | struct GNUNET_FS_SearchResult { | 497 | struct GNUNET_FS_SearchResult |
498 | { | ||
485 | /** | 499 | /** |
486 | * File-sharing context this result belongs to. | 500 | * File-sharing context this result belongs to. |
487 | */ | 501 | */ |
@@ -556,7 +570,7 @@ struct GNUNET_FS_SearchResult { | |||
556 | * complete on time (and that will need to be cancelled if we clean | 570 | * complete on time (and that will need to be cancelled if we clean |
557 | * up the search result before then). | 571 | * up the search result before then). |
558 | */ | 572 | */ |
559 | struct GNUNET_SCHEDULER_Task * probe_cancel_task; | 573 | struct GNUNET_SCHEDULER_Task *probe_cancel_task; |
560 | 574 | ||
561 | /** | 575 | /** |
562 | * When did the current probe become active? | 576 | * When did the current probe become active? |
@@ -611,12 +625,12 @@ struct GNUNET_FS_SearchResult { | |||
611 | * @return queue handle | 625 | * @return queue handle |
612 | */ | 626 | */ |
613 | struct GNUNET_FS_QueueEntry * | 627 | struct GNUNET_FS_QueueEntry * |
614 | GNUNET_FS_queue_(struct GNUNET_FS_Handle *h, | 628 | GNUNET_FS_queue_ (struct GNUNET_FS_Handle *h, |
615 | GNUNET_SCHEDULER_TaskCallback start, | 629 | GNUNET_SCHEDULER_TaskCallback start, |
616 | GNUNET_SCHEDULER_TaskCallback stop, | 630 | GNUNET_SCHEDULER_TaskCallback stop, |
617 | void *cls, | 631 | void *cls, |
618 | unsigned int blocks, | 632 | unsigned int blocks, |
619 | enum GNUNET_FS_QueuePriority priority); | 633 | enum GNUNET_FS_QueuePriority priority); |
620 | 634 | ||
621 | 635 | ||
622 | /** | 636 | /** |
@@ -625,7 +639,7 @@ GNUNET_FS_queue_(struct GNUNET_FS_Handle *h, | |||
625 | * @param qe handle for the job | 639 | * @param qe handle for the job |
626 | */ | 640 | */ |
627 | void | 641 | void |
628 | GNUNET_FS_dequeue_(struct GNUNET_FS_QueueEntry *qe); | 642 | GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qe); |
629 | 643 | ||
630 | 644 | ||
631 | /** | 645 | /** |
@@ -645,11 +659,11 @@ GNUNET_FS_dequeue_(struct GNUNET_FS_QueueEntry *qe); | |||
645 | * @return number of bytes written, usually "max", 0 on error | 659 | * @return number of bytes written, usually "max", 0 on error |
646 | */ | 660 | */ |
647 | size_t | 661 | size_t |
648 | GNUNET_FS_data_reader_file_(void *cls, | 662 | GNUNET_FS_data_reader_file_ (void *cls, |
649 | uint64_t offset, | 663 | uint64_t offset, |
650 | size_t max, | 664 | size_t max, |
651 | void *buf, | 665 | void *buf, |
652 | char **emsg); | 666 | char **emsg); |
653 | 667 | ||
654 | 668 | ||
655 | /** | 669 | /** |
@@ -659,7 +673,7 @@ GNUNET_FS_data_reader_file_(void *cls, | |||
659 | * @return closure to use | 673 | * @return closure to use |
660 | */ | 674 | */ |
661 | void * | 675 | void * |
662 | GNUNET_FS_make_file_reader_context_(const char *filename); | 676 | GNUNET_FS_make_file_reader_context_ (const char *filename); |
663 | 677 | ||
664 | 678 | ||
665 | 679 | ||
@@ -680,11 +694,11 @@ GNUNET_FS_make_file_reader_context_(const char *filename); | |||
680 | * @return number of bytes written, usually @a max, 0 on error | 694 | * @return number of bytes written, usually @a max, 0 on error |
681 | */ | 695 | */ |
682 | size_t | 696 | size_t |
683 | GNUNET_FS_data_reader_copy_(void *cls, | 697 | GNUNET_FS_data_reader_copy_ (void *cls, |
684 | uint64_t offset, | 698 | uint64_t offset, |
685 | size_t max, | 699 | size_t max, |
686 | void *buf, | 700 | void *buf, |
687 | char **emsg); | 701 | char **emsg); |
688 | 702 | ||
689 | 703 | ||
690 | /** | 704 | /** |
@@ -703,8 +717,8 @@ GNUNET_FS_data_reader_copy_(void *cls, | |||
703 | * field in the `struct GNUNET_FS_ProgressInfo`. | 717 | * field in the `struct GNUNET_FS_ProgressInfo`. |
704 | */ | 718 | */ |
705 | void * | 719 | void * |
706 | GNUNET_FS_search_probe_progress_(void *cls, | 720 | GNUNET_FS_search_probe_progress_ (void *cls, |
707 | const struct GNUNET_FS_ProgressInfo *info); | 721 | const struct GNUNET_FS_ProgressInfo *info); |
708 | 722 | ||
709 | 723 | ||
710 | /** | 724 | /** |
@@ -713,7 +727,7 @@ GNUNET_FS_search_probe_progress_(void *cls, | |||
713 | * @param cls `struct GNUNET_FS_PublishContext` identifies the upload | 727 | * @param cls `struct GNUNET_FS_PublishContext` identifies the upload |
714 | */ | 728 | */ |
715 | void | 729 | void |
716 | GNUNET_FS_publish_main_(void *cls); | 730 | GNUNET_FS_publish_main_ (void *cls); |
717 | 731 | ||
718 | 732 | ||
719 | /** | 733 | /** |
@@ -724,8 +738,8 @@ GNUNET_FS_publish_main_(void *cls); | |||
724 | * @param file_id computed hash, NULL on error | 738 | * @param file_id computed hash, NULL on error |
725 | */ | 739 | */ |
726 | void | 740 | void |
727 | GNUNET_FS_unindex_process_hash_(void *cls, | 741 | GNUNET_FS_unindex_process_hash_ (void *cls, |
728 | const struct GNUNET_HashCode *file_id); | 742 | const struct GNUNET_HashCode *file_id); |
729 | 743 | ||
730 | 744 | ||
731 | /** | 745 | /** |
@@ -734,7 +748,7 @@ GNUNET_FS_unindex_process_hash_(void *cls, | |||
734 | * @param uc context for the unindex operation. | 748 | * @param uc context for the unindex operation. |
735 | */ | 749 | */ |
736 | void | 750 | void |
737 | GNUNET_FS_unindex_do_extract_keywords_(struct GNUNET_FS_UnindexContext *uc); | 751 | GNUNET_FS_unindex_do_extract_keywords_ (struct GNUNET_FS_UnindexContext *uc); |
738 | 752 | ||
739 | 753 | ||
740 | /** | 754 | /** |
@@ -743,7 +757,7 @@ GNUNET_FS_unindex_do_extract_keywords_(struct GNUNET_FS_UnindexContext *uc); | |||
743 | * @param uc context for the unindex operation. | 757 | * @param uc context for the unindex operation. |
744 | */ | 758 | */ |
745 | void | 759 | void |
746 | GNUNET_FS_unindex_do_remove_kblocks_(struct GNUNET_FS_UnindexContext *uc); | 760 | GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc); |
747 | 761 | ||
748 | 762 | ||
749 | /** | 763 | /** |
@@ -757,10 +771,10 @@ GNUNET_FS_unindex_do_remove_kblocks_(struct GNUNET_FS_UnindexContext *uc); | |||
757 | * @return value returned from callback | 771 | * @return value returned from callback |
758 | */ | 772 | */ |
759 | void * | 773 | void * |
760 | GNUNET_FS_publish_make_status_(struct GNUNET_FS_ProgressInfo *pi, | 774 | GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi, |
761 | struct GNUNET_FS_PublishContext *pc, | 775 | struct GNUNET_FS_PublishContext *pc, |
762 | const struct GNUNET_FS_FileInformation *p, | 776 | const struct GNUNET_FS_FileInformation *p, |
763 | uint64_t offset); | 777 | uint64_t offset); |
764 | 778 | ||
765 | 779 | ||
766 | /** | 780 | /** |
@@ -771,8 +785,8 @@ GNUNET_FS_publish_make_status_(struct GNUNET_FS_ProgressInfo *pi, | |||
771 | * @param dc overall download context | 785 | * @param dc overall download context |
772 | */ | 786 | */ |
773 | void | 787 | void |
774 | GNUNET_FS_download_make_status_(struct GNUNET_FS_ProgressInfo *pi, | 788 | GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi, |
775 | struct GNUNET_FS_DownloadContext *dc); | 789 | struct GNUNET_FS_DownloadContext *dc); |
776 | 790 | ||
777 | 791 | ||
778 | /** | 792 | /** |
@@ -782,7 +796,7 @@ GNUNET_FS_download_make_status_(struct GNUNET_FS_ProgressInfo *pi, | |||
782 | * @param cls the 'struct GNUNET_FS_DownloadContext' | 796 | * @param cls the 'struct GNUNET_FS_DownloadContext' |
783 | */ | 797 | */ |
784 | void | 798 | void |
785 | GNUNET_FS_download_start_task_(void *cls); | 799 | GNUNET_FS_download_start_task_ (void *cls); |
786 | 800 | ||
787 | 801 | ||
788 | 802 | ||
@@ -795,9 +809,9 @@ GNUNET_FS_download_start_task_(void *cls); | |||
795 | * @param offset where we are in the file (for progress) | 809 | * @param offset where we are in the file (for progress) |
796 | */ | 810 | */ |
797 | void | 811 | void |
798 | GNUNET_FS_unindex_make_status_(struct GNUNET_FS_ProgressInfo *pi, | 812 | GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi, |
799 | struct GNUNET_FS_UnindexContext *uc, | 813 | struct GNUNET_FS_UnindexContext *uc, |
800 | uint64_t offset); | 814 | uint64_t offset); |
801 | 815 | ||
802 | /** | 816 | /** |
803 | * Fill in all of the generic fields for a search event and | 817 | * Fill in all of the generic fields for a search event and |
@@ -809,9 +823,9 @@ GNUNET_FS_unindex_make_status_(struct GNUNET_FS_ProgressInfo *pi, | |||
809 | * @return value returned by the callback | 823 | * @return value returned by the callback |
810 | */ | 824 | */ |
811 | void * | 825 | void * |
812 | GNUNET_FS_search_make_status_(struct GNUNET_FS_ProgressInfo *pi, | 826 | GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi, |
813 | struct GNUNET_FS_Handle *h, | 827 | struct GNUNET_FS_Handle *h, |
814 | struct GNUNET_FS_SearchContext *sc); | 828 | struct GNUNET_FS_SearchContext *sc); |
815 | 829 | ||
816 | 830 | ||
817 | /** | 831 | /** |
@@ -820,7 +834,7 @@ GNUNET_FS_search_make_status_(struct GNUNET_FS_ProgressInfo *pi, | |||
820 | * @param uc context for the unindex operation. | 834 | * @param uc context for the unindex operation. |
821 | */ | 835 | */ |
822 | void | 836 | void |
823 | GNUNET_FS_unindex_do_remove_(struct GNUNET_FS_UnindexContext *uc); | 837 | GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc); |
824 | 838 | ||
825 | /** | 839 | /** |
826 | * Build the request and actually initiate the search using the | 840 | * Build the request and actually initiate the search using the |
@@ -830,7 +844,7 @@ GNUNET_FS_unindex_do_remove_(struct GNUNET_FS_UnindexContext *uc); | |||
830 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 844 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
831 | */ | 845 | */ |
832 | int | 846 | int |
833 | GNUNET_FS_search_start_searching_(struct GNUNET_FS_SearchContext *sc); | 847 | GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc); |
834 | 848 | ||
835 | /** | 849 | /** |
836 | * Start the downloading process (by entering the queue). | 850 | * Start the downloading process (by entering the queue). |
@@ -838,7 +852,7 @@ GNUNET_FS_search_start_searching_(struct GNUNET_FS_SearchContext *sc); | |||
838 | * @param dc our download context | 852 | * @param dc our download context |
839 | */ | 853 | */ |
840 | void | 854 | void |
841 | GNUNET_FS_download_start_downloading_(struct GNUNET_FS_DownloadContext *dc); | 855 | GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc); |
842 | 856 | ||
843 | 857 | ||
844 | /** | 858 | /** |
@@ -847,7 +861,7 @@ GNUNET_FS_download_start_downloading_(struct GNUNET_FS_DownloadContext *dc); | |||
847 | * @param sr the search result | 861 | * @param sr the search result |
848 | */ | 862 | */ |
849 | void | 863 | void |
850 | GNUNET_FS_search_start_probe_(struct GNUNET_FS_SearchResult *sr); | 864 | GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr); |
851 | 865 | ||
852 | 866 | ||
853 | /** | 867 | /** |
@@ -858,9 +872,9 @@ GNUNET_FS_search_start_probe_(struct GNUNET_FS_SearchResult *sr); | |||
858 | * @param ent entity identifier | 872 | * @param ent entity identifier |
859 | */ | 873 | */ |
860 | void | 874 | void |
861 | GNUNET_FS_remove_sync_file_(struct GNUNET_FS_Handle *h, | 875 | GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, |
862 | const char *ext, | 876 | const char *ext, |
863 | const char *ent); | 877 | const char *ent); |
864 | 878 | ||
865 | 879 | ||
866 | /** | 880 | /** |
@@ -871,9 +885,9 @@ GNUNET_FS_remove_sync_file_(struct GNUNET_FS_Handle *h, | |||
871 | * @param uni unique name of parent | 885 | * @param uni unique name of parent |
872 | */ | 886 | */ |
873 | void | 887 | void |
874 | GNUNET_FS_remove_sync_dir_(struct GNUNET_FS_Handle *h, | 888 | GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, |
875 | const char *ext, | 889 | const char *ext, |
876 | const char *uni); | 890 | const char *uni); |
877 | 891 | ||
878 | 892 | ||
879 | /** | 893 | /** |
@@ -885,7 +899,7 @@ GNUNET_FS_remove_sync_dir_(struct GNUNET_FS_Handle *h, | |||
885 | * @param fi the struct to sync | 899 | * @param fi the struct to sync |
886 | */ | 900 | */ |
887 | void | 901 | void |
888 | GNUNET_FS_file_information_sync_(struct GNUNET_FS_FileInformation *f); | 902 | GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f); |
889 | 903 | ||
890 | 904 | ||
891 | /** | 905 | /** |
@@ -897,7 +911,7 @@ GNUNET_FS_file_information_sync_(struct GNUNET_FS_FileInformation *f); | |||
897 | * @param pc the struct to sync | 911 | * @param pc the struct to sync |
898 | */ | 912 | */ |
899 | void | 913 | void |
900 | GNUNET_FS_publish_sync_(struct GNUNET_FS_PublishContext *pc); | 914 | GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc); |
901 | 915 | ||
902 | 916 | ||
903 | /** | 917 | /** |
@@ -909,7 +923,7 @@ GNUNET_FS_publish_sync_(struct GNUNET_FS_PublishContext *pc); | |||
909 | * @param uc the struct to sync | 923 | * @param uc the struct to sync |
910 | */ | 924 | */ |
911 | void | 925 | void |
912 | GNUNET_FS_unindex_sync_(struct GNUNET_FS_UnindexContext *uc); | 926 | GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc); |
913 | 927 | ||
914 | 928 | ||
915 | /** | 929 | /** |
@@ -921,7 +935,7 @@ GNUNET_FS_unindex_sync_(struct GNUNET_FS_UnindexContext *uc); | |||
921 | * @param sc the struct to sync | 935 | * @param sc the struct to sync |
922 | */ | 936 | */ |
923 | void | 937 | void |
924 | GNUNET_FS_search_sync_(struct GNUNET_FS_SearchContext *sc); | 938 | GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc); |
925 | 939 | ||
926 | 940 | ||
927 | /** | 941 | /** |
@@ -933,7 +947,7 @@ GNUNET_FS_search_sync_(struct GNUNET_FS_SearchContext *sc); | |||
933 | * @param sr the struct to sync | 947 | * @param sr the struct to sync |
934 | */ | 948 | */ |
935 | void | 949 | void |
936 | GNUNET_FS_search_result_sync_(struct GNUNET_FS_SearchResult *sr); | 950 | GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr); |
937 | 951 | ||
938 | 952 | ||
939 | /** | 953 | /** |
@@ -945,7 +959,7 @@ GNUNET_FS_search_result_sync_(struct GNUNET_FS_SearchResult *sr); | |||
945 | * @param dc the struct to sync | 959 | * @param dc the struct to sync |
946 | */ | 960 | */ |
947 | void | 961 | void |
948 | GNUNET_FS_download_sync_(struct GNUNET_FS_DownloadContext *dc); | 962 | GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc); |
949 | 963 | ||
950 | 964 | ||
951 | /** | 965 | /** |
@@ -955,7 +969,7 @@ GNUNET_FS_download_sync_(struct GNUNET_FS_DownloadContext *dc); | |||
955 | * @param cls the `struct GNUNET_FS_PublishContext` to signal for | 969 | * @param cls the `struct GNUNET_FS_PublishContext` to signal for |
956 | */ | 970 | */ |
957 | void | 971 | void |
958 | GNUNET_FS_publish_signal_suspend_(void *cls); | 972 | GNUNET_FS_publish_signal_suspend_ (void *cls); |
959 | 973 | ||
960 | 974 | ||
961 | /** | 975 | /** |
@@ -965,7 +979,7 @@ GNUNET_FS_publish_signal_suspend_(void *cls); | |||
965 | * @param cls the 'struct GNUNET_FS_SearchContext' to signal for | 979 | * @param cls the 'struct GNUNET_FS_SearchContext' to signal for |
966 | */ | 980 | */ |
967 | void | 981 | void |
968 | GNUNET_FS_search_signal_suspend_(void *cls); | 982 | GNUNET_FS_search_signal_suspend_ (void *cls); |
969 | 983 | ||
970 | 984 | ||
971 | /** | 985 | /** |
@@ -975,7 +989,7 @@ GNUNET_FS_search_signal_suspend_(void *cls); | |||
975 | * @param cls the `struct GNUNET_FS_DownloadContext` to signal for | 989 | * @param cls the `struct GNUNET_FS_DownloadContext` to signal for |
976 | */ | 990 | */ |
977 | void | 991 | void |
978 | GNUNET_FS_download_signal_suspend_(void *cls); | 992 | GNUNET_FS_download_signal_suspend_ (void *cls); |
979 | 993 | ||
980 | 994 | ||
981 | /** | 995 | /** |
@@ -985,7 +999,7 @@ GNUNET_FS_download_signal_suspend_(void *cls); | |||
985 | * @param cls the `struct GNUNET_FS_UnindexContext` to signal for | 999 | * @param cls the `struct GNUNET_FS_UnindexContext` to signal for |
986 | */ | 1000 | */ |
987 | void | 1001 | void |
988 | GNUNET_FS_unindex_signal_suspend_(void *cls); | 1002 | GNUNET_FS_unindex_signal_suspend_ (void *cls); |
989 | 1003 | ||
990 | 1004 | ||
991 | /** | 1005 | /** |
@@ -1001,7 +1015,8 @@ typedef void (*SuspendSignalFunction) (void *cls); | |||
1001 | * We track all of the top-level activities of FS | 1015 | * We track all of the top-level activities of FS |
1002 | * so that we can signal 'suspend' on shutdown. | 1016 | * so that we can signal 'suspend' on shutdown. |
1003 | */ | 1017 | */ |
1004 | struct TopLevelActivity { | 1018 | struct TopLevelActivity |
1019 | { | ||
1005 | /** | 1020 | /** |
1006 | * This is a doubly-linked list. | 1021 | * This is a doubly-linked list. |
1007 | */ | 1022 | */ |
@@ -1033,9 +1048,9 @@ struct TopLevelActivity { | |||
1033 | * @return fresh top-level activity handle | 1048 | * @return fresh top-level activity handle |
1034 | */ | 1049 | */ |
1035 | struct TopLevelActivity * | 1050 | struct TopLevelActivity * |
1036 | GNUNET_FS_make_top(struct GNUNET_FS_Handle *h, | 1051 | GNUNET_FS_make_top (struct GNUNET_FS_Handle *h, |
1037 | SuspendSignalFunction ssf, | 1052 | SuspendSignalFunction ssf, |
1038 | void *ssf_cls); | 1053 | void *ssf_cls); |
1039 | 1054 | ||
1040 | 1055 | ||
1041 | /** | 1056 | /** |
@@ -1045,15 +1060,16 @@ GNUNET_FS_make_top(struct GNUNET_FS_Handle *h, | |||
1045 | * @param top top level activity entry | 1060 | * @param top top level activity entry |
1046 | */ | 1061 | */ |
1047 | void | 1062 | void |
1048 | GNUNET_FS_end_top(struct GNUNET_FS_Handle *h, | 1063 | GNUNET_FS_end_top (struct GNUNET_FS_Handle *h, |
1049 | struct TopLevelActivity *top); | 1064 | struct TopLevelActivity *top); |
1050 | 1065 | ||
1051 | 1066 | ||
1052 | 1067 | ||
1053 | /** | 1068 | /** |
1054 | * Master context for most FS operations. | 1069 | * Master context for most FS operations. |
1055 | */ | 1070 | */ |
1056 | struct GNUNET_FS_Handle { | 1071 | struct GNUNET_FS_Handle |
1072 | { | ||
1057 | /** | 1073 | /** |
1058 | * Configuration to use. | 1074 | * Configuration to use. |
1059 | */ | 1075 | */ |
@@ -1118,13 +1134,13 @@ struct GNUNET_FS_Handle { | |||
1118 | * Task that processes the jobs in the running and pending queues | 1134 | * Task that processes the jobs in the running and pending queues |
1119 | * (and moves jobs around as needed). | 1135 | * (and moves jobs around as needed). |
1120 | */ | 1136 | */ |
1121 | struct GNUNET_SCHEDULER_Task * queue_job; | 1137 | struct GNUNET_SCHEDULER_Task *queue_job; |
1122 | 1138 | ||
1123 | /** | 1139 | /** |
1124 | * Task we use to report periodically to the application that | 1140 | * Task we use to report periodically to the application that |
1125 | * certain search probes (from @e probes_head) are still running. | 1141 | * certain search probes (from @e probes_head) are still running. |
1126 | */ | 1142 | */ |
1127 | struct GNUNET_SCHEDULER_Task * probe_ping_task; | 1143 | struct GNUNET_SCHEDULER_Task *probe_ping_task; |
1128 | 1144 | ||
1129 | /** | 1145 | /** |
1130 | * Average time we take for a single request to be satisfied. | 1146 | * Average time we take for a single request to be satisfied. |
@@ -1162,7 +1178,8 @@ struct GNUNET_FS_Handle { | |||
1162 | /** | 1178 | /** |
1163 | * Handle for controlling a publication process. | 1179 | * Handle for controlling a publication process. |
1164 | */ | 1180 | */ |
1165 | struct GNUNET_FS_PublishContext { | 1181 | struct GNUNET_FS_PublishContext |
1182 | { | ||
1166 | /** | 1183 | /** |
1167 | * Handle to the global fs context. | 1184 | * Handle to the global fs context. |
1168 | */ | 1185 | */ |
@@ -1241,7 +1258,7 @@ struct GNUNET_FS_PublishContext { | |||
1241 | * ID of the task performing the upload. NO_TASK if the upload has | 1258 | * ID of the task performing the upload. NO_TASK if the upload has |
1242 | * completed. | 1259 | * completed. |
1243 | */ | 1260 | */ |
1244 | struct GNUNET_SCHEDULER_Task * upload_task; | 1261 | struct GNUNET_SCHEDULER_Task *upload_task; |
1245 | 1262 | ||
1246 | /** | 1263 | /** |
1247 | * Storage space to reserve for the operation. | 1264 | * Storage space to reserve for the operation. |
@@ -1288,7 +1305,8 @@ struct GNUNET_FS_PublishContext { | |||
1288 | /** | 1305 | /** |
1289 | * Phases of unindex processing (state machine). | 1306 | * Phases of unindex processing (state machine). |
1290 | */ | 1307 | */ |
1291 | enum UnindexState { | 1308 | enum UnindexState |
1309 | { | ||
1292 | /** | 1310 | /** |
1293 | * We're currently hashing the file. | 1311 | * We're currently hashing the file. |
1294 | */ | 1312 | */ |
@@ -1331,7 +1349,8 @@ enum UnindexState { | |||
1331 | /** | 1349 | /** |
1332 | * Handle for controlling an unindexing operation. | 1350 | * Handle for controlling an unindexing operation. |
1333 | */ | 1351 | */ |
1334 | struct GNUNET_FS_UnindexContext { | 1352 | struct GNUNET_FS_UnindexContext |
1353 | { | ||
1335 | /** | 1354 | /** |
1336 | * The content hash key of the last block we processed, will in the | 1355 | * The content hash key of the last block we processed, will in the |
1337 | * end be set to the CHK from the URI. Used to remove the KBlocks. | 1356 | * end be set to the CHK from the URI. Used to remove the KBlocks. |
@@ -1451,7 +1470,8 @@ struct GNUNET_FS_UnindexContext { | |||
1451 | /** | 1470 | /** |
1452 | * Information we keep for each keyword in a keyword search. | 1471 | * Information we keep for each keyword in a keyword search. |
1453 | */ | 1472 | */ |
1454 | struct SearchRequestEntry { | 1473 | struct SearchRequestEntry |
1474 | { | ||
1455 | /** | 1475 | /** |
1456 | * Hash of the public key, also known as the query. | 1476 | * Hash of the public key, also known as the query. |
1457 | */ | 1477 | */ |
@@ -1489,7 +1509,8 @@ struct SearchRequestEntry { | |||
1489 | /** | 1509 | /** |
1490 | * Handle for controlling a search. | 1510 | * Handle for controlling a search. |
1491 | */ | 1511 | */ |
1492 | struct GNUNET_FS_SearchContext { | 1512 | struct GNUNET_FS_SearchContext |
1513 | { | ||
1493 | /** | 1514 | /** |
1494 | * Handle to the global FS context. | 1515 | * Handle to the global FS context. |
1495 | */ | 1516 | */ |
@@ -1585,7 +1606,8 @@ struct GNUNET_FS_SearchContext { | |||
1585 | * order of progression is linear through the states, alternatives | 1606 | * order of progression is linear through the states, alternatives |
1586 | * are documented in the comments. | 1607 | * are documented in the comments. |
1587 | */ | 1608 | */ |
1588 | enum BlockRequestState { | 1609 | enum BlockRequestState |
1610 | { | ||
1589 | /** | 1611 | /** |
1590 | * Initial state, block has only been allocated (since it is | 1612 | * Initial state, block has only been allocated (since it is |
1591 | * relevant to the overall download request). | 1613 | * relevant to the overall download request). |
@@ -1652,7 +1674,8 @@ enum BlockRequestState { | |||
1652 | /** | 1674 | /** |
1653 | * Information about an active download request. | 1675 | * Information about an active download request. |
1654 | */ | 1676 | */ |
1655 | struct DownloadRequest { | 1677 | struct DownloadRequest |
1678 | { | ||
1656 | /** | 1679 | /** |
1657 | * Parent in the CHK-tree. | 1680 | * Parent in the CHK-tree. |
1658 | */ | 1681 | */ |
@@ -1704,7 +1727,7 @@ struct DownloadRequest { | |||
1704 | * @param dr request to free | 1727 | * @param dr request to free |
1705 | */ | 1728 | */ |
1706 | void | 1729 | void |
1707 | GNUNET_FS_free_download_request_(struct DownloadRequest *dr); | 1730 | GNUNET_FS_free_download_request_ (struct DownloadRequest *dr); |
1708 | 1731 | ||
1709 | 1732 | ||
1710 | /** | 1733 | /** |
@@ -1713,13 +1736,14 @@ GNUNET_FS_free_download_request_(struct DownloadRequest *dr); | |||
1713 | * @param sr result to start pinging for. | 1736 | * @param sr result to start pinging for. |
1714 | */ | 1737 | */ |
1715 | void | 1738 | void |
1716 | GNUNET_FS_stop_probe_ping_task_(struct GNUNET_FS_SearchResult *sr); | 1739 | GNUNET_FS_stop_probe_ping_task_ (struct GNUNET_FS_SearchResult *sr); |
1717 | 1740 | ||
1718 | 1741 | ||
1719 | /** | 1742 | /** |
1720 | * Context for controlling a download. | 1743 | * Context for controlling a download. |
1721 | */ | 1744 | */ |
1722 | struct GNUNET_FS_DownloadContext { | 1745 | struct GNUNET_FS_DownloadContext |
1746 | { | ||
1723 | /** | 1747 | /** |
1724 | * Global FS context. | 1748 | * Global FS context. |
1725 | */ | 1749 | */ |