diff options
author | Gabor X Toth <*@tg-x.net> | 2013-09-25 17:45:55 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-09-25 17:45:55 +0000 |
commit | 38f919aee243423fdc49828687c5735ab77b9128 (patch) | |
tree | 05ad74ccb4702d5423da4078d1825598f4526001 /src/psyc | |
parent | 77f81b949fe89c8a316f49fc5fa75cd51c513468 (diff) | |
download | gnunet-38f919aee243423fdc49828687c5735ab77b9128.tar.gz gnunet-38f919aee243423fdc49828687c5735ab77b9128.zip |
psyc service skeleton
Diffstat (limited to 'src/psyc')
-rw-r--r-- | src/psyc/psyc_api.c | 135 |
1 files changed, 108 insertions, 27 deletions
diff --git a/src/psyc/psyc_api.c b/src/psyc/psyc_api.c index 8d07f5f79..e298fae71 100644 --- a/src/psyc/psyc_api.c +++ b/src/psyc/psyc_api.c | |||
@@ -42,46 +42,70 @@ | |||
42 | * Used to match calls to #GNUNET_PSYC_JoinCallback to the | 42 | * Used to match calls to #GNUNET_PSYC_JoinCallback to the |
43 | * corresponding calls to GNUNET_PSYC_join_decision(). | 43 | * corresponding calls to GNUNET_PSYC_join_decision(). |
44 | */ | 44 | */ |
45 | struct GNUNET_PSYC_JoinHandle; | 45 | struct GNUNET_PSYC_JoinHandle |
46 | { | ||
47 | |||
48 | }; | ||
46 | 49 | ||
47 | 50 | ||
48 | /** | 51 | /** |
49 | * Handle for the master of a PSYC channel. | 52 | * Handle for the master of a PSYC channel. |
50 | */ | 53 | */ |
51 | struct GNUNET_PSYC_Master; | 54 | struct GNUNET_PSYC_Master |
55 | { | ||
56 | |||
57 | }; | ||
52 | 58 | ||
53 | 59 | ||
54 | /** | 60 | /** |
55 | * Handle for a pending PSYC transmission operation. | 61 | * Handle for a pending PSYC transmission operation. |
56 | */ | 62 | */ |
57 | struct GNUNET_PSYC_MasterTransmitHandle; | 63 | struct GNUNET_PSYC_MasterTransmitHandle |
64 | { | ||
65 | |||
66 | }; | ||
58 | 67 | ||
59 | 68 | ||
60 | /** | 69 | /** |
61 | * Handle for a PSYC channel slave. | 70 | * Handle for a PSYC channel slave. |
62 | */ | 71 | */ |
63 | struct GNUNET_PSYC_Slave; | 72 | struct GNUNET_PSYC_Slave |
73 | { | ||
74 | |||
75 | }; | ||
64 | 76 | ||
65 | 77 | ||
66 | /** | 78 | /** |
67 | * Handle for a pending PSYC transmission operation. | 79 | * Handle for a pending PSYC transmission operation. |
68 | */ | 80 | */ |
69 | struct GNUNET_PSYC_SlaveTransmitHandle; | 81 | struct GNUNET_PSYC_SlaveTransmitHandle |
82 | { | ||
83 | |||
84 | }; | ||
70 | 85 | ||
71 | 86 | ||
72 | /** | 87 | /** |
73 | * Handle to access PSYC channel operations for both the master and slaves. | 88 | * Handle to access PSYC channel operations for both the master and slaves. |
74 | */ | 89 | */ |
75 | struct GNUNET_PSYC_Channel; | 90 | struct GNUNET_PSYC_Channel |
91 | { | ||
92 | |||
93 | }; | ||
76 | 94 | ||
77 | 95 | ||
78 | /** | 96 | /** |
79 | * Handle to a story telling operation. | 97 | * Handle to a story telling operation. |
80 | */ | 98 | */ |
81 | struct GNUNET_PSYC_Story; | 99 | struct GNUNET_PSYC_Story |
100 | { | ||
101 | |||
102 | }; | ||
82 | 103 | ||
83 | 104 | ||
84 | struct GNUNET_PSYC_StateQuery; | 105 | struct GNUNET_PSYC_StateQuery |
106 | { | ||
107 | |||
108 | }; | ||
85 | 109 | ||
86 | 110 | ||
87 | /** | 111 | /** |
@@ -114,7 +138,10 @@ GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh, | |||
114 | const char *method_name, | 138 | const char *method_name, |
115 | const struct GNUNET_ENV_Environment *env, | 139 | const struct GNUNET_ENV_Environment *env, |
116 | const void *data, | 140 | const void *data, |
117 | size_t data_size); | 141 | size_t data_size) |
142 | { | ||
143 | |||
144 | } | ||
118 | 145 | ||
119 | 146 | ||
120 | /** | 147 | /** |
@@ -150,7 +177,10 @@ GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
150 | enum GNUNET_PSYC_Policy policy, | 177 | enum GNUNET_PSYC_Policy policy, |
151 | GNUNET_PSYC_Method method, | 178 | GNUNET_PSYC_Method method, |
152 | GNUNET_PSYC_JoinCallback join_cb, | 179 | GNUNET_PSYC_JoinCallback join_cb, |
153 | void *cls); | 180 | void *cls) |
181 | { | ||
182 | return NULL; | ||
183 | } | ||
154 | 184 | ||
155 | 185 | ||
156 | /** | 186 | /** |
@@ -171,7 +201,10 @@ GNUNET_PSYC_master_transmit (struct GNUNET_PSYC_Master *master, | |||
171 | const struct GNUNET_ENV_Environment *env, | 201 | const struct GNUNET_ENV_Environment *env, |
172 | GNUNET_PSYC_MasterTransmitNotify notify, | 202 | GNUNET_PSYC_MasterTransmitNotify notify, |
173 | void *notify_cls, | 203 | void *notify_cls, |
174 | enum GNUNET_PSYC_MasterTransmitFlags flags); | 204 | enum GNUNET_PSYC_MasterTransmitFlags flags) |
205 | { | ||
206 | return NULL; | ||
207 | } | ||
175 | 208 | ||
176 | 209 | ||
177 | /** | 210 | /** |
@@ -180,7 +213,10 @@ GNUNET_PSYC_master_transmit (struct GNUNET_PSYC_Master *master, | |||
180 | * @param th Handle of the request that is being aborted. | 213 | * @param th Handle of the request that is being aborted. |
181 | */ | 214 | */ |
182 | void | 215 | void |
183 | GNUNET_PSYC_master_transmit_cancel (struct GNUNET_PSYC_MasterTransmitHandle *th); | 216 | GNUNET_PSYC_master_transmit_cancel (struct GNUNET_PSYC_MasterTransmitHandle *th) |
217 | { | ||
218 | |||
219 | } | ||
184 | 220 | ||
185 | 221 | ||
186 | /** | 222 | /** |
@@ -189,7 +225,10 @@ GNUNET_PSYC_master_transmit_cancel (struct GNUNET_PSYC_MasterTransmitHandle *th) | |||
189 | * @param master PSYC channel master to stop. | 225 | * @param master PSYC channel master to stop. |
190 | */ | 226 | */ |
191 | void | 227 | void |
192 | GNUNET_PSYC_master_stop (struct GNUNET_PSYC_Master *master); | 228 | GNUNET_PSYC_master_stop (struct GNUNET_PSYC_Master *master) |
229 | { | ||
230 | |||
231 | } | ||
193 | 232 | ||
194 | 233 | ||
195 | /** | 234 | /** |
@@ -234,7 +273,10 @@ GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
234 | const char *method_name, | 273 | const char *method_name, |
235 | const struct GNUNET_ENV_Environment *env, | 274 | const struct GNUNET_ENV_Environment *env, |
236 | const void *data, | 275 | const void *data, |
237 | size_t data_size); | 276 | size_t data_size) |
277 | { | ||
278 | return NULL; | ||
279 | } | ||
238 | 280 | ||
239 | 281 | ||
240 | /** | 282 | /** |
@@ -246,7 +288,10 @@ GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
246 | * @param slave Slave handle. | 288 | * @param slave Slave handle. |
247 | */ | 289 | */ |
248 | void | 290 | void |
249 | GNUNET_PSYC_slave_part (struct GNUNET_PSYC_Slave *slave); | 291 | GNUNET_PSYC_slave_part (struct GNUNET_PSYC_Slave *slave) |
292 | { | ||
293 | |||
294 | } | ||
250 | 295 | ||
251 | 296 | ||
252 | /** | 297 | /** |
@@ -266,7 +311,10 @@ GNUNET_PSYC_slave_transmit (struct GNUNET_PSYC_Slave *slave, | |||
266 | const struct GNUNET_ENV_Environment *env, | 311 | const struct GNUNET_ENV_Environment *env, |
267 | GNUNET_PSYC_SlaveTransmitNotify notify, | 312 | GNUNET_PSYC_SlaveTransmitNotify notify, |
268 | void *notify_cls, | 313 | void *notify_cls, |
269 | enum GNUNET_PSYC_SlaveTransmitFlags flags); | 314 | enum GNUNET_PSYC_SlaveTransmitFlags flags) |
315 | { | ||
316 | return NULL; | ||
317 | } | ||
270 | 318 | ||
271 | 319 | ||
272 | /** | 320 | /** |
@@ -275,7 +323,10 @@ GNUNET_PSYC_slave_transmit (struct GNUNET_PSYC_Slave *slave, | |||
275 | * @param th Handle of the request that is being aborted. | 323 | * @param th Handle of the request that is being aborted. |
276 | */ | 324 | */ |
277 | void | 325 | void |
278 | GNUNET_PSYC_slave_transmit_cancel (struct GNUNET_PSYC_SlaveTransmitHandle *th); | 326 | GNUNET_PSYC_slave_transmit_cancel (struct GNUNET_PSYC_SlaveTransmitHandle *th) |
327 | { | ||
328 | |||
329 | } | ||
279 | 330 | ||
280 | 331 | ||
281 | /** | 332 | /** |
@@ -285,7 +336,10 @@ GNUNET_PSYC_slave_transmit_cancel (struct GNUNET_PSYC_SlaveTransmitHandle *th); | |||
285 | * @return Channel handle, valid for as long as @a master is valid. | 336 | * @return Channel handle, valid for as long as @a master is valid. |
286 | */ | 337 | */ |
287 | struct GNUNET_PSYC_Channel * | 338 | struct GNUNET_PSYC_Channel * |
288 | GNUNET_PSYC_master_get_channel (struct GNUNET_PSYC_Master *master); | 339 | GNUNET_PSYC_master_get_channel (struct GNUNET_PSYC_Master *master) |
340 | { | ||
341 | return NULL; | ||
342 | } | ||
289 | 343 | ||
290 | 344 | ||
291 | /** | 345 | /** |
@@ -295,7 +349,10 @@ GNUNET_PSYC_master_get_channel (struct GNUNET_PSYC_Master *master); | |||
295 | * @return Channel handle, valid for as long as @a slave is valid. | 349 | * @return Channel handle, valid for as long as @a slave is valid. |
296 | */ | 350 | */ |
297 | struct GNUNET_PSYC_Channel * | 351 | struct GNUNET_PSYC_Channel * |
298 | GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slave); | 352 | GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slave) |
353 | { | ||
354 | return NULL; | ||
355 | } | ||
299 | 356 | ||
300 | 357 | ||
301 | /** | 358 | /** |
@@ -323,7 +380,10 @@ void | |||
323 | GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel, | 380 | GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel, |
324 | const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, | 381 | const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, |
325 | uint64_t announced_at, | 382 | uint64_t announced_at, |
326 | uint64_t effective_since); | 383 | uint64_t effective_since) |
384 | { | ||
385 | |||
386 | } | ||
327 | 387 | ||
328 | 388 | ||
329 | /** | 389 | /** |
@@ -350,7 +410,10 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel, | |||
350 | void | 410 | void |
351 | GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel, | 411 | GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel, |
352 | const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, | 412 | const struct GNUNET_CRYPTO_EccPublicSignKey *slave_key, |
353 | uint64_t announced_at); | 413 | uint64_t announced_at) |
414 | { | ||
415 | |||
416 | } | ||
354 | 417 | ||
355 | 418 | ||
356 | /** | 419 | /** |
@@ -368,7 +431,10 @@ GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel, | |||
368 | * @param finish_cb Function to call when the requested story has been fully | 431 | * @param finish_cb Function to call when the requested story has been fully |
369 | * told (counting message IDs might not suffice, as some messages | 432 | * told (counting message IDs might not suffice, as some messages |
370 | * might be secret and thus the listener would not know the story is | 433 | * might be secret and thus the listener would not know the story is |
371 | * finished without being told explicitly); once this function | 434 | * finished without being told explicitly) |
435 | { | ||
436 | return NULL; | ||
437 | } once this function | ||
372 | * has been called, the client must not call | 438 | * has been called, the client must not call |
373 | * GNUNET_PSYC_channel_story_tell_cancel() anymore. | 439 | * GNUNET_PSYC_channel_story_tell_cancel() anymore. |
374 | * @param cls Closure for the callbacks. | 440 | * @param cls Closure for the callbacks. |
@@ -380,7 +446,10 @@ GNUNET_PSYC_channel_story_tell (struct GNUNET_PSYC_Channel *channel, | |||
380 | uint64_t end_message_id, | 446 | uint64_t end_message_id, |
381 | GNUNET_PSYC_Method method, | 447 | GNUNET_PSYC_Method method, |
382 | GNUNET_PSYC_FinishCallback *finish_cb, | 448 | GNUNET_PSYC_FinishCallback *finish_cb, |
383 | void *cls); | 449 | void *cls) |
450 | { | ||
451 | return NULL; | ||
452 | } | ||
384 | 453 | ||
385 | 454 | ||
386 | /** | 455 | /** |
@@ -392,7 +461,10 @@ GNUNET_PSYC_channel_story_tell (struct GNUNET_PSYC_Channel *channel, | |||
392 | * @param story Story telling operation to stop. | 461 | * @param story Story telling operation to stop. |
393 | */ | 462 | */ |
394 | void | 463 | void |
395 | GNUNET_PSYC_channel_story_tell_cancel (struct GNUNET_PSYC_Story *story); | 464 | GNUNET_PSYC_channel_story_tell_cancel (struct GNUNET_PSYC_Story *story) |
465 | { | ||
466 | |||
467 | } | ||
396 | 468 | ||
397 | 469 | ||
398 | /** | 470 | /** |
@@ -414,7 +486,10 @@ struct GNUNET_PSYC_StateQuery * | |||
414 | GNUNET_PSYC_channel_state_get (struct GNUNET_PSYC_Channel *channel, | 486 | GNUNET_PSYC_channel_state_get (struct GNUNET_PSYC_Channel *channel, |
415 | const char *full_name, | 487 | const char *full_name, |
416 | GNUNET_PSYC_StateCallback cb, | 488 | GNUNET_PSYC_StateCallback cb, |
417 | void *cb_cls); | 489 | void *cb_cls) |
490 | { | ||
491 | return NULL; | ||
492 | } | ||
418 | 493 | ||
419 | 494 | ||
420 | /** | 495 | /** |
@@ -437,7 +512,10 @@ struct GNUNET_PSYC_StateQuery * | |||
437 | GNUNET_PSYC_channel_state_get_prefix (struct GNUNET_PSYC_Channel *channel, | 512 | GNUNET_PSYC_channel_state_get_prefix (struct GNUNET_PSYC_Channel *channel, |
438 | const char *name_prefix, | 513 | const char *name_prefix, |
439 | GNUNET_PSYC_StateCallback cb, | 514 | GNUNET_PSYC_StateCallback cb, |
440 | void *cb_cls); | 515 | void *cb_cls) |
516 | { | ||
517 | return NULL; | ||
518 | } | ||
441 | 519 | ||
442 | 520 | ||
443 | /** | 521 | /** |
@@ -446,7 +524,10 @@ GNUNET_PSYC_channel_state_get_prefix (struct GNUNET_PSYC_Channel *channel, | |||
446 | * @param query Handle for the operation to cancel. | 524 | * @param query Handle for the operation to cancel. |
447 | */ | 525 | */ |
448 | void | 526 | void |
449 | GNUNET_PSYC_channel_state_get_cancel (struct GNUNET_PSYC_StateQuery *query); | 527 | GNUNET_PSYC_channel_state_get_cancel (struct GNUNET_PSYC_StateQuery *query) |
528 | { | ||
529 | |||
530 | } | ||
450 | 531 | ||
451 | 532 | ||
452 | /* end of psyc_api.c */ | 533 | /* end of psyc_api.c */ |