diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:51:21 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-15 21:51:21 +0000 |
commit | 6fd3e715cae09fa6e657c96f1c6f9711ee51f42f (patch) | |
tree | edbc42f37889069033e57da201fef242939a6e0f /src/fs | |
parent | 502af2167f7c218366666ca4944bd7cc54b5b19a (diff) | |
download | gnunet-6fd3e715cae09fa6e657c96f1c6f9711ee51f42f.tar.gz gnunet-6fd3e715cae09fa6e657c96f1c6f9711ee51f42f.zip |
indentation
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/fs.h | 65 | ||||
-rw-r--r-- | src/fs/fs_test_lib.h | 61 | ||||
-rw-r--r-- | src/fs/fs_tree.h | 8 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_cp.h | 69 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_indexing.h | 45 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_lc.h | 9 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_pe.h | 4 | ||||
-rw-r--r-- | src/fs/gnunet-service-fs_pr.h | 38 |
8 files changed, 125 insertions, 174 deletions
diff --git a/src/fs/fs.h b/src/fs/fs.h index 1d3fc6611..68bab5916 100644 --- a/src/fs/fs.h +++ b/src/fs/fs.h | |||
@@ -788,17 +788,9 @@ void GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh); | |||
788 | * @param emsg location for the reader to store an error message | 788 | * @param emsg location for the reader to store an error message |
789 | * @return number of bytes written, usually "max", 0 on error | 789 | * @return number of bytes written, usually "max", 0 on error |
790 | */ | 790 | */ |
791 | size_t | 791 | size_t GNUNET_FS_data_reader_file_ (void *cls, uint64_t offset, |
792 | 792 | size_t max, void *buf, | |
793 | 793 | char **emsg); | |
794 | |||
795 | |||
796 | |||
797 | |||
798 | |||
799 | GNUNET_FS_data_reader_file_ (void *cls, | ||
800 | uint64_t offset, | ||
801 | size_t max, void *buf, char **emsg); | ||
802 | 794 | ||
803 | 795 | ||
804 | /** | 796 | /** |
@@ -827,10 +819,8 @@ void *GNUNET_FS_make_file_reader_context_ (const char *filename); | |||
827 | * @param emsg location for the reader to store an error message | 819 | * @param emsg location for the reader to store an error message |
828 | * @return number of bytes written, usually "max", 0 on error | 820 | * @return number of bytes written, usually "max", 0 on error |
829 | */ | 821 | */ |
830 | size_t | 822 | size_t GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max, |
831 | GNUNET_FS_data_reader_copy_ (void *cls, | 823 | void *buf, char **emsg); |
832 | uint64_t offset, | ||
833 | size_t max, void *buf, char **emsg); | ||
834 | 824 | ||
835 | /** | 825 | /** |
836 | * Notification of FS that a search probe has made progress. | 826 | * Notification of FS that a search probe has made progress. |
@@ -858,9 +848,8 @@ void *GNUNET_FS_search_probe_progress_ (void *cls, | |||
858 | * @param cls "struct GNUNET_FS_PublishContext" identifies the upload | 848 | * @param cls "struct GNUNET_FS_PublishContext" identifies the upload |
859 | * @param tc task context | 849 | * @param tc task context |
860 | */ | 850 | */ |
861 | void | 851 | void GNUNET_FS_publish_main_ (void *cls, |
862 | GNUNET_FS_publish_main_ (void *cls, | 852 | const struct GNUNET_SCHEDULER_TaskContext *tc); |
863 | const struct GNUNET_SCHEDULER_TaskContext *tc); | ||
864 | 853 | ||
865 | 854 | ||
866 | /** | 855 | /** |
@@ -870,8 +859,8 @@ GNUNET_FS_publish_main_ (void *cls, | |||
870 | * @param cls closure, unindex context | 859 | * @param cls closure, unindex context |
871 | * @param file_id computed hash, NULL on error | 860 | * @param file_id computed hash, NULL on error |
872 | */ | 861 | */ |
873 | void | 862 | void GNUNET_FS_unindex_process_hash_ (void *cls, |
874 | GNUNET_FS_unindex_process_hash_ (void *cls, const GNUNET_HashCode * file_id); | 863 | const GNUNET_HashCode * file_id); |
875 | 864 | ||
876 | 865 | ||
877 | /** | 866 | /** |
@@ -897,9 +886,8 @@ void *GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi, | |||
897 | * @param pi structure to fill in | 886 | * @param pi structure to fill in |
898 | * @param dc overall download context | 887 | * @param dc overall download context |
899 | */ | 888 | */ |
900 | void | 889 | void GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi, |
901 | GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi, | 890 | struct GNUNET_FS_DownloadContext *dc); |
902 | struct GNUNET_FS_DownloadContext *dc); | ||
903 | 891 | ||
904 | 892 | ||
905 | /** | 893 | /** |
@@ -909,9 +897,9 @@ GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi, | |||
909 | * @param cls the 'struct GNUNET_FS_DownloadContext' | 897 | * @param cls the 'struct GNUNET_FS_DownloadContext' |
910 | * @param tc scheduler context | 898 | * @param tc scheduler context |
911 | */ | 899 | */ |
912 | void | 900 | void GNUNET_FS_download_start_task_ (void *cls, |
913 | GNUNET_FS_download_start_task_ (void *cls, | 901 | const struct GNUNET_SCHEDULER_TaskContext |
914 | const struct GNUNET_SCHEDULER_TaskContext *tc); | 902 | *tc); |
915 | 903 | ||
916 | 904 | ||
917 | 905 | ||
@@ -923,10 +911,9 @@ GNUNET_FS_download_start_task_ (void *cls, | |||
923 | * @param uc overall unindex context | 911 | * @param uc overall unindex context |
924 | * @param offset where we are in the file (for progress) | 912 | * @param offset where we are in the file (for progress) |
925 | */ | 913 | */ |
926 | void | 914 | void GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi, |
927 | GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi, | 915 | struct GNUNET_FS_UnindexContext *uc, |
928 | struct GNUNET_FS_UnindexContext *uc, | 916 | uint64_t offset); |
929 | uint64_t offset); | ||
930 | 917 | ||
931 | /** | 918 | /** |
932 | * Fill in all of the generic fields for a search event and | 919 | * Fill in all of the generic fields for a search event and |
@@ -961,8 +948,8 @@ int GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc); | |||
961 | * | 948 | * |
962 | * @param dc our download context | 949 | * @param dc our download context |
963 | */ | 950 | */ |
964 | void | 951 | void GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext |
965 | GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc); | 952 | *dc); |
966 | 953 | ||
967 | 954 | ||
968 | /** | 955 | /** |
@@ -979,9 +966,8 @@ void GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr); | |||
979 | * @param ext component of the path | 966 | * @param ext component of the path |
980 | * @param ent entity identifier | 967 | * @param ent entity identifier |
981 | */ | 968 | */ |
982 | void | 969 | void GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext, |
983 | GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, | 970 | const char *ent); |
984 | const char *ext, const char *ent); | ||
985 | 971 | ||
986 | 972 | ||
987 | /** | 973 | /** |
@@ -991,9 +977,8 @@ GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, | |||
991 | * @param ext component of the path | 977 | * @param ext component of the path |
992 | * @param uni unique name of parent | 978 | * @param uni unique name of parent |
993 | */ | 979 | */ |
994 | void | 980 | void GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext, |
995 | GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, | 981 | const char *uni); |
996 | const char *ext, const char *uni); | ||
997 | 982 | ||
998 | 983 | ||
999 | /** | 984 | /** |
@@ -1144,8 +1129,8 @@ struct TopLevelActivity *GNUNET_FS_make_top (struct GNUNET_FS_Handle *h, | |||
1144 | * @param h global fs handle | 1129 | * @param h global fs handle |
1145 | * @param top top level activity entry | 1130 | * @param top top level activity entry |
1146 | */ | 1131 | */ |
1147 | void | 1132 | void GNUNET_FS_end_top (struct GNUNET_FS_Handle *h, |
1148 | GNUNET_FS_end_top (struct GNUNET_FS_Handle *h, struct TopLevelActivity *top); | 1133 | struct TopLevelActivity *top); |
1149 | 1134 | ||
1150 | 1135 | ||
1151 | 1136 | ||
diff --git a/src/fs/fs_test_lib.h b/src/fs/fs_test_lib.h index 2017b21ea..fa822e265 100644 --- a/src/fs/fs_test_lib.h +++ b/src/fs/fs_test_lib.h | |||
@@ -53,12 +53,11 @@ struct GNUNET_FS_TestDaemon; | |||
53 | * 'GNUNET_FS_TEST_daemons_stop'! | 53 | * 'GNUNET_FS_TEST_daemons_stop'! |
54 | * @param cont_cls closure for cont | 54 | * @param cont_cls closure for cont |
55 | */ | 55 | */ |
56 | void | 56 | void GNUNET_FS_TEST_daemons_start (const char *template_cfg_file, |
57 | GNUNET_FS_TEST_daemons_start (const char *template_cfg_file, | 57 | struct GNUNET_TIME_Relative timeout, |
58 | struct GNUNET_TIME_Relative timeout, | 58 | unsigned int total, |
59 | unsigned int total, | 59 | struct GNUNET_FS_TestDaemon **daemons, |
60 | struct GNUNET_FS_TestDaemon **daemons, | 60 | GNUNET_SCHEDULER_Task cont, void *cont_cls); |
61 | GNUNET_SCHEDULER_Task cont, void *cont_cls); | ||
62 | 61 | ||
63 | 62 | ||
64 | /** | 63 | /** |
@@ -71,11 +70,11 @@ GNUNET_FS_TEST_daemons_start (const char *template_cfg_file, | |||
71 | * @param cont function to call when done | 70 | * @param cont function to call when done |
72 | * @param cont_cls closure for cont | 71 | * @param cont_cls closure for cont |
73 | */ | 72 | */ |
74 | void | 73 | void GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1, |
75 | GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1, | 74 | struct GNUNET_FS_TestDaemon *daemon2, |
76 | struct GNUNET_FS_TestDaemon *daemon2, | 75 | struct GNUNET_TIME_Relative timeout, |
77 | struct GNUNET_TIME_Relative timeout, | 76 | GNUNET_SCHEDULER_Task cont, |
78 | GNUNET_SCHEDULER_Task cont, void *cont_cls); | 77 | void *cont_cls); |
79 | 78 | ||
80 | 79 | ||
81 | /** | 80 | /** |
@@ -107,9 +106,8 @@ const struct GNUNET_CONFIGURATION_Handle | |||
107 | * @param total number of daemons to stop | 106 | * @param total number of daemons to stop |
108 | * @param daemons array with the daemons (values will be clobbered) | 107 | * @param daemons array with the daemons (values will be clobbered) |
109 | */ | 108 | */ |
110 | void | 109 | void GNUNET_FS_TEST_daemons_stop (unsigned int total, |
111 | GNUNET_FS_TEST_daemons_stop (unsigned int total, | 110 | struct GNUNET_FS_TestDaemon **daemons); |
112 | struct GNUNET_FS_TestDaemon **daemons); | ||
113 | 111 | ||
114 | 112 | ||
115 | /** | 113 | /** |
@@ -118,9 +116,9 @@ GNUNET_FS_TEST_daemons_stop (unsigned int total, | |||
118 | * @param cls closure (user defined) | 116 | * @param cls closure (user defined) |
119 | * @param uri a URI, NULL for errors | 117 | * @param uri a URI, NULL for errors |
120 | */ | 118 | */ |
121 | typedef void | 119 | typedef void (*GNUNET_FS_TEST_UriContinuation) (void *cls, |
122 | (*GNUNET_FS_TEST_UriContinuation) (void *cls, | 120 | const struct GNUNET_FS_Uri * |
123 | const struct GNUNET_FS_Uri * uri); | 121 | uri); |
124 | 122 | ||
125 | 123 | ||
126 | /** | 124 | /** |
@@ -138,15 +136,12 @@ typedef void | |||
138 | * @param cont function to call when done | 136 | * @param cont function to call when done |
139 | * @param cont_cls closure for cont | 137 | * @param cont_cls closure for cont |
140 | */ | 138 | */ |
141 | void | 139 | void GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon, |
142 | GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon, | 140 | struct GNUNET_TIME_Relative timeout, |
143 | struct GNUNET_TIME_Relative timeout, | 141 | uint32_t anonymity, int do_index, uint64_t size, |
144 | uint32_t anonymity, | 142 | uint32_t seed, unsigned int verbose, |
145 | int do_index, | 143 | GNUNET_FS_TEST_UriContinuation cont, |
146 | uint64_t size, | 144 | void *cont_cls); |
147 | uint32_t seed, | ||
148 | unsigned int verbose, | ||
149 | GNUNET_FS_TEST_UriContinuation cont, void *cont_cls); | ||
150 | 145 | ||
151 | 146 | ||
152 | /** | 147 | /** |
@@ -162,14 +157,12 @@ GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon, | |||
162 | * @param cont function to call when done | 157 | * @param cont function to call when done |
163 | * @param cont_cls closure for cont | 158 | * @param cont_cls closure for cont |
164 | */ | 159 | */ |
165 | void | 160 | void GNUNET_FS_TEST_download (struct GNUNET_FS_TestDaemon *daemon, |
166 | GNUNET_FS_TEST_download (struct GNUNET_FS_TestDaemon *daemon, | 161 | struct GNUNET_TIME_Relative timeout, |
167 | struct GNUNET_TIME_Relative timeout, | 162 | uint32_t anonymity, uint32_t seed, |
168 | uint32_t anonymity, | 163 | const struct GNUNET_FS_Uri *uri, |
169 | uint32_t seed, | 164 | unsigned int verbose, GNUNET_SCHEDULER_Task cont, |
170 | const struct GNUNET_FS_Uri *uri, | 165 | void *cont_cls); |
171 | unsigned int verbose, | ||
172 | GNUNET_SCHEDULER_Task cont, void *cont_cls); | ||
173 | 166 | ||
174 | 167 | ||
175 | 168 | ||
diff --git a/src/fs/fs_tree.h b/src/fs/fs_tree.h index c2b7de48c..532c9e9aa 100644 --- a/src/fs/fs_tree.h +++ b/src/fs/fs_tree.h | |||
@@ -66,9 +66,8 @@ uint64_t GNUNET_FS_tree_compute_tree_size (unsigned int depth); | |||
66 | * @param depth depth of the node in the tree, 0 for DBLOCK | 66 | * @param depth depth of the node in the tree, 0 for DBLOCK |
67 | * @return number of bytes stored in this node | 67 | * @return number of bytes stored in this node |
68 | */ | 68 | */ |
69 | size_t | 69 | size_t GNUNET_FS_tree_calculate_block_size (uint64_t fsize, uint64_t offset, |
70 | GNUNET_FS_tree_calculate_block_size (uint64_t fsize, | 70 | unsigned int depth); |
71 | uint64_t offset, unsigned int depth); | ||
72 | 71 | ||
73 | 72 | ||
74 | /** | 73 | /** |
@@ -111,8 +110,7 @@ typedef void (*GNUNET_FS_TreeBlockProcessor) (void *cls, | |||
111 | * @param pt_size size of pt_block | 110 | * @param pt_size size of pt_block |
112 | * @param depth depth of the block in the tree, 0 for DBLOCKS | 111 | * @param depth depth of the block in the tree, 0 for DBLOCKS |
113 | */ | 112 | */ |
114 | typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, | 113 | typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, uint64_t offset, |
115 | uint64_t offset, | ||
116 | const void *pt_block, | 114 | const void *pt_block, |
117 | size_t pt_size, | 115 | size_t pt_size, |
118 | unsigned int depth); | 116 | unsigned int depth); |
diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h index c9485f23b..84165d8b7 100644 --- a/src/fs/gnunet-service-fs_cp.h +++ b/src/fs/gnunet-service-fs_cp.h | |||
@@ -140,8 +140,8 @@ typedef void (*GSF_ConnectedPeerIterator) (void *cls, | |||
140 | * @param buf where to copy the message, NULL on error (peer disconnect) | 140 | * @param buf where to copy the message, NULL on error (peer disconnect) |
141 | * @return number of bytes copied to 'buf', can be 0 (without indicating an error) | 141 | * @return number of bytes copied to 'buf', can be 0 (without indicating an error) |
142 | */ | 142 | */ |
143 | typedef size_t (*GSF_GetMessageCallback) (void *cls, | 143 | typedef size_t (*GSF_GetMessageCallback) (void *cls, size_t buf_size, |
144 | size_t buf_size, void *buf); | 144 | void *buf); |
145 | 145 | ||
146 | 146 | ||
147 | /** | 147 | /** |
@@ -225,10 +225,9 @@ void GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth); | |||
225 | * @param request_time time at which the original query was transmitted | 225 | * @param request_time time at which the original query was transmitted |
226 | * @param request_priority priority of the original request | 226 | * @param request_priority priority of the original request |
227 | */ | 227 | */ |
228 | void | 228 | void GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp, |
229 | GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp, | 229 | struct GNUNET_TIME_Absolute request_time, |
230 | struct GNUNET_TIME_Absolute request_time, | 230 | uint32_t request_priority); |
231 | uint32_t request_priority); | ||
232 | 231 | ||
233 | 232 | ||
234 | /** | 233 | /** |
@@ -238,9 +237,9 @@ GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp, | |||
238 | * @param cp responding peer (will be updated) | 237 | * @param cp responding peer (will be updated) |
239 | * @param initiator_client local client on responsible for query | 238 | * @param initiator_client local client on responsible for query |
240 | */ | 239 | */ |
241 | void | 240 | void GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp, |
242 | GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp, | 241 | struct GSF_LocalClient |
243 | struct GSF_LocalClient *initiator_client); | 242 | *initiator_client); |
244 | 243 | ||
245 | 244 | ||
246 | /** | 245 | /** |
@@ -250,10 +249,9 @@ GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp, | |||
250 | * @param cp responding peer (will be updated) | 249 | * @param cp responding peer (will be updated) |
251 | * @param initiator_peer other peer responsible for query | 250 | * @param initiator_peer other peer responsible for query |
252 | */ | 251 | */ |
253 | void | 252 | void GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, |
254 | GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, | 253 | const struct GSF_ConnectedPeer |
255 | const struct GSF_ConnectedPeer | 254 | *initiator_peer); |
256 | *initiator_peer); | ||
257 | 255 | ||
258 | 256 | ||
259 | /** | 257 | /** |
@@ -267,13 +265,13 @@ GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, | |||
267 | * unless we see some further activity from it | 265 | * unless we see some further activity from it |
268 | * @param atsi status information | 266 | * @param atsi status information |
269 | */ | 267 | */ |
270 | void | 268 | void GSF_peer_status_handler_ (void *cls, |
271 | GSF_peer_status_handler_ (void *cls, | 269 | const struct GNUNET_PeerIdentity *peer, |
272 | const struct GNUNET_PeerIdentity *peer, | 270 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, |
273 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, | 271 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, |
274 | struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, | 272 | struct GNUNET_TIME_Absolute timeout, |
275 | struct GNUNET_TIME_Absolute timeout, | 273 | const struct GNUNET_TRANSPORT_ATS_Information |
276 | const struct GNUNET_TRANSPORT_ATS_Information *atsi); | 274 | *atsi); |
277 | 275 | ||
278 | 276 | ||
279 | /** | 277 | /** |
@@ -287,12 +285,11 @@ GSF_peer_status_handler_ (void *cls, | |||
287 | * @return GNUNET_OK to keep the connection open, | 285 | * @return GNUNET_OK to keep the connection open, |
288 | * GNUNET_SYSERR to close it (signal serious error) | 286 | * GNUNET_SYSERR to close it (signal serious error) |
289 | */ | 287 | */ |
290 | int | 288 | int GSF_handle_p2p_migration_stop_ (void *cls, |
291 | GSF_handle_p2p_migration_stop_ (void *cls, | 289 | const struct GNUNET_PeerIdentity *other, |
292 | const struct GNUNET_PeerIdentity *other, | 290 | const struct GNUNET_MessageHeader *message, |
293 | const struct GNUNET_MessageHeader *message, | 291 | const struct |
294 | const struct GNUNET_TRANSPORT_ATS_Information | 292 | GNUNET_TRANSPORT_ATS_Information *atsi); |
295 | *atsi); | ||
296 | 293 | ||
297 | 294 | ||
298 | /** | 295 | /** |
@@ -331,9 +328,8 @@ struct GSF_PeerPerformanceData *GSF_get_peer_performance_data_ (struct | |||
331 | * @param cp peer to ask | 328 | * @param cp peer to ask |
332 | * @param block_time until when to block | 329 | * @param block_time until when to block |
333 | */ | 330 | */ |
334 | void | 331 | void GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, |
335 | GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, | 332 | struct GNUNET_TIME_Relative block_time); |
336 | struct GNUNET_TIME_Relative block_time); | ||
337 | 333 | ||
338 | 334 | ||
339 | /** | 335 | /** |
@@ -343,9 +339,8 @@ GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, | |||
343 | * @param cls unused | 339 | * @param cls unused |
344 | * @param peer identity of peer that connected | 340 | * @param peer identity of peer that connected |
345 | */ | 341 | */ |
346 | void | 342 | void GSF_peer_disconnect_handler_ (void *cls, |
347 | GSF_peer_disconnect_handler_ (void *cls, | 343 | const struct GNUNET_PeerIdentity *peer); |
348 | const struct GNUNET_PeerIdentity *peer); | ||
349 | 344 | ||
350 | 345 | ||
351 | /** | 346 | /** |
@@ -366,9 +361,8 @@ void GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc); | |||
366 | * @param cp peer to reserve bandwidth from | 361 | * @param cp peer to reserve bandwidth from |
367 | * @param pref preference change | 362 | * @param pref preference change |
368 | */ | 363 | */ |
369 | void | 364 | void GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, |
370 | GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, | 365 | uint64_t pref); |
371 | uint64_t pref); | ||
372 | 366 | ||
373 | 367 | ||
374 | /** | 368 | /** |
@@ -377,9 +371,8 @@ GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, | |||
377 | * @param cp peer to reserve bandwidth from | 371 | * @param cp peer to reserve bandwidth from |
378 | * @param id identity to set (written to) | 372 | * @param id identity to set (written to) |
379 | */ | 373 | */ |
380 | void | 374 | void GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp, |
381 | GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp, | 375 | struct GNUNET_PeerIdentity *id); |
382 | struct GNUNET_PeerIdentity *id); | ||
383 | 376 | ||
384 | 377 | ||
385 | /** | 378 | /** |
diff --git a/src/fs/gnunet-service-fs_indexing.h b/src/fs/gnunet-service-fs_indexing.h index c6ef53351..a5c8f6593 100644 --- a/src/fs/gnunet-service-fs_indexing.h +++ b/src/fs/gnunet-service-fs_indexing.h | |||
@@ -54,17 +54,14 @@ | |||
54 | * @param cont_cls closure for cont | 54 | * @param cont_cls closure for cont |
55 | * @return GNUNET_OK on success | 55 | * @return GNUNET_OK on success |
56 | */ | 56 | */ |
57 | int | 57 | int GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, |
58 | GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, | 58 | uint32_t size, const void *data, |
59 | uint32_t size, | 59 | enum GNUNET_BLOCK_Type type, |
60 | const void *data, | 60 | uint32_t priority, uint32_t anonymity, |
61 | enum GNUNET_BLOCK_Type type, | 61 | struct GNUNET_TIME_Absolute expiration, |
62 | uint32_t priority, | 62 | uint64_t uid, |
63 | uint32_t anonymity, | 63 | GNUNET_DATASTORE_DatumProcessor cont, |
64 | struct GNUNET_TIME_Absolute | 64 | void *cont_cls); |
65 | expiration, uint64_t uid, | ||
66 | GNUNET_DATASTORE_DatumProcessor cont, | ||
67 | void *cont_cls); | ||
68 | 65 | ||
69 | /** | 66 | /** |
70 | * Handle INDEX_START-message. | 67 | * Handle INDEX_START-message. |
@@ -73,10 +70,9 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, | |||
73 | * @param client identification of the client | 70 | * @param client identification of the client |
74 | * @param message the actual message | 71 | * @param message the actual message |
75 | */ | 72 | */ |
76 | void | 73 | void GNUNET_FS_handle_index_start (void *cls, |
77 | GNUNET_FS_handle_index_start (void *cls, | 74 | struct GNUNET_SERVER_Client *client, |
78 | struct GNUNET_SERVER_Client *client, | 75 | const struct GNUNET_MessageHeader *message); |
79 | const struct GNUNET_MessageHeader *message); | ||
80 | 76 | ||
81 | 77 | ||
82 | /** | 78 | /** |
@@ -86,10 +82,10 @@ GNUNET_FS_handle_index_start (void *cls, | |||
86 | * @param client identification of the client | 82 | * @param client identification of the client |
87 | * @param message the actual message | 83 | * @param message the actual message |
88 | */ | 84 | */ |
89 | void | 85 | void GNUNET_FS_handle_index_list_get (void *cls, |
90 | GNUNET_FS_handle_index_list_get (void *cls, | 86 | struct GNUNET_SERVER_Client *client, |
91 | struct GNUNET_SERVER_Client *client, | 87 | const struct GNUNET_MessageHeader |
92 | const struct GNUNET_MessageHeader *message); | 88 | *message); |
93 | 89 | ||
94 | 90 | ||
95 | /** | 91 | /** |
@@ -99,10 +95,8 @@ GNUNET_FS_handle_index_list_get (void *cls, | |||
99 | * @param client identification of the client | 95 | * @param client identification of the client |
100 | * @param message the actual message | 96 | * @param message the actual message |
101 | */ | 97 | */ |
102 | void | 98 | void GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client, |
103 | GNUNET_FS_handle_unindex (void *cls, | 99 | const struct GNUNET_MessageHeader *message); |
104 | struct GNUNET_SERVER_Client *client, | ||
105 | const struct GNUNET_MessageHeader *message); | ||
106 | 100 | ||
107 | 101 | ||
108 | /** | 102 | /** |
@@ -112,9 +106,8 @@ GNUNET_FS_handle_unindex (void *cls, | |||
112 | * @param d datastore to use | 106 | * @param d datastore to use |
113 | * @return GNUNET_OK on success | 107 | * @return GNUNET_OK on success |
114 | */ | 108 | */ |
115 | int | 109 | int GNUNET_FS_indexing_init (const struct GNUNET_CONFIGURATION_Handle *c, |
116 | GNUNET_FS_indexing_init (const struct GNUNET_CONFIGURATION_Handle *c, | 110 | struct GNUNET_DATASTORE_Handle *d); |
117 | struct GNUNET_DATASTORE_Handle *d); | ||
118 | 111 | ||
119 | 112 | ||
120 | /** | 113 | /** |
diff --git a/src/fs/gnunet-service-fs_lc.h b/src/fs/gnunet-service-fs_lc.h index c9d8ce191..6b79690f1 100644 --- a/src/fs/gnunet-service-fs_lc.h +++ b/src/fs/gnunet-service-fs_lc.h | |||
@@ -66,9 +66,8 @@ struct GSF_PendingRequest *GSF_local_client_start_search_handler_ (struct | |||
66 | * @param lc recipient | 66 | * @param lc recipient |
67 | * @param msg message to transmit to client | 67 | * @param msg message to transmit to client |
68 | */ | 68 | */ |
69 | void | 69 | void GSF_local_client_transmit_ (struct GSF_LocalClient *lc, |
70 | GSF_local_client_transmit_ (struct GSF_LocalClient *lc, | 70 | const struct GNUNET_MessageHeader *msg); |
71 | const struct GNUNET_MessageHeader *msg); | ||
72 | 71 | ||
73 | 72 | ||
74 | /** | 73 | /** |
@@ -77,8 +76,8 @@ GSF_local_client_transmit_ (struct GSF_LocalClient *lc, | |||
77 | * @param cls unused | 76 | * @param cls unused |
78 | * @param client handle of the client | 77 | * @param client handle of the client |
79 | */ | 78 | */ |
80 | void | 79 | void GSF_client_disconnect_handler_ (void *cls, |
81 | GSF_client_disconnect_handler_ (void *cls, struct GNUNET_SERVER_Client *client); | 80 | struct GNUNET_SERVER_Client *client); |
82 | 81 | ||
83 | 82 | ||
84 | #endif | 83 | #endif |
diff --git a/src/fs/gnunet-service-fs_pe.h b/src/fs/gnunet-service-fs_pe.h index 7fbf9fc4a..cfaeabe22 100644 --- a/src/fs/gnunet-service-fs_pe.h +++ b/src/fs/gnunet-service-fs_pe.h | |||
@@ -35,8 +35,8 @@ | |||
35 | * @param cp peer with the entry | 35 | * @param cp peer with the entry |
36 | * @param pr request with the entry | 36 | * @param pr request with the entry |
37 | */ | 37 | */ |
38 | void | 38 | void GSF_plan_add_ (struct GSF_ConnectedPeer *cp, |
39 | GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr); | 39 | struct GSF_PendingRequest *pr); |
40 | 40 | ||
41 | 41 | ||
42 | /** | 42 | /** |
diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h index 2f89f6e73..f2e7bcf62 100644 --- a/src/fs/gnunet-service-fs_pr.h +++ b/src/fs/gnunet-service-fs_pr.h | |||
@@ -238,10 +238,9 @@ struct GSF_PendingRequest *GSF_pending_request_create_ (enum | |||
238 | * @param replies_seen hash codes of replies that we've seen | 238 | * @param replies_seen hash codes of replies that we've seen |
239 | * @param replies_seen_count size of the replies_seen array | 239 | * @param replies_seen_count size of the replies_seen array |
240 | */ | 240 | */ |
241 | void | 241 | void GSF_pending_request_update_ (struct GSF_PendingRequest *pr, |
242 | GSF_pending_request_update_ (struct GSF_PendingRequest *pr, | 242 | const GNUNET_HashCode * replies_seen, |
243 | const GNUNET_HashCode * replies_seen, | 243 | unsigned int replies_seen_count); |
244 | unsigned int replies_seen_count); | ||
245 | 244 | ||
246 | 245 | ||
247 | /** | 246 | /** |
@@ -264,9 +263,8 @@ struct GSF_PendingRequestData *GSF_pending_request_get_data_ (struct | |||
264 | * @param pra another pending request | 263 | * @param pra another pending request |
265 | * @return GNUNET_OK if the requests are compatible | 264 | * @return GNUNET_OK if the requests are compatible |
266 | */ | 265 | */ |
267 | int | 266 | int GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra, |
268 | GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra, | 267 | struct GSF_PendingRequest *prb); |
269 | struct GSF_PendingRequest *prb); | ||
270 | 268 | ||
271 | 269 | ||
272 | /** | 270 | /** |
@@ -278,15 +276,9 @@ GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra, | |||
278 | * @param buf where to copy the message (can be NULL) | 276 | * @param buf where to copy the message (can be NULL) |
279 | * @return number of bytes needed (if buf_size too small) or used | 277 | * @return number of bytes needed (if buf_size too small) or used |
280 | */ | 278 | */ |
281 | size_t | 279 | size_t GSF_pending_request_get_message_ (struct GSF_PendingRequest |
282 | 280 | *pr, size_t buf_size, | |
283 | 281 | void *buf); | |
284 | |||
285 | |||
286 | |||
287 | |||
288 | GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr, | ||
289 | size_t buf_size, void *buf); | ||
290 | 282 | ||
291 | 283 | ||
292 | /** | 284 | /** |
@@ -295,8 +287,8 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr, | |||
295 | * @param pr request to cancel | 287 | * @param pr request to cancel |
296 | * @param full_cleanup fully purge the request | 288 | * @param full_cleanup fully purge the request |
297 | */ | 289 | */ |
298 | void | 290 | void GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, |
299 | GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup); | 291 | int full_cleanup); |
300 | 292 | ||
301 | 293 | ||
302 | /** | 294 | /** |
@@ -335,9 +327,8 @@ void GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls); | |||
335 | * GNUNET_SYSERR if the message was malformed (close connection, | 327 | * GNUNET_SYSERR if the message was malformed (close connection, |
336 | * do not cache under any circumstances) | 328 | * do not cache under any circumstances) |
337 | */ | 329 | */ |
338 | int | 330 | int GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp, |
339 | GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp, | 331 | const struct GNUNET_MessageHeader *message); |
340 | const struct GNUNET_MessageHeader *message); | ||
341 | 332 | ||
342 | 333 | ||
343 | /** | 334 | /** |
@@ -369,9 +360,8 @@ typedef void (*GSF_LocalLookupContinuation) (void *cls, | |||
369 | * @param cont function to call at the end | 360 | * @param cont function to call at the end |
370 | * @param cont_cls closure for cont | 361 | * @param cont_cls closure for cont |
371 | */ | 362 | */ |
372 | void | 363 | void GSF_local_lookup_ (struct GSF_PendingRequest *pr, |
373 | GSF_local_lookup_ (struct GSF_PendingRequest *pr, | 364 | GSF_LocalLookupContinuation cont, void *cont_cls); |
374 | GSF_LocalLookupContinuation cont, void *cont_cls); | ||
375 | 365 | ||
376 | 366 | ||
377 | /** | 367 | /** |