fix bad free
[oweals/gnunet.git] / src / include / gnunet_psycstore_service.h
1 /*
2      This file is part of GNUnet.
3      Copyright (C) 2013 GNUnet e.V.
4
5      GNUnet is free software: you can redistribute it and/or modify it
6      under the terms of the GNU Affero General Public License as published
7      by the Free Software Foundation, either version 3 of the License,
8      or (at your 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      Affero General Public License for more details.
14     
15      You should have received a copy of the GNU Affero General Public License
16      along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 /**
20  * @author Gabor X Toth
21  * @author Christian Grothoff
22  *
23  * @file
24  * PSYCstore service; implements persistent storage for the PSYC service
25  *
26  * @defgroup psycstore  PSYC Store service
27  * Persistent storage for the PSYC service.
28  * @{
29  */
30 #ifndef GNUNET_PSYCSTORE_SERVICE_H
31 #define GNUNET_PSYCSTORE_SERVICE_H
32
33 #ifdef __cplusplus
34 extern "C"
35 {
36 #if 0                           /* keep Emacsens' auto-indent happy */
37 }
38 #endif
39 #endif
40
41 #include "gnunet_util_lib.h"
42 #include "gnunet_psyc_util_lib.h"
43 #include "gnunet_multicast_service.h"
44 #include "gnunet_psyc_service.h"
45
46 /**
47  * Version number of GNUnet PSYCstore API.
48  */
49 #define GNUNET_PSYCSTORE_VERSION 0x00000000
50
51 /**
52  * Membership test failed.
53  */
54 #define GNUNET_PSYCSTORE_MEMBERSHIP_TEST_FAILED -2
55
56 /**
57  * Flags for stored messages.
58  */
59 enum GNUNET_PSYCSTORE_MessageFlags
60 {
61   /**
62    * The message contains state modifiers.
63    */
64   GNUNET_PSYCSTORE_MESSAGE_STATE = 1 << 0,
65
66   /**
67    * The state modifiers have been applied to the state store.
68    */
69   GNUNET_PSYCSTORE_MESSAGE_STATE_APPLIED = 1 << 1,
70
71   /**
72    * The message contains a state hash.
73    */
74   GNUNET_PSYCSTORE_MESSAGE_STATE_HASH = 1 << 2
75 };
76
77
78 /**
79  * Handle for a PSYCstore
80  */
81 struct GNUNET_PSYCSTORE_Handle;
82
83
84 /**
85  * Connect to the PSYCstore service.
86  *
87  * @param cfg Configuration to use.
88  *
89  * @return Handle for the connecton.
90  */
91 struct GNUNET_PSYCSTORE_Handle *
92 GNUNET_PSYCSTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
93
94
95 /**
96  * Disconnect from the PSYCstore service.
97  *
98  * @param h Handle for the connection.
99  */
100 void
101 GNUNET_PSYCSTORE_disconnect (struct GNUNET_PSYCSTORE_Handle *h);
102
103
104 /**
105  * Handle for an operation on the PSYCSTORE (useful to cancel the operation).
106  */
107 struct GNUNET_PSYCSTORE_OperationHandle;
108
109
110 /**
111  * Function called with the result of an asynchronous operation.
112  *
113  * @param cls
114  *        Closure.
115  * @param result
116  *        Result of the operation.
117  * @param err_msg
118  *        Error message, or NULL if there's no error.
119  * @param err_msg_size
120  *        Size of @a err_msg
121  */
122 typedef void
123 (*GNUNET_PSYCSTORE_ResultCallback) (void *cls,
124                                     int64_t result,
125                                     const char *err_msg,
126                                     uint16_t err_msg_size);
127
128
129 /**
130  * Store join/leave events for a PSYC channel in order to be able to answer
131  * membership test queries later.
132  *
133  * @param h
134  *        Handle for the PSYCstore.
135  * @param channel_key
136  *        The channel where the event happened.
137  * @param slave_key
138  *        Public key of joining/leaving slave.
139  * @param did_join
140  *        #GNUNET_YES on join, #GNUNET_NO on part.
141  * @param announced_at
142  *        ID of the message that announced the membership change.
143  * @param effective_since
144  *        Message ID this membership change is in effect since.
145  *        For joins it is <= announced_at, for parts it is always 0.
146  * @param group_generation
147  *        In case of a part, the last group generation the slave has access to.
148  *        It has relevance when a larger message have fragments with different
149  *        group generations.
150  * @param result_cb
151  *        Callback to call with the result of the storage operation.
152  * @param cls
153  *        Closure for the callback.
154  *
155  * @return Operation handle that can be used to cancel the operation.
156  */
157 struct GNUNET_PSYCSTORE_OperationHandle *
158 GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h,
159                                    const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
160                                    const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key,
161                                    int did_join,
162                                    uint64_t announced_at,
163                                    uint64_t effective_since,
164                                    uint64_t group_generation,
165                                    GNUNET_PSYCSTORE_ResultCallback result_cb,
166                                    void *cls);
167
168
169 /**
170  * Test if a member was admitted to the channel at the given message ID.
171  *
172  * This is useful when relaying and replaying messages to check if a particular
173  * slave has access to the message fragment with a given group generation.  It
174  * is also used when handling join requests to determine whether the slave is
175  * currently admitted to the channel.
176  *
177  * @param h
178  *        Handle for the PSYCstore.
179  * @param channel_key
180  *        The channel we are interested in.
181  * @param slave_key
182  *        Public key of slave whose membership to check.
183  * @param message_id
184  *        Message ID for which to do the membership test.
185  * @param group_generation
186  *        Group generation of the fragment of the message to test.
187  *        It has relevance if the message consists of multiple fragments with
188  *        different group generations.
189  * @param result_cb
190  *        Callback to call with the test result.
191  * @param cls
192  *        Closure for the callback.
193  *
194  * @return Operation handle that can be used to cancel the operation.
195  */
196 struct GNUNET_PSYCSTORE_OperationHandle *
197 GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h,
198                                   const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
199                                   const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key,
200                                   uint64_t message_id,
201                                   uint64_t group_generation,
202                                   GNUNET_PSYCSTORE_ResultCallback result_cb,
203                                   void *cls);
204
205
206 /**
207  * Store a message fragment sent to a channel.
208  *
209  * @param h Handle for the PSYCstore.
210  * @param channel_key The channel the message belongs to.
211  * @param msg Message to store.
212  * @param psycstore_flags Flags indicating whether the PSYC message contains
213  *        state modifiers.
214  * @param result_cb Callback to call with the result of the operation.
215  * @param cls Closure for the callback.
216  *
217  * @return Handle that can be used to cancel the operation.
218  */
219 struct GNUNET_PSYCSTORE_OperationHandle *
220 GNUNET_PSYCSTORE_fragment_store (struct GNUNET_PSYCSTORE_Handle *h,
221                                  const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
222                                  const struct GNUNET_MULTICAST_MessageHeader *msg,
223                                  enum GNUNET_PSYCSTORE_MessageFlags psycstore_flags,
224                                  GNUNET_PSYCSTORE_ResultCallback result_cb,
225                                  void *cls);
226
227
228 /**
229  * Function called with one message fragment, as the result of a
230  * GNUNET_PSYCSTORE_fragment_get() or GNUNET_PSYCSTORE_message_get() call.
231  *
232  * @param cls Closure.
233  * @param message The retrieved message fragment.  A NULL value indicates that
234  *        there are no more results to be returned.
235  * @param psycstore_flags Flags stored with the message.
236  *
237  * @return #GNUNET_NO to stop calling this callback with further fragments,
238  *         #GNUNET_YES to continue.
239  */
240 typedef int
241 (*GNUNET_PSYCSTORE_FragmentCallback) (void *cls,
242                                       struct GNUNET_MULTICAST_MessageHeader *message,
243                                       enum GNUNET_PSYCSTORE_MessageFlags psycstore_flags);
244
245
246 /**
247  * Retrieve message fragments by fragment ID range.
248  *
249  * @param h
250  *        Handle for the PSYCstore.
251  * @param channel_key
252  *        The channel we are interested in.
253  * @param slave_key
254  *        The slave requesting the fragment.  If not NULL, a membership test is
255  *        performed first and the fragment is only returned if the slave has
256  *        access to it.
257  * @param first_fragment_id
258  *        First fragment ID to retrieve.
259  *        Use 0 to get the latest message fragment.
260  * @param last_fragment_id
261  *        Last consecutive fragment ID to retrieve.
262  *        Use 0 to get the latest message fragment.
263  * @param fragment_cb
264  *        Callback to call with the retrieved fragments.
265  * @param result_cb
266  *        Callback to call with the result of the operation.
267  * @param cls
268  *        Closure for the callbacks.
269  *
270  * @return Handle that can be used to cancel the operation.
271  */
272 struct GNUNET_PSYCSTORE_OperationHandle *
273 GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h,
274                                const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
275                                const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key,
276                                uint64_t first_message_id,
277                                uint64_t last_message_id,
278                                GNUNET_PSYCSTORE_FragmentCallback fragment_cb,
279                                GNUNET_PSYCSTORE_ResultCallback result_cb,
280                                void *cls);
281
282
283 /**
284  * Retrieve latest message fragments.
285  *
286  * @param h
287  *        Handle for the PSYCstore.
288  * @param channel_key
289  *        The channel we are interested in.
290  * @param slave_key
291  *        The slave requesting the fragment.  If not NULL, a membership test is
292  *        performed first and the fragment is only returned if the slave has
293  *        access to it.
294  * @param first_fragment_id
295  *        First fragment ID to retrieve.
296  *        Use 0 to get the latest message fragment.
297  * @param last_fragment_id
298  *        Last consecutive fragment ID to retrieve.
299  *        Use 0 to get the latest message fragment.
300  * @param fragment_limit
301  *        Maximum number of fragments to retrieve.
302  * @param fragment_cb
303  *        Callback to call with the retrieved fragments.
304  * @param result_cb
305  *        Callback to call with the result of the operation.
306  * @param cls
307  *        Closure for the callbacks.
308  *
309  * @return Handle that can be used to cancel the operation.
310  */
311 struct GNUNET_PSYCSTORE_OperationHandle *
312 GNUNET_PSYCSTORE_fragment_get_latest (struct GNUNET_PSYCSTORE_Handle *h,
313                                       const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
314                                       const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key,
315                                       uint64_t fragment_limit,
316                                       GNUNET_PSYCSTORE_FragmentCallback fragment_cb,
317                                       GNUNET_PSYCSTORE_ResultCallback result_cb,
318                                       void *cls);
319
320
321 /**
322  * Retrieve all fragments of messages in a message ID range.
323  *
324  * @param h
325  *        Handle for the PSYCstore.
326  * @param channel_key
327  *        The channel we are interested in.
328  * @param slave_key
329  *        The slave requesting the message.
330  *        If not NULL, a membership test is performed first
331  *        and the message is only returned if the slave has access to it.
332  * @param first_message_id
333  *        First message ID to retrieve.
334  * @param last_message_id
335  *        Last consecutive message ID to retrieve.
336  * @param fragment_limit
337  *        Maximum number of fragments to retrieve.
338  * @param method_prefix
339  *        Retrieve only messages with a matching method prefix.
340  * @param fragment_cb
341  *        Callback to call with the retrieved fragments.
342  * @param result_cb
343  *        Callback to call with the result of the operation.
344  * @param cls
345  *        Closure for the callbacks.
346  *
347  * @return Handle that can be used to cancel the operation.
348  */
349 struct GNUNET_PSYCSTORE_OperationHandle *
350 GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h,
351                               const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
352                               const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key,
353                               uint64_t first_message_id,
354                               uint64_t last_message_id,
355                               uint64_t fragment_limit,
356                               const char *method_prefix,
357                               GNUNET_PSYCSTORE_FragmentCallback fragment_cb,
358                               GNUNET_PSYCSTORE_ResultCallback result_cb,
359                               void *cls);
360
361
362 /**
363  * Retrieve all fragments of the latest messages.
364  *
365  * @param h
366  *        Handle for the PSYCstore.
367  * @param channel_key
368  *        The channel we are interested in.
369  * @param slave_key
370  *        The slave requesting the message.
371  *        If not NULL, a membership test is performed first
372  *        and the message is only returned if the slave has access to it.
373  * @param message_limit
374  *        Maximum number of messages to retrieve.
375  * @param method_prefix
376  *        Retrieve only messages with a matching method prefix.
377  * @param fragment_cb
378  *        Callback to call with the retrieved fragments.
379  * @param result_cb
380  *        Callback to call with the result of the operation.
381  * @param cls
382  *        Closure for the callbacks.
383  *
384  * @return Handle that can be used to cancel the operation.
385  */
386 struct GNUNET_PSYCSTORE_OperationHandle *
387 GNUNET_PSYCSTORE_message_get_latest (struct GNUNET_PSYCSTORE_Handle *h,
388                                      const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
389                                      const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key,
390                                      uint64_t message_limit,
391                                      const char *method_prefix,
392                                      GNUNET_PSYCSTORE_FragmentCallback fragment_cb,
393                                      GNUNET_PSYCSTORE_ResultCallback result_cb,
394                                      void *cls);
395
396
397 /**
398  * Retrieve a fragment of message specified by its message ID and fragment
399  * offset.
400  *
401  * @param h
402  *        Handle for the PSYCstore.
403  * @param channel_key
404  *        The channel we are interested in.
405  * @param slave_key
406  *        The slave requesting the message fragment.  If not NULL, a membership
407  *        test is performed first and the message fragment is only returned
408  *        if the slave has access to it.
409  * @param message_id
410  *        Message ID to retrieve.  Use 0 to get the latest message.
411  * @param fragment_offset
412  *        Offset of the fragment to retrieve.
413  * @param fragment_cb
414  *        Callback to call with the retrieved fragments.
415  * @param result_cb
416  *        Callback to call with the result of the operation.
417  * @param cls
418  *        Closure for the callbacks.
419  *
420  * @return Handle that can be used to cancel the operation.
421  */
422 struct GNUNET_PSYCSTORE_OperationHandle *
423 GNUNET_PSYCSTORE_message_get_fragment (struct GNUNET_PSYCSTORE_Handle *h,
424                                        const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
425                                        const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key,
426                                        uint64_t message_id,
427                                        uint64_t fragment_offset,
428                                        GNUNET_PSYCSTORE_FragmentCallback fragment_cb,
429                                        GNUNET_PSYCSTORE_ResultCallback result_cb,
430                                        void *cls);
431
432
433 /**
434  * Callback used to return the latest value of counters for the channel master.
435  *
436  * @see GNUNET_PSYCSTORE_counters_get()
437  *
438  * @param cls Closure.
439  * @param result_code
440  *        Status code for the operation:
441  *        #GNUNET_OK: success, counter values are returned.
442  *        #GNUNET_NO: no message has been sent to the channel yet.
443  *        #GNUNET_SYSERR: an error occurred.
444  * @param max_fragment_id
445  *        Latest message fragment ID, used by multicast.
446  * @param max_message_id
447  *        Latest message ID, used by PSYC.
448  * @param max_group_generation
449  *        Latest group generation, used by PSYC.
450  * @param max_state_message_id
451  *        Latest message ID containing state modifiers that
452  *        was applied to the state store.  Used for the state sync process.
453  */
454 typedef void
455 (*GNUNET_PSYCSTORE_CountersCallback) (void *cls,
456                                       int result_code,
457                                       uint64_t max_fragment_id,
458                                       uint64_t max_message_id,
459                                       uint64_t max_group_generation,
460                                       uint64_t max_state_message_id);
461
462
463 /**
464  * Retrieve latest values of counters for a channel.
465  *
466  * The current value of counters are needed
467  * - when a channel master is restarted, so that it can continue incrementing
468  *   the counters from their last value.
469  * - when a channel slave rejoins and starts the state synchronization process.
470  *
471  * @param h
472  *        Handle for the PSYCstore.
473  * @param channel_key
474  *        Public key that identifies the channel.
475  * @param counters_cb
476  *        Callback to call with the result.
477  * @param cls
478  *        Closure for the @a ccb callback.
479  *
480  * @return Handle that can be used to cancel the operation.
481  */
482 struct GNUNET_PSYCSTORE_OperationHandle *
483 GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h,
484                                struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
485                                GNUNET_PSYCSTORE_CountersCallback counters_cb,
486                                void *cls);
487
488
489 /**
490  * Apply modifiers of a message to the current channel state.
491  *
492  * An error is returned if there are missing messages containing state
493  * operations before the current one.
494  *
495  * @param h
496  *        Handle for the PSYCstore.
497  * @param channel_key
498  *        The channel we are interested in.
499  * @param message_id
500  *        ID of the message that contains the @a modifiers.
501  * @param state_delta
502  *        Value of the @e state_delta PSYC header variable of the message.
503  * @param result_cb
504  *        Callback to call with the result of the operation.
505  * @param cls
506  *        Closure for the @a result_cb callback.
507  *
508  * @return Handle that can be used to cancel the operation.
509  */
510 struct GNUNET_PSYCSTORE_OperationHandle *
511 GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h,
512                                const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
513                                uint64_t message_id,
514                                uint64_t state_delta,
515                                GNUNET_PSYCSTORE_ResultCallback result_cb,
516                                void *cls);
517
518
519 /**
520  * Store synchronized state.
521  *
522  * @param h
523  *        Handle for the PSYCstore.
524  * @param channel_key
525  *        The channel we are interested in.
526  * @param max_state_message_id
527  *        ID of the last stateful message before @a state_hash_message_id.
528  * @param state_hash_message_id
529  *        ID of the message that contains the state_hash PSYC header variable.
530  * @param modifier_count
531  *        Number of elements in the @a modifiers array.
532  * @param modifiers
533  *        Full state to store.
534  * @param result_cb
535  *        Callback to call with the result of the operation.
536  * @param cls
537  *        Closure for the callback.
538  *
539  * @return Handle that can be used to cancel the operation.
540  */
541 struct GNUNET_PSYCSTORE_OperationHandle *
542 GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h,
543                              const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
544                              uint64_t max_state_message_id,
545                              uint64_t state_hash_message_id,
546                              size_t modifier_count,
547                              const struct GNUNET_PSYC_Modifier *modifiers,
548                              GNUNET_PSYCSTORE_ResultCallback result_cb,
549                              void *cls);
550
551
552
553 /**
554  * Reset the state of a channel.
555  *
556  * Delete all state variables stored for the given channel.
557  *
558  * @param h
559  *        Handle for the PSYCstore.
560  * @param channel_key
561  *        The channel we are interested in.
562  * @param result_cb
563  *        Callback to call with the result of the operation.
564  * @param cls
565  *        Closure for the callback.
566  *
567  * @return Handle that can be used to cancel the operation.
568  */
569 struct GNUNET_PSYCSTORE_OperationHandle *
570 GNUNET_PSYCSTORE_state_reset (struct GNUNET_PSYCSTORE_Handle *h,
571                               const struct GNUNET_CRYPTO_EddsaPublicKey
572                               *channel_key,
573                               GNUNET_PSYCSTORE_ResultCallback result_cb,
574                               void *cls);
575
576
577 /**
578  * Update signed values of state variables in the state store.
579  *
580  * @param h
581  *        Handle for the PSYCstore.
582  * @param channel_key
583  *        The channel we are interested in.
584  * @param message_id
585  *        Message ID that contained the state @a hash.
586  * @param hash
587  *        Hash of the serialized full state.
588  * @param result_cb
589  *        Callback to call with the result of the operation.
590  * @param cls
591  *        Closure for the callback.
592  *
593  */
594 struct GNUNET_PSYCSTORE_OperationHandle *
595 GNUNET_PSYCSTORE_state_hash_update (struct GNUNET_PSYCSTORE_Handle *h,
596                                     const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
597                                     uint64_t message_id,
598                                     const struct GNUNET_HashCode *hash,
599                                     GNUNET_PSYCSTORE_ResultCallback result_cb,
600                                     void *cls);
601
602
603 /**
604  * Function called with the value of a state variable.
605  *
606  * @param cls
607  *        Closure.
608  * @param name
609  *        Name of the state variable.  A NULL value indicates that there are no more
610  *        state variables to be returned.
611  * @param value
612  *        Value of the state variable.
613  * @param value_size
614  *        Number of bytes in @a value.
615  *
616  * @return #GNUNET_NO to stop calling this callback with further variables,
617  *         #GNUNET_YES to continue.
618  */;
619 typedef int
620 (*GNUNET_PSYCSTORE_StateCallback) (void *cls, const char *name,
621                                    const void *value, uint32_t value_size);
622
623
624 /**
625  * Retrieve the best matching state variable.
626  *
627  * @param h
628  *        Handle for the PSYCstore.
629  * @param channel_key
630  *        The channel we are interested in.
631  * @param name
632  *        Name of variable to match, the returned variable might be less specific.
633  * @param state_cb
634  *        Callback to return the matching state variable.
635  * @param result_cb
636  *        Callback to call with the result of the operation.
637  * @param cls
638  *        Closure for the callbacks.
639  *
640  * @return Handle that can be used to cancel the operation.
641  */
642 struct GNUNET_PSYCSTORE_OperationHandle *
643 GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h,
644                             const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
645                             const char *name,
646                             GNUNET_PSYCSTORE_StateCallback state_cb,
647                             GNUNET_PSYCSTORE_ResultCallback result_cb,
648                             void *cls);
649
650
651 /**
652  * Retrieve all state variables for a channel with the given prefix.
653  *
654  * @param h
655  *        Handle for the PSYCstore.
656  * @param channel_key
657  *        The channel we are interested in.
658  * @param name_prefix
659  *        Prefix of state variable names to match.
660  * @param state_cb
661  *        Callback to return matching state variables.
662  * @param result_cb
663  *        Callback to call with the result of the operation.
664  * @param cls
665  *        Closure for the callbacks.
666  *
667  * @return Handle that can be used to cancel the operation.
668  */
669 struct GNUNET_PSYCSTORE_OperationHandle *
670 GNUNET_PSYCSTORE_state_get_prefix (struct GNUNET_PSYCSTORE_Handle *h,
671                                    const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
672                                    const char *name_prefix,
673                                    GNUNET_PSYCSTORE_StateCallback state_cb,
674                                    GNUNET_PSYCSTORE_ResultCallback result_cb,
675                                    void *cls);
676
677
678 /**
679  * Cancel an operation.
680  *
681  * @param op Handle for the operation to cancel.
682  */
683 int
684 GNUNET_PSYCSTORE_operation_cancel (struct GNUNET_PSYCSTORE_OperationHandle *op);
685
686
687
688
689 #if 0                           /* keep Emacsens' auto-indent happy */
690 {
691 #endif
692 #ifdef __cplusplus
693 }
694 #endif
695
696 /* ifndef GNUNET_PSYCSTORE_SERVICE_H */
697 #endif
698
699 /** @} */  /* end of group */