convert fs publish to MQ
[oweals/gnunet.git] / src / include / gnunet_psycstore_service.h
index 12a375c44553a501215821d7a6795a4669749e1b..f6c6bff035cfeb6a32bea41f4d27f4ddbcaf5782 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2013 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
 */
 
 /**
- * @file include/gnunet_psycstore_service.h
- * @brief PSYCstore service; implements persistent storage for the PSYC service
  * @author Gabor X Toth
  * @author Christian Grothoff
+ *
+ * @file
+ * PSYCstore service; implements persistent storage for the PSYC service
+ *
+ * @defgroup psycstore  PSYC Store service
+ * Persistent storage for the PSYC service.
+ * @{
  */
 #ifndef GNUNET_PSYCSTORE_SERVICE_H
 #define GNUNET_PSYCSTORE_SERVICE_H
@@ -36,7 +41,7 @@ extern "C"
 #endif
 
 #include "gnunet_util_lib.h"
-#include "gnunet_env_lib.h"
+#include "gnunet_psyc_util_lib.h"
 #include "gnunet_multicast_service.h"
 #include "gnunet_psyc_service.h"
 
@@ -330,6 +335,8 @@ GNUNET_PSYCSTORE_fragment_get_latest (struct GNUNET_PSYCSTORE_Handle *h,
  *        First message ID to retrieve.
  * @param last_message_id
  *        Last consecutive message ID to retrieve.
+ * @param fragment_limit
+ *        Maximum number of fragments to retrieve.
  * @param method_prefix
  *        Retrieve only messages with a matching method prefix.
  * @param fragment_cb
@@ -347,6 +354,7 @@ GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h,
                               const struct GNUNET_CRYPTO_EcdsaPublicKey *slave_key,
                               uint64_t first_message_id,
                               uint64_t last_message_id,
+                              uint64_t fragment_limit,
                               const char *method_prefix,
                               GNUNET_PSYCSTORE_FragmentCallback fragment_cb,
                               GNUNET_PSYCSTORE_ResultCallback result_cb,
@@ -494,10 +502,6 @@ GNUNET_PSYCSTORE_counters_get (struct GNUNET_PSYCSTORE_Handle *h,
  *        ID of the message that contains the @a modifiers.
  * @param state_delta
  *        Value of the @e state_delta PSYC header variable of the message.
- * @param modifier_count
- *        Number of elements in the @a modifiers array.
- * @param modifiers
- *        List of modifiers to apply.
  * @param rcb
  *        Callback to call with the result of the operation.
  * @param rcb_cls
@@ -510,8 +514,6 @@ GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h,
                                const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
                                uint64_t message_id,
                                uint64_t state_delta,
-                               size_t modifier_count,
-                               const struct GNUNET_ENV_Modifier *modifiers,
                                GNUNET_PSYCSTORE_ResultCallback rcb,
                                void *rcb_cls);
 
@@ -523,7 +525,9 @@ GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h,
  *        Handle for the PSYCstore.
  * @param channel_key
  *        The channel we are interested in.
- * @param message_id
+ * @param max_state_message_id
+ *        ID of the last stateful message before @a state_hash_message_id.
+ * @param state_hash_message_id
  *        ID of the message that contains the state_hash PSYC header variable.
  * @param modifier_count
  *        Number of elements in the @a modifiers array.
@@ -539,9 +543,10 @@ GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h,
 struct GNUNET_PSYCSTORE_OperationHandle *
 GNUNET_PSYCSTORE_state_sync (struct GNUNET_PSYCSTORE_Handle *h,
                              const struct GNUNET_CRYPTO_EddsaPublicKey *channel_key,
-                             uint64_t message_id,
+                             uint64_t max_state_message_id,
+                             uint64_t state_hash_message_id,
                              size_t modifier_count,
-                             const struct GNUNET_ENV_Modifier *modifiers,
+                             const struct GNUNET_PSYC_Modifier *modifiers,
                              GNUNET_PSYCSTORE_ResultCallback rcb,
                              void *rcb_cls);
 
@@ -615,7 +620,7 @@ GNUNET_PSYCSTORE_state_hash_update (struct GNUNET_PSYCSTORE_Handle *h,
  */;
 typedef int
 (*GNUNET_PSYCSTORE_StateCallback) (void *cls, const char *name,
-                                   const void *value, size_t value_size);
+                                   const void *value, uint32_t value_size);
 
 
 /**
@@ -692,4 +697,5 @@ GNUNET_PSYCSTORE_operation_cancel (struct GNUNET_PSYCSTORE_OperationHandle *op);
 
 /* ifndef GNUNET_PSYCSTORE_SERVICE_H */
 #endif
-/* end of gnunet_psycstore_service.h */
+
+/** @} */  /* end of group */