0f41c3b12f04b0e9809b63b30f08eb3ca0a6317b
[oweals/gnunet.git] / src / include / gnunet_psyc_service.h
1 /*
2      This file is part of GNUnet.
3      (C) 2012, 2013 Christian Grothoff (and other contributing authors)
4
5      GNUnet is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published
7      by the Free Software Foundation; either version 3, or (at your
8      option) any later version.
9
10      GNUnet is distributed in the hope that it will be useful, but
11      WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13      General Public License for more details.
14
15      You should have received a copy of the GNU General Public License
16      along with GNUnet; see the file COPYING.  If not, write to the
17      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18      Boston, MA 02111-1307, USA.
19 */
20
21 /** 
22  * @file include/gnunet_psyc_service.h
23  * @brief PSYC service; high-level access to the PSYC protocol
24  *        note that clients of this API are NOT expected to
25  *        understand the PSYC message format, only the semantics!
26  *        Parsing (and serializing) the PSYC stream format is done
27  *        within the implementation of the libgnunetpsyc library,
28  *        and this API deliberately exposes as little as possible
29  *        of the actual data stream format to the application!
30  * @author Christian Grothoff
31  * @author Gabor X Toth
32  *
33  * NOTE:
34  * - this API does not know about psyc's "root" and "places";
35  *   there is no 'root' in GNUnet-Psyc as we're decentralized;
36  *   'places' and 'persons' are combined within the same 
37  *   abstraction, that of a "channel".  Channels are identified
38  *   and accessed in this API using a public/private key.  
39  *   Higher-level applications should use NAMES within GADS
40  *   to obtain public keys, and the distinction between 
41  *   'places' and 'persons' can then be made with the help
42  *   of the naming system (and/or conventions).
43  *   Channels are (as in PSYC) organized into a hierarchy; each
44  *   channel owner (the one with the private key) is then
45  *   the operator of the multicast group (its Origin in 
46  *   the terminology of the multicast API).
47  * - The API supports passing large amounts of data using
48  *   'streaming' for the argument passed to a method.  State
49  *   and variables must fit into memory and cannot be streamed
50  *   (thus, no passing of 4 GB of data in a variable; 
51  *   once we implement this, we might want to create a
52  *   @c \#define for the maximum size of a variable).
53  * - PSYC defines standard variables, methods, etc.  This
54  *   library deliberately abstracts over all of these; a
55  *   higher-level API should combine the naming system (GADS)
56  *   and standard methods (message, join, part, warn,
57  *   fail, error) and variables (action, color, time,
58  *   tag, etc.).  However, this API does take over the
59  *   routing variables, specifically 'context' (channel),
60  *   and 'source'.  We only kind-of support 'target', as
61  *   the target is either everyone in the group or the
62  *   origin, and never just a single member of the group;
63  *   for such individual messages, an application needs to
64  *   construct an 'inbox' channel where the owner (only)
65  *   receives messages (but never forwards; private responses
66  *   would be transmitted by joining the senders 'inbox'
67  *   channel -- or a inbox#bob subchannel).  The
68  *   goal for all of this is to keep the abstractions in this 
69  *   API minimal: interaction with multicast, try \& slice,
70  *   state/variable/channel management.  Higher-level
71  *   operations belong elsewhere (so maybe this API should
72  *   be called 'PSYC-low', whereas a higher-level API
73  *   implementing defaults for standard methods and
74  *   variables might be called 'PSYC-std' or 'PSYC-high'.
75  *
76  * Idee (lynx): 
77  * - rename "channel" to "master"
78  * - rename "member" to "slave"
79  * - rename "group" to "channel"
80  */
81
82 #ifndef GNUNET_PSYC_SERVICE_H
83 #define GNUNET_PSYC_SERVICE_H
84
85 #ifdef __cplusplus
86 extern "C"
87 {
88 #if 0                           /* keep Emacsens' auto-indent happy */
89 }
90 #endif
91 #endif
92
93 #include "gnunet_util_lib.h"
94 #include "gnunet_psyc_lib.h"
95 #include "gnunet_multicast_service.h"
96
97
98 /** 
99  * Version number of GNUnet-PSYC API.
100  */
101 #define GNUNET_PSYC_VERSION 0x00000000
102
103
104 enum GNUNET_PSYC_MessageFlags
105 {
106   /**
107    * First fragment of a message.
108    */
109   GNUNET_PSYC_MESSAGE_FIRST_FRAGMENT = GNUNET_MULTICAST_MESSAGE_FIRST_FRAGMENT,
110
111   /**
112    * Last fragment of a message.
113    */
114   GNUNET_PSYC_MESSAGE_LAST_FRAGMENT = GNUNET_MULTICAST_MESSAGE_LAST_FRAGMENT,
115
116   /** 
117    * OR'ed flags if message is not fragmented.
118    */
119   GNUNET_PSYC_MESSAGE_NOT_FRAGMENTED = GNUNET_MULTICAST_MESSAGE_NOT_FRAGMENTED
120 };
121
122
123 /** 
124  * Handle that identifies a join request.
125  *
126  * Used to match calls to #GNUNET_PSYC_JoinCallback to the
127  * corresponding calls to GNUNET_PSYC_join_decision().
128  */
129 struct GNUNET_PSYC_JoinHandle;
130
131 /** 
132  * Handle that identifies a part request.
133  *
134  * Used to match calls to #GNUNET_PSYC_PartCallback to the
135  * corresponding calls to GNUNET_PSYC_part_ack().
136  */
137 struct GNUNET_PSYC_PartHandle;
138
139
140 /** 
141  * Method called from PSYC upon receiving a message indicating a call
142  * to a @e method.  
143  *
144  * @param cls Closure.
145  * @param sender Who transmitted the message (origin, except for messages
146  *        from one of the members to the origin).
147  * @param message_id Unique message counter for this message;
148  *                   (unique only in combination with the given sender for
149  *                    this channel).
150  * @param method_name Original method name from PSYC (may be more
151  *        specific than the registered method name due to try-and-slice matching).
152  *        FIXME: no try-and-slice for methods defined here.
153  * @param header_length Number of modifiers in header.
154  * @param header Modifiers present in the message. FIXME: use environment instead?
155  * @param data_offset Byte offset of @a data in the overall data of the method.
156  * @param data_size Number of bytes in @a data.
157  * @param data Data stream given to the method (might not be zero-terminated 
158  *             if data is binary).
159  * @param frag Fragmentation status for the data.
160  */
161 typedef int (*GNUNET_PSYC_Method)(void *cls,
162                                   const struct GNUNET_PeerIdentity *sender,
163                                   uint64_t message_id,
164                                   const char *method_name,
165                                   size_t header_length,
166                                   GNUNET_PSYC_Modifier *header,
167                                   uint64_t data_offset,
168                                   size_t data_size,
169                                   const void *data,
170                                   enum GNUNET_PSYC_MessageFlags flags);
171
172
173 /** 
174  * Method called from PSYC upon receiving a join request.
175  *
176  * @param cls Closure.
177  * @param peer Peer requesting to join.
178  * @param method_name Method name in the join request.
179  * @param header_length Number of modifiers in header.
180  * @param header Modifiers present in the message.
181  * @param data_size Number of bytes in @a data.
182  * @param data Data stream given to the method (might not be zero-terminated 
183  *             if data is binary).
184  */
185 typedef int (*GNUNET_PSYC_JoinCallback)(void *cls,
186                                         const struct GNUNET_PeerIdentity *peer,
187                                         const char *method_name,
188                                         size_t header_length,
189                                         GNUNET_PSYC_Modifier *header,
190                                         size_t data_size,
191                                         const void *data,
192                                         struct GNUNET_PSYC_JoinHandle *jh);
193
194
195 /** 
196  * Method called from PSYC upon receiving a part request.
197  *
198  * @param cls Closure.
199  * @param peer Peer requesting to leave.
200  * @param method_name Method name in the part request.
201  * @param header_length Number of modifiers in header.
202  * @param header Modifiers present in the message.
203  * @param data_size Number of bytes in @a data.
204  * @param data Data stream given to the method (might not be zero-terminated 
205  *             if data is binary).
206  */
207 typedef int (*GNUNET_PSYC_PartCallback)(void *cls,
208                                         const struct GNUNET_PeerIdentity *peer,
209                                         const char *method_name,
210                                         size_t header_length,
211                                         GNUNET_PSYC_Modifier *header,
212                                         size_t data_size,
213                                         const void *data,
214                                         struct GNUNET_PSYC_PartHandle *ph);
215
216
217 /** 
218  * Function to call with the decision made for a join request.
219  *
220  * Must be called once and only once in response to an invocation of the
221  * #GNUNET_PSYC_JoinCallback.
222  *
223  * @param jh Join request handle.
224  * @param is_admitted #GNUNET_YES if joining is approved,
225  *        #GNUNET_NO if it is disapproved
226  * @param method_name Method name for the message transmitted with the response.
227  * @param env Environment: transient variables for the message.
228  * @param data_size Size of @a data.
229  * @param data Data of the message.
230  */
231 void
232 GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh,
233                            int is_admitted,
234                            const char *method_name,
235                            const struct GNUNET_ENV_Environment *env,
236                            size_t data_size,
237                            const void *data);
238
239
240 /** 
241  * Send a part acknowledgment.
242  *
243  * @param ph Part handle.
244  */
245 void
246 GNUNET_PSYC_part_ack (struct GNUNET_PSYC_PartHandle *ph);
247
248
249 /** 
250  * Handle for the channel of a PSYC group.
251  */
252 struct GNUNET_PSYC_Channel;
253
254
255 /** 
256  * Create a PSYC channel.
257  *
258  * Will create a multicast group identified by the given ECC key.  Messages
259  * received from group members will be given to the respective handler methods.
260  * If a new member wants to join a group, the "join" method handler will be
261  * invoked; the join handler must then generate a "join" message to approve the
262  * joining of the new member.  The channel can also change group membership
263  * without explicit requests.  Note that PSYC doesn't itself "understand" join
264  * or part messages, the respective methods must call other PSYC functions to
265  * inform PSYC about the meaning of the respective events.
266  *
267  * @param cfg Configuration to use (to connect to PSYC service).
268  * @param priv_key ECC key that will be used to sign messages for this
269  *                 PSYC session; public key is used to identify the
270  *                 PSYC group; FIXME: we'll likely want to use
271  *                 NOT the p521 curve here, but a cheaper one in the future
272  *                 Note that end-users will usually not use the private key
273  *                 directly, but rather look it up in GADS for groups 
274  *                 managed by other users, or select a file with the private
275  *                 key(s) when setting up their own channels
276  * @param join_policy What is the membership policy of the group?
277  *                 Used to automate group management decisions.
278  * @param method_cb Function to invoke on messages received from members.
279  * @param join_cb Function to invoke when a peer wants to join.
280  * @param part_cb Function to invoke when a peer wants to part.
281  * @param cls Closure for the callbacks.
282  * @return Handle for the channel, NULL on error.
283  */
284 struct GNUNET_PSYC_Channel *
285 GNUNET_PSYC_channel_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
286                             const struct GNUNET_CRYPTO_EccPrivateKey *priv_key,
287                             enum GNUNET_MULTICAST_JoinPolicy join_policy,
288                             GNUNET_PSYC_Method method_cb,
289                             GNUNET_PSYC_JoinCallback join_cb,
290                             GNUNET_PSYC_PartCallback part_cb,
291                             void *cls);
292
293
294 /** 
295  * Function called to provide data for a transmission via PSYC.
296  *
297  * Note that returning #GNUNET_OK or #GNUNET_SYSERR (but not #GNUNET_NO)
298  * invalidates the respective transmission handle.
299  *
300  * @param cls Closure.
301  * @param message_id Set to the unique message ID that was generated for
302  *        this message.
303  * @param data_size[in,out] Initially set to the number of bytes available in @a data,
304  *        should be set to the number of bytes written to data (IN/OUT).
305  * @param[out] data Where to write the body of the message to give to the method;
306  *        function must copy at most @a *data_size bytes to @a data.
307  * @return #GNUNET_SYSERR on error (fatal, aborts transmission)
308  *         #GNUNET_NO on success, if more data is to be transmitted later 
309  *         (should be used if @a *data_size was not big enough to take all the data)
310  *         #GNUNET_YES if this completes the transmission (all data supplied)
311  */
312 typedef int (*GNUNET_PSYC_ChannelReadyNotify)(void *cls,
313                                               uint64_t message_id,
314                                               size_t *data_size,
315                                               void *data);
316
317
318 /** 
319  * Handle for a pending PSYC transmission operation. 
320  */
321 struct GNUNET_PSYC_ChannelTransmitHandle;
322
323
324 /** 
325  * Send a message to call a method to all members in the PSYC channel.
326  *
327  * @param channel Handle to the PSYC multicast group.
328  * @param increment_group_generation #GNUNET_YES if we need to increment
329  *        the group generation counter after transmitting this message.
330  * @param method_name Which method should be invoked.
331  * @param env Environment: state operations and transient variables for the message.
332  * @param notify Function to call to obtain the arguments.
333  * @param notify_cls Closure for @a notify.
334  * @return Transmission handle, NULL on error (i.e. more than one request queued).
335  */
336 struct GNUNET_PSYC_ChannelTransmitHandle *
337 GNUNET_PSYC_channel_transmit (struct GNUNET_PSYC_Channel *channel,
338                               int increment_group_generation,
339                               const char *method_name,
340                               const struct GNUNET_ENV_Environment *env,
341                               GNUNET_PSYC_ChannelReadyNotify notify,
342                               void *notify_cls);
343
344
345 /** 
346  * Abort transmission request to channel.
347  *
348  * @param th Handle of the request that is being aborted.
349  */
350 void
351 GNUNET_PSYC_channel_transmit_cancel (struct GNUNET_PSYC_ChannelTransmitHandle *th);
352
353
354 /** 
355  * Destroy a PSYC channel.
356  *
357  * @param channel PSYC channel to terminate.
358  */
359 tvoid
360 GNUNET_PSYC_channel_destroy (struct GNUNET_PSYC_Channel *channel);
361
362
363 /** 
364  * Handle to access PSYC group operations for all members.
365  */
366 struct GNUNET_PSYC_Group;
367
368
369 /** 
370  * Convert @a channel to a @e group handle to access the @e group APIs.
371  * 
372  * @param channel Channel handle.
373  * @return Group handle, valid for as long as @a channel is valid.
374  */ 
375 struct GNUNET_PSYC_Group *
376 GNUNET_PSYC_channel_get_group (struct GNUNET_PSYC_Channel *channel);
377
378
379 /** 
380  * Convert @a member to a @e group handle to access the @e group APIs.
381  * 
382  * @param member Membership handle.
383  * @return Group handle, valid for as long as @a member is valid.
384  */ 
385 struct GNUNET_PSYC_Group *
386 GNUNET_PSYC_member_get_group (struct GNUNET_PSYC_Member *member);
387
388
389 /** 
390  * Add a member to the group.
391  *
392  * Note that this will NOT generate any PSYC traffic, it will merely update the
393  * local data base to modify how we react to <em>membership test</em> queries.  The
394  * channel still needs to explicitly transmit a @e join message to notify other
395  * group members and they then also must still call this function in their
396  * respective methods handling the @e join message.  This way, how @e join and
397  * @e part operations are exactly implemented is still up to the application;
398  * for example, there might be a @e part_all method to kick out everyone.
399  *
400  * Note that group members are explicitly trusted to execute such methods
401  * correctly; not doing so correctly will result in either denying members
402  * access or offering access to group data to non-members.
403  *
404  * @param group Group handle.
405  * @param member Which peer to add.
406  * @param message_id Message ID for the message that changed the membership.
407  */
408 void
409 GNUNET_PSYC_group_member_add (struct GNUNET_PSYC_Group *group,
410                               const struct GNUNET_PeerIdentity *member,
411                               uint64_t message_id);
412
413
414 /** 
415  * Remove a member from the group.
416  *
417  * Note that this will NOT generate any PSYC traffic, it will merely update the
418  * local data base to modify how we react to <em>membership test</em> queries.  The
419  * channel still needs to explicitly transmit a @e part message to notify other
420  * group members and they then also must still call this function in their
421  * respective methods handling the @e part message.  This way, how @e join and
422  * @e part operations are exactly implemented is still up to the application;
423  * for example, there might be a @e part_all message to kick out everyone.
424  *
425  * Note that group members are explicitly trusted to perform these
426  * operations correctly; not doing so correctly will result in either
427  * denying members access or offering access to group data to
428  * non-members.
429  *
430  * @param group Group handle.
431  * @param member Which peer to remove.
432  * @param message_id Message ID for the message that changed the membership.
433  */
434 void
435 GNUNET_PSYC_group_member_remove (struct GNUNET_PSYC_Group *group,
436                                  const struct GNUNET_PeerIdentity *member,
437                                  uint64_t message_id);
438
439
440 /** 
441  * Function called to inform a member about stored state values for a channel.
442  *
443  * @param cls Closure.
444  * @param name Name of the state variable.
445  * @param value Value of the state variable.
446  * @param value_size Number of bytes in @a value.
447  */
448 typedef void (*GNUNET_PSYC_StateCallback)(void *cls,
449                                           const char *name,
450                                           size_t value_size,
451                                           const void *value);
452
453
454 /** 
455  * Join a PSYC group.
456  *
457  * The entity joining is always the local peer.  The user must immediately use
458  * the GNUNET_PSYC_member_to_origin() (and possibly
459  * GNUNET_PSYC_member_variable_set()) functions to transmit a @e join_msg to
460  * the channel; if the join request succeeds, the channel state (and @e recent
461  * method calls) will be replayed to the joining member.  There is no explicit
462  * notification on failure (as the channel may simply take days to approve, a-v/snd
463  * disapproval is simply being ignored).
464  *
465  * @param cfg Configuration to use.
466  * @param pub_key ECC key that identifies the channel we wish to join
467  * @param origin Peer identity of the origin.
468  * @param method Function to invoke on messages received from the channel,
469  *                typically at least contains functions for @e join and @e part.
470  * @param method_cls Closure for @a method.
471  * @return Handle for the member, NULL on error.
472  */
473 struct GNUNET_PSYC_Member *
474 GNUNET_PSYC_member_join (const struct GNUNET_CONFIGURATION_Handle *cfg, 
475                          const struct GNUNET_CRYPTO_EccPublicKey *pub_key,
476                          const struct GNUNET_PeerIdentity *origin,
477                          GNUNET_PSYC_Method method,
478                          void *method_cls);
479
480
481 /** 
482  * Part a PSYC group.
483  *
484  * Will terminate the connection to the PSYC service.  Polite clients should
485  * first explicitly send a @e part request (via GNUNET_PSYC_member_to_origin()).
486  *
487  * @param member membership handle
488  */
489 void
490 GNUNET_PSYC_member_part (struct GNUNET_PSYC_Member *member);
491
492
493 /** 
494  * Function called to provide data for a transmission to the channel
495  * owner (aka the @e host of the channel).
496  *
497  * Note that returning #GNUNET_OK or #GNUNET_SYSERR (but not #GNUNET_NO)
498  * invalidates the respective transmission handle.
499  *
500  * @param cls Closure.
501  * @param data_size[in,out] Initially set to the number of bytes available in @a data,
502  *        should be set to the number of bytes written to data (IN/OUT).
503  * @param[out] data Where to write the body of the message to give to the method;
504  *        function must copy at most @a *data_size bytes to @a data.
505  * @return #GNUNET_SYSERR on error (fatal, aborts transmission).
506  *         #GNUNET_NO on success, if more data is to be transmitted later.
507  *         #GNUNET_YES if this completes the transmission (all data supplied).
508  */
509 typedef int (*GNUNET_PSYC_MemberReadyNotify)(void *cls,
510                                              size_t *data_size,
511                                              char *data);
512
513
514 /** 
515  * Handle for a pending PSYC transmission operation.
516  */
517 struct GNUNET_PSYC_MemberTransmitHandle;
518
519
520 /** 
521  * Request a message to be sent to the channel origin.
522  *
523  * @param member Membership handle.
524  * @param method_name Which (PSYC) method should be invoked (on host).
525  * @param env Environment: transient variables for the message.
526  * @param notify Function to call when we are allowed to transmit (to get data).
527  * @param notify_cls Closure for @a notify.
528  * @return Transmission handle, NULL on error (i.e. more than one request queued).
529  */
530 struct GNUNET_PSYC_MemberTransmitHandle *
531 GNUNET_PSYC_member_to_origin (struct GNUNET_PSYC_Member *member,
532                               const char *method_name,
533                               const struct GNUNET_ENV_Environment *env,
534                               GNUNET_PSYC_MemberReadyNotify notify,
535                               void *notify_cls);
536
537
538 /** 
539  * Abort transmission request to origin.
540  *
541  * @param th Handle of the request that is being aborted.
542  */
543 void
544 GNUNET_PSYC_member_to_origin_cancel (struct GNUNET_PSYC_MemberTransmitHandle *th);
545
546
547 /** 
548  * Handle to a story telling operation.
549  */
550 struct GNUNET_PSYC_Story;
551
552
553 /** 
554  * Request to be told the message history of the channel.
555  *
556  * Historic messages (but NOT the state at the time) will be replayed (given to
557  * the normal method handlers) if available and if access is permitted.
558  *
559  * To get the latest message, use 0 for both the start and end message ID.
560  *
561  * @param member Which channel should be replayed?
562  * @param start_message_id Earliest interesting point in history.
563  * @param end_message_id Last (exclusive) interesting point in history.
564  * @param method Function to invoke on messages received from the story.
565  * @param method_cls Closure for @a method.
566  * @param finish_cb Function to call when the requested story has been fully 
567  *        told (counting message IDs might not suffice, as some messages
568  *        might be secret and thus the listener would not know the story is 
569  *        finished without being told explicitly); once this function
570  *        has been called, the client must not call
571  *        GNUNET_PSYC_member_story_tell_cancel() anymore.
572  * @param finish_cb_cls Closure to finish_cb.
573  * @return Handle to cancel story telling operation.
574  */
575 struct GNUNET_PSYC_Story *
576 GNUNET_PSYC_member_story_tell (struct GNUNET_PSYC_Member *member,
577                                uint64_t start_message_id,
578                                uint64_t end_message_id,
579                                GNUNET_PSYC_Method method,
580                                void *method_cls,
581                                void (*finish_cb)(void *),
582                                void *finish_cb_cls);
583
584
585 /** 
586  * Abort story telling.
587  *
588  * This function must not be called from within method handlers (as given to
589  * GNUNET_PSYC_member_join()) of the member.
590  *
591  * @param story Story telling operation to stop.
592  */
593 void
594 GNUNET_PSYC_member_story_tell_cancel (struct GNUNET_PSYC_Story *story);
595
596
597 /** 
598  * Call the given callback on all matching values (including variables) in the
599  * channel state.
600  *
601  * The callback is invoked synchronously on all matching states (as the state is
602  * fully replicated in the library in this process; channel states should be
603  * small, large data is to be passed as streaming data to methods).
604  *
605  * A name matches if it includes the @a state_name prefix, thus requesting the
606  * empty state ("") will match all values; requesting "_a_b" will also return
607  * values stored under "_a_b_c".
608  *
609  * @param member Membership handle.
610  * @param state_name Name of the state to query (full name 
611  *        might be longer, this is only the prefix that must match).
612  * @param cb Function to call on the matching state values.
613  * @param cb_cls Closure for @a cb.
614  * @return Message ID for which the state was returned (last seen
615  *         message ID).
616  */
617 uint64_t
618 GNUNET_PSYC_member_state_get_all (struct GNUNET_PSYC_Member *member,
619                                   const char *state_name,
620                                   GNUNET_PSYC_StateCallback cb,
621                                   void *cb_cls);
622
623
624 /** 
625  * Obtain the current value of the best-matching value in the state
626  * (including variables).
627  *
628  * Note that variables are only valid during a #GNUNET_PSYC_Method invocation, as
629  * variables are only valid for the duration of a method invocation.
630  *
631  * If the requested variable name does not have an exact state in
632  * the state, the nearest less-specific name is matched; for example,
633  * requesting "_a_b" will match "_a" if "_a_b" does not exist.
634  *
635  * @param member Membership handle.
636  * @param variable_name Name of the variable to query.
637  * @param[out] return_value_size Set to number of bytes in variable, 
638  *        needed as variables might contain binary data and
639  *        might also not be 0-terminated; set to 0 on errors.
640  * @return NULL on error (no matching state or variable), pointer
641           to the respective value otherwise.
642  */
643 const void *
644 GNUNET_PSYC_member_state_get (struct GNUNET_PSYC_Member *member,
645                               const char *variable_name,
646                               size_t *return_value_size);
647
648
649 #if 0                           /* keep Emacsens' auto-indent happy */
650 {
651 #endif
652 #ifdef __cplusplus
653 }
654 #endif
655
656 /* ifndef GNUNET_PSYC_SERVICE_H */
657 #endif
658 /* end of gnunet_psyc_service.h */