aboutsummaryrefslogtreecommitdiff
path: root/src/psyc
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2013-09-25 17:45:55 +0000
committerGabor X Toth <*@tg-x.net>2013-09-25 17:45:55 +0000
commit38f919aee243423fdc49828687c5735ab77b9128 (patch)
tree05ad74ccb4702d5423da4078d1825598f4526001 /src/psyc
parent77f81b949fe89c8a316f49fc5fa75cd51c513468 (diff)
downloadgnunet-38f919aee243423fdc49828687c5735ab77b9128.tar.gz
gnunet-38f919aee243423fdc49828687c5735ab77b9128.zip
psyc service skeleton
Diffstat (limited to 'src/psyc')
-rw-r--r--src/psyc/psyc_api.c135
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 */
45struct GNUNET_PSYC_JoinHandle; 45struct 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 */
51struct GNUNET_PSYC_Master; 54struct 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 */
57struct GNUNET_PSYC_MasterTransmitHandle; 63struct 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 */
63struct GNUNET_PSYC_Slave; 72struct 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 */
69struct GNUNET_PSYC_SlaveTransmitHandle; 81struct 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 */
75struct GNUNET_PSYC_Channel; 90struct 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 */
81struct GNUNET_PSYC_Story; 99struct GNUNET_PSYC_Story
100{
101
102};
82 103
83 104
84struct GNUNET_PSYC_StateQuery; 105struct 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 */
182void 215void
183GNUNET_PSYC_master_transmit_cancel (struct GNUNET_PSYC_MasterTransmitHandle *th); 216GNUNET_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 */
191void 227void
192GNUNET_PSYC_master_stop (struct GNUNET_PSYC_Master *master); 228GNUNET_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 */
248void 290void
249GNUNET_PSYC_slave_part (struct GNUNET_PSYC_Slave *slave); 291GNUNET_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 */
277void 325void
278GNUNET_PSYC_slave_transmit_cancel (struct GNUNET_PSYC_SlaveTransmitHandle *th); 326GNUNET_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 */
287struct GNUNET_PSYC_Channel * 338struct GNUNET_PSYC_Channel *
288GNUNET_PSYC_master_get_channel (struct GNUNET_PSYC_Master *master); 339GNUNET_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 */
297struct GNUNET_PSYC_Channel * 351struct GNUNET_PSYC_Channel *
298GNUNET_PSYC_slave_get_channel (struct GNUNET_PSYC_Slave *slave); 352GNUNET_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
323GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel, 380GNUNET_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,
350void 410void
351GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel, 411GNUNET_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 */
394void 463void
395GNUNET_PSYC_channel_story_tell_cancel (struct GNUNET_PSYC_Story *story); 464GNUNET_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 *
414GNUNET_PSYC_channel_state_get (struct GNUNET_PSYC_Channel *channel, 486GNUNET_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 *
437GNUNET_PSYC_channel_state_get_prefix (struct GNUNET_PSYC_Channel *channel, 512GNUNET_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 */
448void 526void
449GNUNET_PSYC_channel_state_get_cancel (struct GNUNET_PSYC_StateQuery *query); 527GNUNET_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 */