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