diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-11-05 18:21:50 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-11-05 18:21:50 +0000 |
commit | 75a33a1499cf60ea4364c9aa673816629a6c1413 (patch) | |
tree | 0620da4312bb04de4d7b65074fdd3b0c3dd6cc0e /src/include | |
parent | 7217c601ad30760872823193d62307e7a335d226 (diff) | |
download | gnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.tar.gz gnunet-75a33a1499cf60ea4364c9aa673816629a6c1413.zip |
big scheduler refactoring, expect some issues
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_arm_service.h | 2 | ||||
-rw-r--r-- | src/include/gnunet_client_lib.h | 10 | ||||
-rw-r--r-- | src/include/gnunet_connection_lib.h | 23 | ||||
-rw-r--r-- | src/include/gnunet_core_service.h | 16 | ||||
-rw-r--r-- | src/include/gnunet_crypto_lib.h | 4 | ||||
-rw-r--r-- | src/include/gnunet_datacache_lib.h | 4 | ||||
-rw-r--r-- | src/include/gnunet_datastore_service.h | 6 | ||||
-rw-r--r-- | src/include/gnunet_dht_service.h | 4 | ||||
-rw-r--r-- | src/include/gnunet_disk_lib.h | 5 | ||||
-rw-r--r-- | src/include/gnunet_fs_service.h | 4 | ||||
-rw-r--r-- | src/include/gnunet_nat_lib.h | 4 | ||||
-rw-r--r-- | src/include/gnunet_peerinfo_service.h | 6 | ||||
-rw-r--r-- | src/include/gnunet_program_lib.h | 2 | ||||
-rw-r--r-- | src/include/gnunet_resolver_service.h | 12 | ||||
-rw-r--r-- | src/include/gnunet_scheduler_lib.h | 93 | ||||
-rw-r--r-- | src/include/gnunet_server_lib.h | 10 | ||||
-rw-r--r-- | src/include/gnunet_service_lib.h | 6 | ||||
-rw-r--r-- | src/include/gnunet_statistics_service.h | 4 | ||||
-rw-r--r-- | src/include/gnunet_testing_lib.h | 13 | ||||
-rw-r--r-- | src/include/gnunet_transport_service.h | 14 | ||||
-rw-r--r-- | src/include/gnunet_upnp_service.h | 4 |
21 files changed, 57 insertions, 189 deletions
diff --git a/src/include/gnunet_arm_service.h b/src/include/gnunet_arm_service.h index 912db027b..317105520 100644 --- a/src/include/gnunet_arm_service.h +++ b/src/include/gnunet_arm_service.h | |||
@@ -70,13 +70,11 @@ struct GNUNET_ARM_Handle; | |||
70 | * @param cfg configuration to use (needed to contact ARM; | 70 | * @param cfg configuration to use (needed to contact ARM; |
71 | * the ARM service may internally use a different | 71 | * the ARM service may internally use a different |
72 | * configuration to determine how to start the service). | 72 | * configuration to determine how to start the service). |
73 | * @param sched scheduler to use | ||
74 | * @param service service that *this* process is implementing/providing, can be NULL | 73 | * @param service service that *this* process is implementing/providing, can be NULL |
75 | * @return context to use for further ARM operations, NULL on error | 74 | * @return context to use for further ARM operations, NULL on error |
76 | */ | 75 | */ |
77 | struct GNUNET_ARM_Handle * | 76 | struct GNUNET_ARM_Handle * |
78 | GNUNET_ARM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | 77 | GNUNET_ARM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
79 | struct GNUNET_SCHEDULER_Handle *sched, | ||
80 | const char *service); | 78 | const char *service); |
81 | 79 | ||
82 | 80 | ||
diff --git a/src/include/gnunet_client_lib.h b/src/include/gnunet_client_lib.h index 49ccc6c6b..41dbe4efc 100644 --- a/src/include/gnunet_client_lib.h +++ b/src/include/gnunet_client_lib.h | |||
@@ -49,15 +49,11 @@ struct GNUNET_CLIENT_Connection; | |||
49 | /** | 49 | /** |
50 | * Get a connection with a service. | 50 | * Get a connection with a service. |
51 | * | 51 | * |
52 | * @param sched scheduler to use | ||
53 | * @param service_name name of the service | 52 | * @param service_name name of the service |
54 | * @param cfg configuration to use | 53 | * @param cfg configuration to use |
55 | * @return NULL on error (service unknown to configuration) | 54 | * @return NULL on error (service unknown to configuration) |
56 | */ | 55 | */ |
57 | struct GNUNET_CLIENT_Connection *GNUNET_CLIENT_connect (struct | 56 | struct GNUNET_CLIENT_Connection *GNUNET_CLIENT_connect (const char |
58 | GNUNET_SCHEDULER_Handle | ||
59 | *sched, | ||
60 | const char | ||
61 | *service_name, | 57 | *service_name, |
62 | const struct | 58 | const struct |
63 | GNUNET_CONFIGURATION_Handle | 59 | GNUNET_CONFIGURATION_Handle |
@@ -210,7 +206,6 @@ GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection *sock, | |||
210 | /** | 206 | /** |
211 | * Wait until the service is running. | 207 | * Wait until the service is running. |
212 | * | 208 | * |
213 | * @param sched scheduler to use | ||
214 | * @param service name of the service to wait for | 209 | * @param service name of the service to wait for |
215 | * @param cfg configuration to use | 210 | * @param cfg configuration to use |
216 | * @param timeout how long to wait at most in ms | 211 | * @param timeout how long to wait at most in ms |
@@ -219,8 +214,7 @@ GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection *sock, | |||
219 | * or "TIMEOUT" (service not known to be running)) | 214 | * or "TIMEOUT" (service not known to be running)) |
220 | * @param task_cls closure for task | 215 | * @param task_cls closure for task |
221 | */ | 216 | */ |
222 | void GNUNET_CLIENT_service_test (struct GNUNET_SCHEDULER_Handle *sched, | 217 | void GNUNET_CLIENT_service_test (const char *service, |
223 | const char *service, | ||
224 | const struct GNUNET_CONFIGURATION_Handle *cfg, | 218 | const struct GNUNET_CONFIGURATION_Handle *cfg, |
225 | struct GNUNET_TIME_Relative timeout, | 219 | struct GNUNET_TIME_Relative timeout, |
226 | GNUNET_SCHEDULER_Task task, void *task_cls); | 220 | GNUNET_SCHEDULER_Task task, void *task_cls); |
diff --git a/src/include/gnunet_connection_lib.h b/src/include/gnunet_connection_lib.h index d5942236b..33afb0386 100644 --- a/src/include/gnunet_connection_lib.h +++ b/src/include/gnunet_connection_lib.h | |||
@@ -99,15 +99,11 @@ GNUNET_CONNECTION_persist_(struct GNUNET_CONNECTION_Handle *sock); | |||
99 | * socket should henceforth be no longer used directly. | 99 | * socket should henceforth be no longer used directly. |
100 | * GNUNET_socket_destroy will close it. | 100 | * GNUNET_socket_destroy will close it. |
101 | * | 101 | * |
102 | * @param sched scheduler to use | ||
103 | * @param osSocket existing socket to box | 102 | * @param osSocket existing socket to box |
104 | * @return the boxed socket handle | 103 | * @return the boxed socket handle |
105 | */ | 104 | */ |
106 | struct GNUNET_CONNECTION_Handle | 105 | struct GNUNET_CONNECTION_Handle |
107 | *GNUNET_CONNECTION_create_from_existing (struct | 106 | *GNUNET_CONNECTION_create_from_existing (struct |
108 | GNUNET_SCHEDULER_Handle | ||
109 | *sched, | ||
110 | struct | ||
111 | GNUNET_NETWORK_Handle | 107 | GNUNET_NETWORK_Handle |
112 | *osSocket); | 108 | *osSocket); |
113 | 109 | ||
@@ -116,17 +112,13 @@ struct GNUNET_CONNECTION_Handle | |||
116 | * Create a socket handle by accepting on a listen socket. This | 112 | * Create a socket handle by accepting on a listen socket. This |
117 | * function may block if the listen socket has no connection ready. | 113 | * function may block if the listen socket has no connection ready. |
118 | * | 114 | * |
119 | * @param sched scheduler to use | ||
120 | * @param access function to use to check if access is allowed | 115 | * @param access function to use to check if access is allowed |
121 | * @param access_cls closure for access | 116 | * @param access_cls closure for access |
122 | * @param lsock listen socket | 117 | * @param lsock listen socket |
123 | * @return the socket handle, NULL on error (for example, access refused) | 118 | * @return the socket handle, NULL on error (for example, access refused) |
124 | */ | 119 | */ |
125 | struct GNUNET_CONNECTION_Handle | 120 | struct GNUNET_CONNECTION_Handle |
126 | *GNUNET_CONNECTION_create_from_accept (struct | 121 | *GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck |
127 | GNUNET_SCHEDULER_Handle | ||
128 | *sched, | ||
129 | GNUNET_CONNECTION_AccessCheck | ||
130 | access, void *access_cls, | 122 | access, void *access_cls, |
131 | struct | 123 | struct |
132 | GNUNET_NETWORK_Handle | 124 | GNUNET_NETWORK_Handle |
@@ -138,15 +130,13 @@ struct GNUNET_CONNECTION_Handle | |||
138 | * This function returns immediately, even if the connection has not | 130 | * This function returns immediately, even if the connection has not |
139 | * yet been established. This function only creates TCP connections. | 131 | * yet been established. This function only creates TCP connections. |
140 | * | 132 | * |
141 | * @param sched scheduler to use | ||
142 | * @param cfg configuration to use | 133 | * @param cfg configuration to use |
143 | * @param hostname name of the host to connect to | 134 | * @param hostname name of the host to connect to |
144 | * @param port port to connect to | 135 | * @param port port to connect to |
145 | * @return the socket handle | 136 | * @return the socket handle |
146 | */ | 137 | */ |
147 | struct GNUNET_CONNECTION_Handle | 138 | struct GNUNET_CONNECTION_Handle |
148 | *GNUNET_CONNECTION_create_from_connect (struct GNUNET_SCHEDULER_Handle *sched, | 139 | *GNUNET_CONNECTION_create_from_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
149 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
150 | const char *hostname, | 140 | const char *hostname, |
151 | uint16_t port); | 141 | uint16_t port); |
152 | 142 | ||
@@ -156,14 +146,12 @@ struct GNUNET_CONNECTION_Handle | |||
156 | * This function returns immediately, even if the connection has not | 146 | * This function returns immediately, even if the connection has not |
157 | * yet been established. This function only creates UNIX connections. | 147 | * yet been established. This function only creates UNIX connections. |
158 | * | 148 | * |
159 | * @param sched scheduler to use | ||
160 | * @param cfg configuration to use | 149 | * @param cfg configuration to use |
161 | * @param unixpath path to connect to) | 150 | * @param unixpath path to connect to) |
162 | * @return the socket handle, NULL on systems without UNIX support | 151 | * @return the socket handle, NULL on systems without UNIX support |
163 | */ | 152 | */ |
164 | struct GNUNET_CONNECTION_Handle * | 153 | struct GNUNET_CONNECTION_Handle * |
165 | GNUNET_CONNECTION_create_from_connect_to_unixpath (struct GNUNET_SCHEDULER_Handle *sched, | 154 | GNUNET_CONNECTION_create_from_connect_to_unixpath (const struct |
166 | const struct | ||
167 | GNUNET_CONFIGURATION_Handle *cfg, | 155 | GNUNET_CONFIGURATION_Handle *cfg, |
168 | const char *unixpath); | 156 | const char *unixpath); |
169 | 157 | ||
@@ -175,16 +163,13 @@ GNUNET_CONNECTION_create_from_connect_to_unixpath (struct GNUNET_SCHEDULER_Handl | |||
175 | * This function returns immediately, even if the connection has not | 163 | * This function returns immediately, even if the connection has not |
176 | * yet been established. This function only creates TCP connections. | 164 | * yet been established. This function only creates TCP connections. |
177 | * | 165 | * |
178 | * @param sched scheduler to use | ||
179 | * @param af_family address family to use | 166 | * @param af_family address family to use |
180 | * @param serv_addr server address | 167 | * @param serv_addr server address |
181 | * @param addrlen length of server address | 168 | * @param addrlen length of server address |
182 | * @return the socket handle | 169 | * @return the socket handle |
183 | */ | 170 | */ |
184 | struct GNUNET_CONNECTION_Handle | 171 | struct GNUNET_CONNECTION_Handle |
185 | *GNUNET_CONNECTION_create_from_sockaddr (struct | 172 | *GNUNET_CONNECTION_create_from_sockaddr (int af_family, |
186 | GNUNET_SCHEDULER_Handle | ||
187 | *sched, int af_family, | ||
188 | const struct sockaddr | 173 | const struct sockaddr |
189 | *serv_addr, | 174 | *serv_addr, |
190 | socklen_t addrlen); | 175 | socklen_t addrlen); |
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index caa02c6b2..7fe871741 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h | |||
@@ -178,7 +178,6 @@ typedef void | |||
178 | * Certain events (such as connect/disconnect notifications) are not | 178 | * Certain events (such as connect/disconnect notifications) are not |
179 | * subject to queue size limitations. | 179 | * subject to queue size limitations. |
180 | * | 180 | * |
181 | * @param sched scheduler to use | ||
182 | * @param cfg configuration to use | 181 | * @param cfg configuration to use |
183 | * @param timeout after how long should we give up trying to connect to the core service? | 182 | * @param timeout after how long should we give up trying to connect to the core service? |
184 | * @param cls closure for the various callbacks that follow (including handlers in the handlers array) | 183 | * @param cls closure for the various callbacks that follow (including handlers in the handlers array) |
@@ -215,8 +214,7 @@ typedef void | |||
215 | * NULL on error (in this case, init is never called) | 214 | * NULL on error (in this case, init is never called) |
216 | */ | 215 | */ |
217 | struct GNUNET_CORE_Handle * | 216 | struct GNUNET_CORE_Handle * |
218 | GNUNET_CORE_connect (struct GNUNET_SCHEDULER_Handle *sched, | 217 | GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
219 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
220 | struct GNUNET_TIME_Relative timeout, | 218 | struct GNUNET_TIME_Relative timeout, |
221 | void *cls, | 219 | void *cls, |
222 | GNUNET_CORE_StartupCallback init, | 220 | GNUNET_CORE_StartupCallback init, |
@@ -257,7 +255,6 @@ struct GNUNET_CORE_PeerRequestHandle; | |||
257 | * to our connection attempt within the given time frame, 'cont' will | 255 | * to our connection attempt within the given time frame, 'cont' will |
258 | * be called with the TIMEOUT reason code. | 256 | * be called with the TIMEOUT reason code. |
259 | * | 257 | * |
260 | * @param sched scheduler to use | ||
261 | * @param cfg configuration to use | 258 | * @param cfg configuration to use |
262 | * @param timeout how long to try to talk to core | 259 | * @param timeout how long to try to talk to core |
263 | * @param peer who should we connect to | 260 | * @param peer who should we connect to |
@@ -266,8 +263,7 @@ struct GNUNET_CORE_PeerRequestHandle; | |||
266 | * @return NULL on error (cont will not be called), otherwise handle for cancellation | 263 | * @return NULL on error (cont will not be called), otherwise handle for cancellation |
267 | */ | 264 | */ |
268 | struct GNUNET_CORE_PeerRequestHandle * | 265 | struct GNUNET_CORE_PeerRequestHandle * |
269 | GNUNET_CORE_peer_request_connect (struct GNUNET_SCHEDULER_Handle *sched, | 266 | GNUNET_CORE_peer_request_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
270 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
271 | struct GNUNET_TIME_Relative timeout, | 267 | struct GNUNET_TIME_Relative timeout, |
272 | const struct GNUNET_PeerIdentity * peer, | 268 | const struct GNUNET_PeerIdentity * peer, |
273 | GNUNET_SCHEDULER_Task cont, | 269 | GNUNET_SCHEDULER_Task cont, |
@@ -317,7 +313,6 @@ struct GNUNET_CORE_InformationRequestContext; | |||
317 | /** | 313 | /** |
318 | * Obtain statistics and/or change preferences for the given peer. | 314 | * Obtain statistics and/or change preferences for the given peer. |
319 | * | 315 | * |
320 | * @param sched scheduler to use | ||
321 | * @param cfg configuration to use | 316 | * @param cfg configuration to use |
322 | * @param peer identifies the peer | 317 | * @param peer identifies the peer |
323 | * @param timeout after how long should we give up (and call "info" with NULL | 318 | * @param timeout after how long should we give up (and call "info" with NULL |
@@ -340,8 +335,7 @@ struct GNUNET_CORE_InformationRequestContext; | |||
340 | * @return NULL on error | 335 | * @return NULL on error |
341 | */ | 336 | */ |
342 | struct GNUNET_CORE_InformationRequestContext * | 337 | struct GNUNET_CORE_InformationRequestContext * |
343 | GNUNET_CORE_peer_change_preference (struct GNUNET_SCHEDULER_Handle *sched, | 338 | GNUNET_CORE_peer_change_preference (const struct GNUNET_CONFIGURATION_Handle *cfg, |
344 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
345 | const struct GNUNET_PeerIdentity *peer, | 339 | const struct GNUNET_PeerIdentity *peer, |
346 | struct GNUNET_TIME_Relative timeout, | 340 | struct GNUNET_TIME_Relative timeout, |
347 | struct GNUNET_BANDWIDTH_Value32NBO bw_out, | 341 | struct GNUNET_BANDWIDTH_Value32NBO bw_out, |
@@ -362,15 +356,13 @@ GNUNET_CORE_peer_change_preference_cancel (struct GNUNET_CORE_InformationRequest | |||
362 | /** | 356 | /** |
363 | * Obtain statistics and/or change preferences for the given peer. | 357 | * Obtain statistics and/or change preferences for the given peer. |
364 | * | 358 | * |
365 | * @param sched scheduler to use | ||
366 | * @param cfg configuration to use | 359 | * @param cfg configuration to use |
367 | * @param peer_cb function to call with the peer information | 360 | * @param peer_cb function to call with the peer information |
368 | * @param cb_cls closure for peer_cb | 361 | * @param cb_cls closure for peer_cb |
369 | * @return GNUNET_OK if iterating, GNUNET_SYSERR on error | 362 | * @return GNUNET_OK if iterating, GNUNET_SYSERR on error |
370 | */ | 363 | */ |
371 | int | 364 | int |
372 | GNUNET_CORE_iterate_peers (struct GNUNET_SCHEDULER_Handle *sched, | 365 | GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, |
373 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
374 | GNUNET_CORE_ConnectEventHandler peer_cb, | 366 | GNUNET_CORE_ConnectEventHandler peer_cb, |
375 | void *cb_cls); | 367 | void *cb_cls); |
376 | 368 | ||
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index 8b1379e45..5d8b4ab8a 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h | |||
@@ -436,7 +436,6 @@ struct GNUNET_CRYPTO_FileHashContext; | |||
436 | /** | 436 | /** |
437 | * Compute the hash of an entire file. | 437 | * Compute the hash of an entire file. |
438 | * | 438 | * |
439 | * @param sched scheduler to use | ||
440 | * @param priority scheduling priority to use | 439 | * @param priority scheduling priority to use |
441 | * @param filename name of file to hash | 440 | * @param filename name of file to hash |
442 | * @param blocksize number of bytes to process in one task | 441 | * @param blocksize number of bytes to process in one task |
@@ -445,8 +444,7 @@ struct GNUNET_CRYPTO_FileHashContext; | |||
445 | * @return NULL on (immediate) errror | 444 | * @return NULL on (immediate) errror |
446 | */ | 445 | */ |
447 | struct GNUNET_CRYPTO_FileHashContext * | 446 | struct GNUNET_CRYPTO_FileHashContext * |
448 | GNUNET_CRYPTO_hash_file (struct GNUNET_SCHEDULER_Handle *sched, | 447 | GNUNET_CRYPTO_hash_file (enum GNUNET_SCHEDULER_Priority priority, |
449 | enum GNUNET_SCHEDULER_Priority priority, | ||
450 | const char *filename, | 448 | const char *filename, |
451 | size_t blocksize, | 449 | size_t blocksize, |
452 | GNUNET_CRYPTO_HashCompletedCallback callback, | 450 | GNUNET_CRYPTO_HashCompletedCallback callback, |
diff --git a/src/include/gnunet_datacache_lib.h b/src/include/gnunet_datacache_lib.h index 74878f08b..5fcd99ad4 100644 --- a/src/include/gnunet_datacache_lib.h +++ b/src/include/gnunet_datacache_lib.h | |||
@@ -52,14 +52,12 @@ struct GNUNET_DATACACHE_Handle; | |||
52 | /** | 52 | /** |
53 | * Create a data cache. | 53 | * Create a data cache. |
54 | * | 54 | * |
55 | * @param sched scheduler to use | ||
56 | * @param cfg configuration to use | 55 | * @param cfg configuration to use |
57 | * @param section section in the configuration that contains our options | 56 | * @param section section in the configuration that contains our options |
58 | * @return handle to use to access the service | 57 | * @return handle to use to access the service |
59 | */ | 58 | */ |
60 | struct GNUNET_DATACACHE_Handle * | 59 | struct GNUNET_DATACACHE_Handle * |
61 | GNUNET_DATACACHE_create (struct GNUNET_SCHEDULER_Handle *sched, | 60 | GNUNET_DATACACHE_create (const struct GNUNET_CONFIGURATION_Handle *cfg, |
62 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
63 | const char *section); | 61 | const char *section); |
64 | 62 | ||
65 | 63 | ||
diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h index 8d35f7900..4c9fad965 100644 --- a/src/include/gnunet_datastore_service.h +++ b/src/include/gnunet_datastore_service.h | |||
@@ -57,15 +57,11 @@ struct GNUNET_DATASTORE_Handle; | |||
57 | * Connect to the datastore service. | 57 | * Connect to the datastore service. |
58 | * | 58 | * |
59 | * @param cfg configuration to use | 59 | * @param cfg configuration to use |
60 | * @param sched scheduler to use | ||
61 | * @return handle to use to access the service | 60 | * @return handle to use to access the service |
62 | */ | 61 | */ |
63 | struct GNUNET_DATASTORE_Handle *GNUNET_DATASTORE_connect (const struct | 62 | struct GNUNET_DATASTORE_Handle *GNUNET_DATASTORE_connect (const struct |
64 | GNUNET_CONFIGURATION_Handle | 63 | GNUNET_CONFIGURATION_Handle |
65 | *cfg, | 64 | *cfg); |
66 | struct | ||
67 | GNUNET_SCHEDULER_Handle | ||
68 | *sched); | ||
69 | 65 | ||
70 | 66 | ||
71 | /** | 67 | /** |
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h index b3bf2b84b..7ab818de7 100644 --- a/src/include/gnunet_dht_service.h +++ b/src/include/gnunet_dht_service.h | |||
@@ -99,15 +99,13 @@ enum GNUNET_DHT_RouteOption | |||
99 | /** | 99 | /** |
100 | * Initialize the connection with the DHT service. | 100 | * Initialize the connection with the DHT service. |
101 | * | 101 | * |
102 | * @param sched scheduler to use | ||
103 | * @param cfg configuration to use | 102 | * @param cfg configuration to use |
104 | * @param ht_len size of the internal hash table to use for | 103 | * @param ht_len size of the internal hash table to use for |
105 | * processing multiple GET/FIND requests in parallel | 104 | * processing multiple GET/FIND requests in parallel |
106 | * @return NULL on error | 105 | * @return NULL on error |
107 | */ | 106 | */ |
108 | struct GNUNET_DHT_Handle * | 107 | struct GNUNET_DHT_Handle * |
109 | GNUNET_DHT_connect (struct GNUNET_SCHEDULER_Handle *sched, | 108 | GNUNET_DHT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
110 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
111 | unsigned int ht_len); | 109 | unsigned int ht_len); |
112 | 110 | ||
113 | 111 | ||
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index b8df9d7b6..6eb666049 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -496,15 +496,12 @@ int GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator | |||
496 | * If a scheduler does not need to be used, GNUNET_DISK_directory_scan | 496 | * If a scheduler does not need to be used, GNUNET_DISK_directory_scan |
497 | * may provide a simpler API. | 497 | * may provide a simpler API. |
498 | * | 498 | * |
499 | * @param sched scheduler to use | ||
500 | * @param prio priority to use | 499 | * @param prio priority to use |
501 | * @param dirName the name of the directory | 500 | * @param dirName the name of the directory |
502 | * @param callback the method to call for each file | 501 | * @param callback the method to call for each file |
503 | * @param callback_cls closure for callback | 502 | * @param callback_cls closure for callback |
504 | */ | 503 | */ |
505 | void GNUNET_DISK_directory_iterator_start (struct GNUNET_SCHEDULER_Handle | 504 | void GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority |
506 | *sched, | ||
507 | enum GNUNET_SCHEDULER_Priority | ||
508 | prio, const char *dirName, | 505 | prio, const char *dirName, |
509 | GNUNET_DISK_DirectoryIteratorCallback | 506 | GNUNET_DISK_DirectoryIteratorCallback |
510 | callback, void *callback_cls); | 507 | callback, void *callback_cls); |
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index 0e5dccc2d..68c250e97 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h | |||
@@ -1585,7 +1585,6 @@ struct GNUNET_FS_Handle; | |||
1585 | /** | 1585 | /** |
1586 | * Setup a connection to the file-sharing service. | 1586 | * Setup a connection to the file-sharing service. |
1587 | * | 1587 | * |
1588 | * @param sched scheduler to use | ||
1589 | * @param cfg configuration to use | 1588 | * @param cfg configuration to use |
1590 | * @param client_name unique identifier for this client | 1589 | * @param client_name unique identifier for this client |
1591 | * @param upcb function to call to notify about FS actions | 1590 | * @param upcb function to call to notify about FS actions |
@@ -1595,8 +1594,7 @@ struct GNUNET_FS_Handle; | |||
1595 | * @return NULL on error | 1594 | * @return NULL on error |
1596 | */ | 1595 | */ |
1597 | struct GNUNET_FS_Handle * | 1596 | struct GNUNET_FS_Handle * |
1598 | GNUNET_FS_start (struct GNUNET_SCHEDULER_Handle *sched, | 1597 | GNUNET_FS_start (const struct GNUNET_CONFIGURATION_Handle *cfg, |
1599 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
1600 | const char *client_name, | 1598 | const char *client_name, |
1601 | GNUNET_FS_ProgressCallback upcb, | 1599 | GNUNET_FS_ProgressCallback upcb, |
1602 | void *upcb_cls, | 1600 | void *upcb_cls, |
diff --git a/src/include/gnunet_nat_lib.h b/src/include/gnunet_nat_lib.h index 9c6e171b6..c1080c586 100644 --- a/src/include/gnunet_nat_lib.h +++ b/src/include/gnunet_nat_lib.h | |||
@@ -57,7 +57,6 @@ struct GNUNET_NAT_Handle; | |||
57 | * of the local host's addresses should the external port be mapped. The port | 57 | * of the local host's addresses should the external port be mapped. The port |
58 | * is taken from the corresponding sockaddr_in[6] field. | 58 | * is taken from the corresponding sockaddr_in[6] field. |
59 | * | 59 | * |
60 | * @param sched the sheduler used in the program | ||
61 | * @param addr the local address packets should be redirected to | 60 | * @param addr the local address packets should be redirected to |
62 | * @param addrlen actual lenght of the address | 61 | * @param addrlen actual lenght of the address |
63 | * @param callback function to call everytime the public IP address changes | 62 | * @param callback function to call everytime the public IP address changes |
@@ -65,8 +64,7 @@ struct GNUNET_NAT_Handle; | |||
65 | * @return NULL on error, otherwise handle that can be used to unregister | 64 | * @return NULL on error, otherwise handle that can be used to unregister |
66 | */ | 65 | */ |
67 | struct GNUNET_NAT_Handle * | 66 | struct GNUNET_NAT_Handle * |
68 | GNUNET_NAT_register (struct GNUNET_SCHEDULER_Handle *sched, | 67 | GNUNET_NAT_register (const struct sockaddr *addr, |
69 | const struct sockaddr *addr, | ||
70 | socklen_t addrlen, | 68 | socklen_t addrlen, |
71 | GNUNET_NAT_AddressCallback callback, | 69 | GNUNET_NAT_AddressCallback callback, |
72 | void *callback_cls); | 70 | void *callback_cls); |
diff --git a/src/include/gnunet_peerinfo_service.h b/src/include/gnunet_peerinfo_service.h index d88c6fb41..228e698b3 100644 --- a/src/include/gnunet_peerinfo_service.h +++ b/src/include/gnunet_peerinfo_service.h | |||
@@ -50,14 +50,12 @@ struct GNUNET_PEERINFO_Handle; | |||
50 | /** | 50 | /** |
51 | * Connect to the peerinfo service. | 51 | * Connect to the peerinfo service. |
52 | * | 52 | * |
53 | * @param sched scheduler to use | ||
54 | * @param cfg configuration to use | 53 | * @param cfg configuration to use |
55 | * @return NULL on error (configuration related, actual connection | 54 | * @return NULL on error (configuration related, actual connection |
56 | * etablishment may happen asynchronously). | 55 | * etablishment may happen asynchronously). |
57 | */ | 56 | */ |
58 | struct GNUNET_PEERINFO_Handle * | 57 | struct GNUNET_PEERINFO_Handle * |
59 | GNUNET_PEERINFO_connect (struct GNUNET_SCHEDULER_Handle *sched, | 58 | GNUNET_PEERINFO_connect (const struct GNUNET_CONFIGURATION_Handle *cfg); |
60 | const struct GNUNET_CONFIGURATION_Handle *cfg); | ||
61 | 59 | ||
62 | 60 | ||
63 | 61 | ||
@@ -164,14 +162,12 @@ struct GNUNET_PEERINFO_NotifyContext; | |||
164 | * twice with the same peer information. | 162 | * twice with the same peer information. |
165 | * | 163 | * |
166 | * @param cfg configuration to use | 164 | * @param cfg configuration to use |
167 | * @param sched scheduler to use | ||
168 | * @param callback the method to call for each peer | 165 | * @param callback the method to call for each peer |
169 | * @param callback_cls closure for callback | 166 | * @param callback_cls closure for callback |
170 | * @return NULL on error | 167 | * @return NULL on error |
171 | */ | 168 | */ |
172 | struct GNUNET_PEERINFO_NotifyContext * | 169 | struct GNUNET_PEERINFO_NotifyContext * |
173 | GNUNET_PEERINFO_notify (const struct GNUNET_CONFIGURATION_Handle *cfg, | 170 | GNUNET_PEERINFO_notify (const struct GNUNET_CONFIGURATION_Handle *cfg, |
174 | struct GNUNET_SCHEDULER_Handle *sched, | ||
175 | GNUNET_PEERINFO_Processor callback, | 171 | GNUNET_PEERINFO_Processor callback, |
176 | void *callback_cls); | 172 | void *callback_cls); |
177 | 173 | ||
diff --git a/src/include/gnunet_program_lib.h b/src/include/gnunet_program_lib.h index a44f4f11e..b01703f05 100644 --- a/src/include/gnunet_program_lib.h +++ b/src/include/gnunet_program_lib.h | |||
@@ -43,13 +43,11 @@ extern "C" | |||
43 | * Main function that will be run. | 43 | * Main function that will be run. |
44 | * | 44 | * |
45 | * @param cls closure | 45 | * @param cls closure |
46 | * @param sched the scheduler to use | ||
47 | * @param args remaining command-line arguments | 46 | * @param args remaining command-line arguments |
48 | * @param cfgfile name of the configuration file used (for saving, can be NULL!) | 47 | * @param cfgfile name of the configuration file used (for saving, can be NULL!) |
49 | * @param cfg configuration | 48 | * @param cfg configuration |
50 | */ | 49 | */ |
51 | typedef void (*GNUNET_PROGRAM_Main) (void *cls, | 50 | typedef void (*GNUNET_PROGRAM_Main) (void *cls, |
52 | struct GNUNET_SCHEDULER_Handle * sched, | ||
53 | char *const *args, | 51 | char *const *args, |
54 | const char *cfgfile, | 52 | const char *cfgfile, |
55 | const struct GNUNET_CONFIGURATION_Handle * | 53 | const struct GNUNET_CONFIGURATION_Handle * |
diff --git a/src/include/gnunet_resolver_service.h b/src/include/gnunet_resolver_service.h index b55ca2f56..79f703553 100644 --- a/src/include/gnunet_resolver_service.h +++ b/src/include/gnunet_resolver_service.h | |||
@@ -62,7 +62,6 @@ struct GNUNET_RESOLVER_RequestHandle; | |||
62 | /** | 62 | /** |
63 | * Convert a string to one or more IP addresses. | 63 | * Convert a string to one or more IP addresses. |
64 | * | 64 | * |
65 | * @param sched scheduler to use | ||
66 | * @param cfg configuration to use | 65 | * @param cfg configuration to use |
67 | * @param hostname the hostname to resolve | 66 | * @param hostname the hostname to resolve |
68 | * @param domain AF_INET or AF_INET6; use AF_UNSPEC for "any" | 67 | * @param domain AF_INET or AF_INET6; use AF_UNSPEC for "any" |
@@ -72,8 +71,7 @@ struct GNUNET_RESOLVER_RequestHandle; | |||
72 | * @return handle that can be used to cancel the request, NULL on error | 71 | * @return handle that can be used to cancel the request, NULL on error |
73 | */ | 72 | */ |
74 | struct GNUNET_RESOLVER_RequestHandle * | 73 | struct GNUNET_RESOLVER_RequestHandle * |
75 | GNUNET_RESOLVER_ip_get (struct GNUNET_SCHEDULER_Handle *sched, | 74 | GNUNET_RESOLVER_ip_get (const struct GNUNET_CONFIGURATION_Handle *cfg, |
76 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
77 | const char *hostname, | 75 | const char *hostname, |
78 | int domain, | 76 | int domain, |
79 | struct GNUNET_TIME_Relative timeout, | 77 | struct GNUNET_TIME_Relative timeout, |
@@ -84,7 +82,6 @@ GNUNET_RESOLVER_ip_get (struct GNUNET_SCHEDULER_Handle *sched, | |||
84 | /** | 82 | /** |
85 | * Resolve our hostname to an IP address. | 83 | * Resolve our hostname to an IP address. |
86 | * | 84 | * |
87 | * @param sched scheduler to use | ||
88 | * @param cfg configuration to use | 85 | * @param cfg configuration to use |
89 | * @param domain AF_INET or AF_INET6; use AF_UNSPEC for "any" | 86 | * @param domain AF_INET or AF_INET6; use AF_UNSPEC for "any" |
90 | * @param callback function to call with addresses | 87 | * @param callback function to call with addresses |
@@ -93,8 +90,7 @@ GNUNET_RESOLVER_ip_get (struct GNUNET_SCHEDULER_Handle *sched, | |||
93 | * @return handle that can be used to cancel the request, NULL on error | 90 | * @return handle that can be used to cancel the request, NULL on error |
94 | */ | 91 | */ |
95 | struct GNUNET_RESOLVER_RequestHandle * | 92 | struct GNUNET_RESOLVER_RequestHandle * |
96 | GNUNET_RESOLVER_hostname_resolve (struct GNUNET_SCHEDULER_Handle *sched, | 93 | GNUNET_RESOLVER_hostname_resolve (const struct GNUNET_CONFIGURATION_Handle *cfg, |
97 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
98 | int domain, | 94 | int domain, |
99 | struct GNUNET_TIME_Relative timeout, | 95 | struct GNUNET_TIME_Relative timeout, |
100 | GNUNET_RESOLVER_AddressCallback callback, | 96 | GNUNET_RESOLVER_AddressCallback callback, |
@@ -123,7 +119,6 @@ GNUNET_RESOLVER_local_fqdn_get ( void ); | |||
123 | /** | 119 | /** |
124 | * Perform a reverse DNS lookup. | 120 | * Perform a reverse DNS lookup. |
125 | * | 121 | * |
126 | * @param sched scheduler to use | ||
127 | * @param cfg configuration to use | 122 | * @param cfg configuration to use |
128 | * @param sa host address | 123 | * @param sa host address |
129 | * @param salen length of host address | 124 | * @param salen length of host address |
@@ -134,8 +129,7 @@ GNUNET_RESOLVER_local_fqdn_get ( void ); | |||
134 | * @return handle that can be used to cancel the request, NULL on error | 129 | * @return handle that can be used to cancel the request, NULL on error |
135 | */ | 130 | */ |
136 | struct GNUNET_RESOLVER_RequestHandle * | 131 | struct GNUNET_RESOLVER_RequestHandle * |
137 | GNUNET_RESOLVER_hostname_get (struct GNUNET_SCHEDULER_Handle *sched, | 132 | GNUNET_RESOLVER_hostname_get (const struct GNUNET_CONFIGURATION_Handle *cfg, |
138 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
139 | const struct sockaddr *sa, | 133 | const struct sockaddr *sa, |
140 | socklen_t salen, | 134 | socklen_t salen, |
141 | int do_resolve, | 135 | int do_resolve, |
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index b39feb926..774f2f4bc 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h | |||
@@ -35,12 +35,6 @@ extern "C" | |||
35 | #endif | 35 | #endif |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | |||
39 | /** | ||
40 | * Opaque handle for the scheduling service. | ||
41 | */ | ||
42 | struct GNUNET_SCHEDULER_Handle; | ||
43 | |||
44 | /** | 38 | /** |
45 | * Opaque reference to a task. | 39 | * Opaque reference to a task. |
46 | */ | 40 | */ |
@@ -167,12 +161,6 @@ enum GNUNET_SCHEDULER_Priority | |||
167 | */ | 161 | */ |
168 | struct GNUNET_SCHEDULER_TaskContext | 162 | struct GNUNET_SCHEDULER_TaskContext |
169 | { | 163 | { |
170 | |||
171 | /** | ||
172 | * Scheduler running the task | ||
173 | */ | ||
174 | struct GNUNET_SCHEDULER_Handle *sched; | ||
175 | |||
176 | /** | 164 | /** |
177 | * Reason why the task is run now | 165 | * Reason why the task is run now |
178 | */ | 166 | */ |
@@ -229,10 +217,8 @@ void GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls); | |||
229 | * cause all tasks to run (as soon as possible, respecting | 217 | * cause all tasks to run (as soon as possible, respecting |
230 | * priorities and prerequisite tasks). Note that tasks | 218 | * priorities and prerequisite tasks). Note that tasks |
231 | * scheduled AFTER this call may still be delayed arbitrarily. | 219 | * scheduled AFTER this call may still be delayed arbitrarily. |
232 | * | ||
233 | * @param sched the scheduler | ||
234 | */ | 220 | */ |
235 | void GNUNET_SCHEDULER_shutdown (struct GNUNET_SCHEDULER_Handle *sched); | 221 | void GNUNET_SCHEDULER_shutdown (); |
236 | 222 | ||
237 | 223 | ||
238 | /** | 224 | /** |
@@ -241,14 +227,12 @@ void GNUNET_SCHEDULER_shutdown (struct GNUNET_SCHEDULER_Handle *sched); | |||
241 | * dropped (if the decision should be made based on the number of | 227 | * dropped (if the decision should be made based on the number of |
242 | * tasks ready to run). | 228 | * tasks ready to run). |
243 | * | 229 | * |
244 | * @param sched scheduler to query | 230 | * * @param p priority-level to query, use KEEP to query the level |
245 | * @param p priority-level to query, use KEEP to query the level | ||
246 | * of the current task, use COUNT to get the sum over | 231 | * of the current task, use COUNT to get the sum over |
247 | * all priority levels | 232 | * all priority levels |
248 | * @return number of tasks pending right now | 233 | * @return number of tasks pending right now |
249 | */ | 234 | */ |
250 | unsigned int GNUNET_SCHEDULER_get_load (struct GNUNET_SCHEDULER_Handle *sched, | 235 | unsigned int GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p); |
251 | enum GNUNET_SCHEDULER_Priority p); | ||
252 | 236 | ||
253 | 237 | ||
254 | /** | 238 | /** |
@@ -256,23 +240,20 @@ unsigned int GNUNET_SCHEDULER_get_load (struct GNUNET_SCHEDULER_Handle *sched, | |||
256 | * started. Will return the same value as | 240 | * started. Will return the same value as |
257 | * the GNUNET_SCHEDULER_TaskContext's reason field. | 241 | * the GNUNET_SCHEDULER_TaskContext's reason field. |
258 | * | 242 | * |
259 | * @param sched scheduler to query | 243 | * * @return reason(s) why the current task is run |
260 | * @return reason(s) why the current task is run | ||
261 | */ | 244 | */ |
262 | enum GNUNET_SCHEDULER_Reason | 245 | enum GNUNET_SCHEDULER_Reason |
263 | GNUNET_SCHEDULER_get_reason (struct GNUNET_SCHEDULER_Handle *sched); | 246 | GNUNET_SCHEDULER_get_reason (); |
264 | 247 | ||
265 | 248 | ||
266 | /** | 249 | /** |
267 | * Cancel the task with the specified identifier. | 250 | * Cancel the task with the specified identifier. |
268 | * The task must not yet have run. | 251 | * The task must not yet have run. |
269 | * | 252 | * |
270 | * @param sched scheduler to use | 253 | * * @param task id of the task to cancel |
271 | * @param task id of the task to cancel | ||
272 | * @return the closure of the callback of the cancelled task | 254 | * @return the closure of the callback of the cancelled task |
273 | */ | 255 | */ |
274 | void *GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Handle *sched, | 256 | void *GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_TaskIdentifier task); |
275 | GNUNET_SCHEDULER_TaskIdentifier task); | ||
276 | 257 | ||
277 | 258 | ||
278 | /** | 259 | /** |
@@ -280,14 +261,12 @@ void *GNUNET_SCHEDULER_cancel (struct GNUNET_SCHEDULER_Handle *sched, | |||
280 | * similar to the other "add" functions except that there is no delay | 261 | * similar to the other "add" functions except that there is no delay |
281 | * and the reason code can be specified. | 262 | * and the reason code can be specified. |
282 | * | 263 | * |
283 | * @param sched scheduler to use | 264 | * * @param task main function of the task |
284 | * @param task main function of the task | ||
285 | * @param task_cls closure of task | 265 | * @param task_cls closure of task |
286 | * @param reason reason for task invocation | 266 | * @param reason reason for task invocation |
287 | */ | 267 | */ |
288 | void | 268 | void |
289 | GNUNET_SCHEDULER_add_continuation (struct GNUNET_SCHEDULER_Handle *sched, | 269 | GNUNET_SCHEDULER_add_continuation (GNUNET_SCHEDULER_Task task, |
290 | GNUNET_SCHEDULER_Task task, | ||
291 | void *task_cls, | 270 | void *task_cls, |
292 | enum GNUNET_SCHEDULER_Reason reason); | 271 | enum GNUNET_SCHEDULER_Reason reason); |
293 | 272 | ||
@@ -297,8 +276,7 @@ GNUNET_SCHEDULER_add_continuation (struct GNUNET_SCHEDULER_Handle *sched, | |||
297 | * has completed. It will be run with the priority of the calling | 276 | * has completed. It will be run with the priority of the calling |
298 | * task. | 277 | * task. |
299 | * | 278 | * |
300 | * @param sched scheduler to use | 279 | * * @param prerequisite_task run this task after the task with the given |
301 | * @param prerequisite_task run this task after the task with the given | ||
302 | * task identifier completes (and any of our other | 280 | * task identifier completes (and any of our other |
303 | * conditions, such as delay, read or write-readiness | 281 | * conditions, such as delay, read or write-readiness |
304 | * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency | 282 | * are satisfied). Use GNUNET_SCHEDULER_NO_TASK to not have any dependency |
@@ -310,8 +288,7 @@ GNUNET_SCHEDULER_add_continuation (struct GNUNET_SCHEDULER_Handle *sched, | |||
310 | * only valid until "task" is started! | 288 | * only valid until "task" is started! |
311 | */ | 289 | */ |
312 | GNUNET_SCHEDULER_TaskIdentifier | 290 | GNUNET_SCHEDULER_TaskIdentifier |
313 | GNUNET_SCHEDULER_add_after (struct GNUNET_SCHEDULER_Handle *sched, | 291 | GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_TaskIdentifier prerequisite_task, |
314 | GNUNET_SCHEDULER_TaskIdentifier prerequisite_task, | ||
315 | GNUNET_SCHEDULER_Task task, | 292 | GNUNET_SCHEDULER_Task task, |
316 | void *task_cls); | 293 | void *task_cls); |
317 | 294 | ||
@@ -319,16 +296,14 @@ GNUNET_SCHEDULER_add_after (struct GNUNET_SCHEDULER_Handle *sched, | |||
319 | /** | 296 | /** |
320 | * Schedule a new task to be run with a specified priority. | 297 | * Schedule a new task to be run with a specified priority. |
321 | * | 298 | * |
322 | * @param sched scheduler to use | 299 | * * @param prio how important is the new task? |
323 | * @param prio how important is the new task? | ||
324 | * @param task main function of the task | 300 | * @param task main function of the task |
325 | * @param task_cls closure of task | 301 | * @param task_cls closure of task |
326 | * @return unique task identifier for the job | 302 | * @return unique task identifier for the job |
327 | * only valid until "task" is started! | 303 | * only valid until "task" is started! |
328 | */ | 304 | */ |
329 | GNUNET_SCHEDULER_TaskIdentifier | 305 | GNUNET_SCHEDULER_TaskIdentifier |
330 | GNUNET_SCHEDULER_add_with_priority (struct GNUNET_SCHEDULER_Handle *sched, | 306 | GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio, |
331 | enum GNUNET_SCHEDULER_Priority prio, | ||
332 | GNUNET_SCHEDULER_Task task, | 307 | GNUNET_SCHEDULER_Task task, |
333 | void *task_cls); | 308 | void *task_cls); |
334 | 309 | ||
@@ -337,15 +312,13 @@ GNUNET_SCHEDULER_add_with_priority (struct GNUNET_SCHEDULER_Handle *sched, | |||
337 | * Schedule a new task to be run as soon as possible. The task | 312 | * Schedule a new task to be run as soon as possible. The task |
338 | * will be run with the priority of the calling task. | 313 | * will be run with the priority of the calling task. |
339 | * | 314 | * |
340 | * @param sched scheduler to use | 315 | * * @param task main function of the task |
341 | * @param task main function of the task | ||
342 | * @param task_cls closure of task | 316 | * @param task_cls closure of task |
343 | * @return unique task identifier for the job | 317 | * @return unique task identifier for the job |
344 | * only valid until "task" is started! | 318 | * only valid until "task" is started! |
345 | */ | 319 | */ |
346 | GNUNET_SCHEDULER_TaskIdentifier | 320 | GNUNET_SCHEDULER_TaskIdentifier |
347 | GNUNET_SCHEDULER_add_now (struct GNUNET_SCHEDULER_Handle *sched, | 321 | GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, |
348 | GNUNET_SCHEDULER_Task task, | ||
349 | void *task_cls); | 322 | void *task_cls); |
350 | 323 | ||
351 | 324 | ||
@@ -354,8 +327,7 @@ GNUNET_SCHEDULER_add_now (struct GNUNET_SCHEDULER_Handle *sched, | |||
354 | * will be scheduled for execution once the delay has expired. It | 327 | * will be scheduled for execution once the delay has expired. It |
355 | * will be run with the priority of the calling task. | 328 | * will be run with the priority of the calling task. |
356 | * | 329 | * |
357 | * @param sched scheduler to use | 330 | * * @param delay when should this operation time out? Use |
358 | * @param delay when should this operation time out? Use | ||
359 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" | 331 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" |
360 | * @param task main function of the task | 332 | * @param task main function of the task |
361 | * @param task_cls closure of task | 333 | * @param task_cls closure of task |
@@ -363,8 +335,7 @@ GNUNET_SCHEDULER_add_now (struct GNUNET_SCHEDULER_Handle *sched, | |||
363 | * only valid until "task" is started! | 335 | * only valid until "task" is started! |
364 | */ | 336 | */ |
365 | GNUNET_SCHEDULER_TaskIdentifier | 337 | GNUNET_SCHEDULER_TaskIdentifier |
366 | GNUNET_SCHEDULER_add_delayed (struct GNUNET_SCHEDULER_Handle *sched, | 338 | GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay, |
367 | struct GNUNET_TIME_Relative delay, | ||
368 | GNUNET_SCHEDULER_Task task, | 339 | GNUNET_SCHEDULER_Task task, |
369 | void *task_cls); | 340 | void *task_cls); |
370 | 341 | ||
@@ -377,8 +348,7 @@ GNUNET_SCHEDULER_add_delayed (struct GNUNET_SCHEDULER_Handle *sched, | |||
377 | * socket operation is ready. It will be run with the priority of | 348 | * socket operation is ready. It will be run with the priority of |
378 | * the calling task. | 349 | * the calling task. |
379 | * | 350 | * |
380 | * @param sched scheduler to use | 351 | * * @param delay when should this operation time out? Use |
381 | * @param delay when should this operation time out? Use | ||
382 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" | 352 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" |
383 | * @param rfd read file-descriptor | 353 | * @param rfd read file-descriptor |
384 | * @param task main function of the task | 354 | * @param task main function of the task |
@@ -387,8 +357,7 @@ GNUNET_SCHEDULER_add_delayed (struct GNUNET_SCHEDULER_Handle *sched, | |||
387 | * only valid until "task" is started! | 357 | * only valid until "task" is started! |
388 | */ | 358 | */ |
389 | GNUNET_SCHEDULER_TaskIdentifier | 359 | GNUNET_SCHEDULER_TaskIdentifier |
390 | GNUNET_SCHEDULER_add_read_net (struct GNUNET_SCHEDULER_Handle *sched, | 360 | GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, |
391 | struct GNUNET_TIME_Relative delay, | ||
392 | struct GNUNET_NETWORK_Handle *rfd, | 361 | struct GNUNET_NETWORK_Handle *rfd, |
393 | GNUNET_SCHEDULER_Task task, | 362 | GNUNET_SCHEDULER_Task task, |
394 | void *task_cls); | 363 | void *task_cls); |
@@ -402,8 +371,7 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_SCHEDULER_Handle *sched, | |||
402 | * socket operation is ready. It will be run with the priority of | 371 | * socket operation is ready. It will be run with the priority of |
403 | * the calling task. | 372 | * the calling task. |
404 | * | 373 | * |
405 | * @param sched scheduler to use | 374 | * * @param delay when should this operation time out? Use |
406 | * @param delay when should this operation time out? Use | ||
407 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" | 375 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" |
408 | * @param wfd write file-descriptor | 376 | * @param wfd write file-descriptor |
409 | * @param task main function of the task | 377 | * @param task main function of the task |
@@ -412,8 +380,7 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_SCHEDULER_Handle *sched, | |||
412 | * only valid until "task" is started! | 380 | * only valid until "task" is started! |
413 | */ | 381 | */ |
414 | GNUNET_SCHEDULER_TaskIdentifier | 382 | GNUNET_SCHEDULER_TaskIdentifier |
415 | GNUNET_SCHEDULER_add_write_net (struct GNUNET_SCHEDULER_Handle *sched, | 383 | GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay, |
416 | struct GNUNET_TIME_Relative delay, | ||
417 | struct GNUNET_NETWORK_Handle *wfd, | 384 | struct GNUNET_NETWORK_Handle *wfd, |
418 | GNUNET_SCHEDULER_Task task, | 385 | GNUNET_SCHEDULER_Task task, |
419 | void *task_cls); | 386 | void *task_cls); |
@@ -427,8 +394,7 @@ GNUNET_SCHEDULER_add_write_net (struct GNUNET_SCHEDULER_Handle *sched, | |||
427 | * socket operation is ready. It will be run with the priority of | 394 | * socket operation is ready. It will be run with the priority of |
428 | * the calling task. | 395 | * the calling task. |
429 | * | 396 | * |
430 | * @param sched scheduler to use | 397 | * * @param delay when should this operation time out? Use |
431 | * @param delay when should this operation time out? Use | ||
432 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" | 398 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" |
433 | * @param rfd read file-descriptor | 399 | * @param rfd read file-descriptor |
434 | * @param task main function of the task | 400 | * @param task main function of the task |
@@ -437,8 +403,7 @@ GNUNET_SCHEDULER_add_write_net (struct GNUNET_SCHEDULER_Handle *sched, | |||
437 | * only valid until "task" is started! | 403 | * only valid until "task" is started! |
438 | */ | 404 | */ |
439 | GNUNET_SCHEDULER_TaskIdentifier | 405 | GNUNET_SCHEDULER_TaskIdentifier |
440 | GNUNET_SCHEDULER_add_read_file (struct GNUNET_SCHEDULER_Handle *sched, | 406 | GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay, |
441 | struct GNUNET_TIME_Relative delay, | ||
442 | const struct GNUNET_DISK_FileHandle *rfd, | 407 | const struct GNUNET_DISK_FileHandle *rfd, |
443 | GNUNET_SCHEDULER_Task task, | 408 | GNUNET_SCHEDULER_Task task, |
444 | void *task_cls); | 409 | void *task_cls); |
@@ -452,8 +417,7 @@ GNUNET_SCHEDULER_add_read_file (struct GNUNET_SCHEDULER_Handle *sched, | |||
452 | * socket operation is ready. It will be run with the priority of | 417 | * socket operation is ready. It will be run with the priority of |
453 | * the calling task. | 418 | * the calling task. |
454 | * | 419 | * |
455 | * @param sched scheduler to use | 420 | * * @param delay when should this operation time out? Use |
456 | * @param delay when should this operation time out? Use | ||
457 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" | 421 | * GNUNET_TIME_UNIT_FOREVER_REL for "on shutdown" |
458 | * @param wfd write file-descriptor | 422 | * @param wfd write file-descriptor |
459 | * @param task main function of the task | 423 | * @param task main function of the task |
@@ -462,8 +426,7 @@ GNUNET_SCHEDULER_add_read_file (struct GNUNET_SCHEDULER_Handle *sched, | |||
462 | * only valid until "task" is started! | 426 | * only valid until "task" is started! |
463 | */ | 427 | */ |
464 | GNUNET_SCHEDULER_TaskIdentifier | 428 | GNUNET_SCHEDULER_TaskIdentifier |
465 | GNUNET_SCHEDULER_add_write_file (struct GNUNET_SCHEDULER_Handle *sched, | 429 | GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay, |
466 | struct GNUNET_TIME_Relative delay, | ||
467 | const struct GNUNET_DISK_FileHandle *wfd, | 430 | const struct GNUNET_DISK_FileHandle *wfd, |
468 | GNUNET_SCHEDULER_Task task, | 431 | GNUNET_SCHEDULER_Task task, |
469 | void *task_cls); | 432 | void *task_cls); |
@@ -486,8 +449,7 @@ GNUNET_SCHEDULER_add_write_file (struct GNUNET_SCHEDULER_Handle *sched, | |||
486 | * || shutdown-active) | 449 | * || shutdown-active) |
487 | * </code> | 450 | * </code> |
488 | * | 451 | * |
489 | * @param sched scheduler to use | 452 | * * @param prio how important is this task? |
490 | * @param prio how important is this task? | ||
491 | * @param prerequisite_task run this task after the task with the given | 453 | * @param prerequisite_task run this task after the task with the given |
492 | * task identifier completes (and any of our other | 454 | * task identifier completes (and any of our other |
493 | * conditions, such as delay, read or write-readiness | 455 | * conditions, such as delay, read or write-readiness |
@@ -503,8 +465,7 @@ GNUNET_SCHEDULER_add_write_file (struct GNUNET_SCHEDULER_Handle *sched, | |||
503 | * only valid until "task" is started! | 465 | * only valid until "task" is started! |
504 | */ | 466 | */ |
505 | GNUNET_SCHEDULER_TaskIdentifier | 467 | GNUNET_SCHEDULER_TaskIdentifier |
506 | GNUNET_SCHEDULER_add_select (struct GNUNET_SCHEDULER_Handle *sched, | 468 | GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio, |
507 | enum GNUNET_SCHEDULER_Priority prio, | ||
508 | GNUNET_SCHEDULER_TaskIdentifier | 469 | GNUNET_SCHEDULER_TaskIdentifier |
509 | prerequisite_task, | 470 | prerequisite_task, |
510 | struct GNUNET_TIME_Relative delay, | 471 | struct GNUNET_TIME_Relative delay, |
diff --git a/src/include/gnunet_server_lib.h b/src/include/gnunet_server_lib.h index 20ed78bab..6f671754d 100644 --- a/src/include/gnunet_server_lib.h +++ b/src/include/gnunet_server_lib.h | |||
@@ -115,7 +115,6 @@ struct GNUNET_SERVER_MessageHandler | |||
115 | /** | 115 | /** |
116 | * Create a new server. | 116 | * Create a new server. |
117 | * | 117 | * |
118 | * @param sched scheduler to use | ||
119 | * @param access function for access control | 118 | * @param access function for access control |
120 | * @param access_cls closure for access | 119 | * @param access_cls closure for access |
121 | * @param lsocks NULL-terminated array of listen sockets | 120 | * @param lsocks NULL-terminated array of listen sockets |
@@ -126,8 +125,7 @@ struct GNUNET_SERVER_MessageHandler | |||
126 | * (typically, "port" already in use) | 125 | * (typically, "port" already in use) |
127 | */ | 126 | */ |
128 | struct GNUNET_SERVER_Handle * | 127 | struct GNUNET_SERVER_Handle * |
129 | GNUNET_SERVER_create_with_sockets (struct GNUNET_SCHEDULER_Handle *sched, | 128 | GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access, void *access_cls, |
130 | GNUNET_CONNECTION_AccessCheck access, void *access_cls, | ||
131 | struct GNUNET_NETWORK_Handle **lsocks, | 129 | struct GNUNET_NETWORK_Handle **lsocks, |
132 | struct GNUNET_TIME_Relative | 130 | struct GNUNET_TIME_Relative |
133 | idle_timeout, | 131 | idle_timeout, |
@@ -136,7 +134,6 @@ GNUNET_SERVER_create_with_sockets (struct GNUNET_SCHEDULER_Handle *sched, | |||
136 | /** | 134 | /** |
137 | * Create a new server. | 135 | * Create a new server. |
138 | * | 136 | * |
139 | * @param sched scheduler to use | ||
140 | * @param access function for access control | 137 | * @param access function for access control |
141 | * @param access_cls closure for access | 138 | * @param access_cls closure for access |
142 | * @param serverAddr address toes listen on (including port), NULL terminated array | 139 | * @param serverAddr address toes listen on (including port), NULL terminated array |
@@ -147,10 +144,7 @@ GNUNET_SERVER_create_with_sockets (struct GNUNET_SCHEDULER_Handle *sched, | |||
147 | * @return handle for the new server, NULL on error | 144 | * @return handle for the new server, NULL on error |
148 | * (typically, "port" already in use) | 145 | * (typically, "port" already in use) |
149 | */ | 146 | */ |
150 | struct GNUNET_SERVER_Handle *GNUNET_SERVER_create (struct | 147 | struct GNUNET_SERVER_Handle *GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck |
151 | GNUNET_SCHEDULER_Handle | ||
152 | *sched, | ||
153 | GNUNET_CONNECTION_AccessCheck | ||
154 | access, void *access_cls, | 148 | access, void *access_cls, |
155 | struct sockaddr *const*serverAddr, | 149 | struct sockaddr *const*serverAddr, |
156 | const socklen_t *socklen, | 150 | const socklen_t *socklen, |
diff --git a/src/include/gnunet_service_lib.h b/src/include/gnunet_service_lib.h index c17af065f..883ad462f 100644 --- a/src/include/gnunet_service_lib.h +++ b/src/include/gnunet_service_lib.h | |||
@@ -71,12 +71,10 @@ GNUNET_SERVICE_get_server_addresses (const char *serviceName, | |||
71 | * method to run service-specific setup code. | 71 | * method to run service-specific setup code. |
72 | * | 72 | * |
73 | * @param cls closure | 73 | * @param cls closure |
74 | * @param sched scheduler to use | ||
75 | * @param server the initialized server | 74 | * @param server the initialized server |
76 | * @param cfg configuration to use | 75 | * @param cfg configuration to use |
77 | */ | 76 | */ |
78 | typedef void (*GNUNET_SERVICE_Main) (void *cls, | 77 | typedef void (*GNUNET_SERVICE_Main) (void *cls, |
79 | struct GNUNET_SCHEDULER_Handle * sched, | ||
80 | struct GNUNET_SERVER_Handle * server, | 78 | struct GNUNET_SERVER_Handle * server, |
81 | const struct GNUNET_CONFIGURATION_Handle * | 79 | const struct GNUNET_CONFIGURATION_Handle * |
82 | cfg); | 80 | cfg); |
@@ -128,14 +126,10 @@ struct GNUNET_SERVICE_Context; | |||
128 | * initialized system. | 126 | * initialized system. |
129 | * | 127 | * |
130 | * @param serviceName our service name | 128 | * @param serviceName our service name |
131 | * @param sched scheduler to use | ||
132 | * @param cfg configuration to use | 129 | * @param cfg configuration to use |
133 | * @return NULL on error, service handle | 130 | * @return NULL on error, service handle |
134 | */ | 131 | */ |
135 | struct GNUNET_SERVICE_Context *GNUNET_SERVICE_start (const char *serviceName, | 132 | struct GNUNET_SERVICE_Context *GNUNET_SERVICE_start (const char *serviceName, |
136 | struct | ||
137 | GNUNET_SCHEDULER_Handle | ||
138 | *sched, | ||
139 | const struct | 133 | const struct |
140 | GNUNET_CONFIGURATION_Handle | 134 | GNUNET_CONFIGURATION_Handle |
141 | *cfg); | 135 | *cfg); |
diff --git a/src/include/gnunet_statistics_service.h b/src/include/gnunet_statistics_service.h index 71c834f2a..e22fe16d4 100644 --- a/src/include/gnunet_statistics_service.h +++ b/src/include/gnunet_statistics_service.h | |||
@@ -70,14 +70,12 @@ typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, | |||
70 | /** | 70 | /** |
71 | * Get handle for the statistics service. | 71 | * Get handle for the statistics service. |
72 | * | 72 | * |
73 | * @param sched scheduler to use | ||
74 | * @param subsystem name of subsystem using the service | 73 | * @param subsystem name of subsystem using the service |
75 | * @param cfg services configuration in use | 74 | * @param cfg services configuration in use |
76 | * @return handle to use | 75 | * @return handle to use |
77 | */ | 76 | */ |
78 | struct GNUNET_STATISTICS_Handle | 77 | struct GNUNET_STATISTICS_Handle |
79 | *GNUNET_STATISTICS_create (struct GNUNET_SCHEDULER_Handle *sched, | 78 | *GNUNET_STATISTICS_create (const char *subsystem, |
80 | const char *subsystem, | ||
81 | const struct GNUNET_CONFIGURATION_Handle *cfg); | 79 | const struct GNUNET_CONFIGURATION_Handle *cfg); |
82 | 80 | ||
83 | 81 | ||
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h index a00e59976..97bc36a79 100644 --- a/src/include/gnunet_testing_lib.h +++ b/src/include/gnunet_testing_lib.h | |||
@@ -205,11 +205,6 @@ typedef void (*GNUNET_TESTING_NotifyConnections)(void *cls, | |||
205 | struct GNUNET_TESTING_Daemon | 205 | struct GNUNET_TESTING_Daemon |
206 | { | 206 | { |
207 | /** | 207 | /** |
208 | * Our scheduler. | ||
209 | */ | ||
210 | struct GNUNET_SCHEDULER_Handle *sched; | ||
211 | |||
212 | /** | ||
213 | * Our configuration. | 208 | * Our configuration. |
214 | */ | 209 | */ |
215 | struct GNUNET_CONFIGURATION_Handle *cfg; | 210 | struct GNUNET_CONFIGURATION_Handle *cfg; |
@@ -410,7 +405,6 @@ typedef void (*GNUNET_TESTING_NotifyTopology)(void *cls, | |||
410 | * reachable via "ssh" (unless the hostname is "NULL") without the | 405 | * reachable via "ssh" (unless the hostname is "NULL") without the |
411 | * need to enter a password. | 406 | * need to enter a password. |
412 | * | 407 | * |
413 | * @param sched scheduler to use | ||
414 | * @param cfg configuration to use | 408 | * @param cfg configuration to use |
415 | * @param timeout how long to wait starting up peers | 409 | * @param timeout how long to wait starting up peers |
416 | * @param hostname name of the machine where to run GNUnet | 410 | * @param hostname name of the machine where to run GNUnet |
@@ -426,8 +420,7 @@ typedef void (*GNUNET_TESTING_NotifyTopology)(void *cls, | |||
426 | * @return handle to the daemon (actual start will be completed asynchronously) | 420 | * @return handle to the daemon (actual start will be completed asynchronously) |
427 | */ | 421 | */ |
428 | struct GNUNET_TESTING_Daemon * | 422 | struct GNUNET_TESTING_Daemon * |
429 | GNUNET_TESTING_daemon_start (struct GNUNET_SCHEDULER_Handle *sched, | 423 | GNUNET_TESTING_daemon_start (const struct GNUNET_CONFIGURATION_Handle *cfg, |
430 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
431 | struct GNUNET_TIME_Relative timeout, | 424 | struct GNUNET_TIME_Relative timeout, |
432 | const char *hostname, | 425 | const char *hostname, |
433 | const char *ssh_username, | 426 | const char *ssh_username, |
@@ -569,7 +562,6 @@ void GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1, | |||
569 | * adjusted to ensure that no two peers running on the same system | 562 | * adjusted to ensure that no two peers running on the same system |
570 | * have the same port(s) in their respective configurations. | 563 | * have the same port(s) in their respective configurations. |
571 | * | 564 | * |
572 | * @param sched scheduler to use | ||
573 | * @param cfg configuration template to use | 565 | * @param cfg configuration template to use |
574 | * @param total number of daemons to start | 566 | * @param total number of daemons to start |
575 | * @param timeout total time allowed for peers to start | 567 | * @param timeout total time allowed for peers to start |
@@ -587,8 +579,7 @@ void GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1, | |||
587 | * @return NULL on error, otherwise handle to control peer group | 579 | * @return NULL on error, otherwise handle to control peer group |
588 | */ | 580 | */ |
589 | struct GNUNET_TESTING_PeerGroup * | 581 | struct GNUNET_TESTING_PeerGroup * |
590 | GNUNET_TESTING_daemons_start (struct GNUNET_SCHEDULER_Handle *sched, | 582 | GNUNET_TESTING_daemons_start (const struct GNUNET_CONFIGURATION_Handle *cfg, |
591 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
592 | unsigned int total, | 583 | unsigned int total, |
593 | struct GNUNET_TIME_Relative timeout, | 584 | struct GNUNET_TIME_Relative timeout, |
594 | GNUNET_TESTING_NotifyHostkeyCreated hostkey_callback, | 585 | GNUNET_TESTING_NotifyHostkeyCreated hostkey_callback, |
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index 2ee9fb718..eddd8f8af 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h | |||
@@ -118,7 +118,6 @@ typedef void | |||
118 | * Connect to the transport service. Note that the connection may | 118 | * Connect to the transport service. Note that the connection may |
119 | * complete (or fail) asynchronously. | 119 | * complete (or fail) asynchronously. |
120 | * | 120 | * |
121 | * @param sched scheduler to use | ||
122 | * @param cfg configuration to use | 121 | * @param cfg configuration to use |
123 | * @param self our own identity (API should check that it matches | 122 | * @param self our own identity (API should check that it matches |
124 | * the identity found by transport), or NULL (no check) | 123 | * the identity found by transport), or NULL (no check) |
@@ -128,10 +127,7 @@ typedef void | |||
128 | * @param nd function to call on disconnect events | 127 | * @param nd function to call on disconnect events |
129 | * @return NULL on error | 128 | * @return NULL on error |
130 | */ | 129 | */ |
131 | struct GNUNET_TRANSPORT_Handle *GNUNET_TRANSPORT_connect (struct | 130 | struct GNUNET_TRANSPORT_Handle *GNUNET_TRANSPORT_connect (const struct |
132 | GNUNET_SCHEDULER_Handle | ||
133 | *sched, | ||
134 | const struct | ||
135 | GNUNET_CONFIGURATION_Handle | 131 | GNUNET_CONFIGURATION_Handle |
136 | *cfg, | 132 | *cfg, |
137 | const struct GNUNET_PeerIdentity *self, | 133 | const struct GNUNET_PeerIdentity *self, |
@@ -278,7 +274,6 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, | |||
278 | /** | 274 | /** |
279 | * Convert a binary address into a human readable address. | 275 | * Convert a binary address into a human readable address. |
280 | * | 276 | * |
281 | * @param sched scheduler to use | ||
282 | * @param cfg configuration to use | 277 | * @param cfg configuration to use |
283 | * @param address address to convert (binary format) | 278 | * @param address address to convert (binary format) |
284 | * @param addressLen number of bytes in address | 279 | * @param addressLen number of bytes in address |
@@ -290,8 +285,7 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, | |||
290 | * @param aluc_cls closure for aluc | 285 | * @param aluc_cls closure for aluc |
291 | */ | 286 | */ |
292 | void | 287 | void |
293 | GNUNET_TRANSPORT_address_lookup (struct GNUNET_SCHEDULER_Handle *sched, | 288 | GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg, |
294 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
295 | const char * address, | 289 | const char * address, |
296 | size_t addressLen, | 290 | size_t addressLen, |
297 | int numeric, | 291 | int numeric, |
@@ -328,15 +322,13 @@ typedef int (*GNUNET_TRANSPORT_BlacklistCallback)(void *cls, | |||
328 | * only way to re-enable connections from peers that were previously | 322 | * only way to re-enable connections from peers that were previously |
329 | * blacklisted. | 323 | * blacklisted. |
330 | * | 324 | * |
331 | * @param sched scheduler to use | ||
332 | * @param cfg configuration to use | 325 | * @param cfg configuration to use |
333 | * @param cb callback to invoke to check if connections are allowed | 326 | * @param cb callback to invoke to check if connections are allowed |
334 | * @param cb_cls closure for cb | 327 | * @param cb_cls closure for cb |
335 | * @return NULL on error, otherwise handle for cancellation | 328 | * @return NULL on error, otherwise handle for cancellation |
336 | */ | 329 | */ |
337 | struct GNUNET_TRANSPORT_Blacklist * | 330 | struct GNUNET_TRANSPORT_Blacklist * |
338 | GNUNET_TRANSPORT_blacklist (struct GNUNET_SCHEDULER_Handle *sched, | 331 | GNUNET_TRANSPORT_blacklist (const struct GNUNET_CONFIGURATION_Handle *cfg, |
339 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
340 | GNUNET_TRANSPORT_BlacklistCallback cb, | 332 | GNUNET_TRANSPORT_BlacklistCallback cb, |
341 | void *cb_cls); | 333 | void *cb_cls); |
342 | 334 | ||
diff --git a/src/include/gnunet_upnp_service.h b/src/include/gnunet_upnp_service.h index b57f76697..7e6ea5180 100644 --- a/src/include/gnunet_upnp_service.h +++ b/src/include/gnunet_upnp_service.h | |||
@@ -43,7 +43,6 @@ extern "C" | |||
43 | * install a port mapping if possible. The external port | 43 | * install a port mapping if possible. The external port |
44 | * will be returned as part of the address. | 44 | * will be returned as part of the address. |
45 | * | 45 | * |
46 | * @param sched scheduler to use | ||
47 | * @param cfg configuration to use | 46 | * @param cfg configuration to use |
48 | * @param domain communication domain (i.e. PF_INET or PF_INET6) | 47 | * @param domain communication domain (i.e. PF_INET or PF_INET6) |
49 | * @param type communication semantics (SOCK_STREAM, SOCK_DGRAM) | 48 | * @param type communication semantics (SOCK_STREAM, SOCK_DGRAM) |
@@ -55,8 +54,7 @@ extern "C" | |||
55 | * function will be called with NULL on error | 54 | * function will be called with NULL on error |
56 | * @param cls closure for callback | 55 | * @param cls closure for callback |
57 | */ | 56 | */ |
58 | int GNUNET_UPNP_get_ip (struct GNUNET_SCHEDULER_Handle *sched, | 57 | int GNUNET_UPNP_get_ip (struct GNUNET_CONFIGURATION_Handle *cfg, |
59 | struct GNUNET_CONFIGURATION_Handle *cfg, | ||
60 | int domain, | 58 | int domain, |
61 | int type, | 59 | int type, |
62 | int protocol, | 60 | int protocol, |