-work around MHD_USE_TLS not being in old MHD versions
[oweals/gnunet.git] / src / include / gnunet_datastore_service.h
index 2e70392d3dc8d3b68a40fdc917a50b4a46db0a9f..f594d8fa61134faaabb8f307c305f450e0b30aeb 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet
-     Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2004, 2005, 2006, 2007, 2009, 2010, 2011 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_datastore_service.h
- * @brief API that can be used manage the
- *   datastore for files stored on a GNUnet node;
- *   note that the datastore is NOT responsible for
- *   on-demand encoding, that is achieved using
- *   a special kind of entry.
  * @author Christian Grothoff
+ *
+ * @file
+ * datastore service
+ *
+ * @defgroup datastore  Data Store service
+ * Data store for files stored on a GNUnet node.
+ *
+ * Provides an API that can be used manage the
+ * datastore for files stored on a GNUnet node.
+ * Note that the datastore is NOT responsible for
+ * on-demand encoding, that is achieved using
+ * a special kind of entry.
+ *
+ * @{
  */
 
 #ifndef GNUNET_DATASTORE_SERVICE_H
@@ -84,7 +92,7 @@ GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h,
  * operation.
  *
  * @param cls closure
- * @param success #GNUNET_SYSERR on failure (including timeout/queue drop)
+ * @param success #GNUNET_SYSERR on failure
  *                #GNUNET_NO if content was already there
  *                #GNUNET_YES (or other positive value) on success
  * @param min_expiration minimum expiration time required for 0-priority content to be stored
@@ -92,10 +100,11 @@ GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h,
  *                space for 0-priority content
  * @param msg NULL on success, otherwise an error message
  */
-typedef void (*GNUNET_DATASTORE_ContinuationWithStatus) (void *cls,
-                                                         int32_t success,
-                                                        struct GNUNET_TIME_Absolute min_expiration,
-                                                         const char *msg);
+typedef void
+(*GNUNET_DATASTORE_ContinuationWithStatus) (void *cls,
+                                            int32_t success,
+                                            struct GNUNET_TIME_Absolute min_expiration,
+                                            const char *msg);
 
 
 /**
@@ -140,7 +149,6 @@ GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h,
  * @param queue_priority ranking of this request in the priority queue
  * @param max_queue_size at what queue size should this request be dropped
  *        (if other requests of higher priority are in the queue)
- * @param timeout timeout for the operation
  * @param cont continuation to call when done
  * @param cont_cls closure for @a cont
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
@@ -148,14 +156,18 @@ GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h,
  *         (or rather, will already have been invoked)
  */
 struct GNUNET_DATASTORE_QueueEntry *
-GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid,
-                      const struct GNUNET_HashCode *key, size_t size,
-                      const void *data, enum GNUNET_BLOCK_Type type,
-                      uint32_t priority, uint32_t anonymity,
+GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h,
+                      uint32_t rid,
+                      const struct GNUNET_HashCode *key,
+                      size_t size,
+                      const void *data,
+                      enum GNUNET_BLOCK_Type type,
+                      uint32_t priority,
+                      uint32_t anonymity,
                       uint32_t replication,
                       struct GNUNET_TIME_Absolute expiration,
-                      unsigned int queue_priority, unsigned int max_queue_size,
-                      struct GNUNET_TIME_Relative timeout,
+                      unsigned int queue_priority,
+                      unsigned int max_queue_size,
                       GNUNET_DATASTORE_ContinuationWithStatus cont,
                       void *cont_cls);
 
@@ -174,7 +186,6 @@ GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid,
  * @param queue_priority ranking of this request in the priority queue
  * @param max_queue_size at what queue size should this request be dropped
  *        (if other requests of higher priority are in the queue)
- * @param timeout how long to wait at most for a response
  * @param cont continuation to call when done
  * @param cont_cls closure for @a cont
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
@@ -185,7 +196,6 @@ struct GNUNET_DATASTORE_QueueEntry *
 GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h,
                                   uint32_t rid, unsigned int queue_priority,
                                   unsigned int max_queue_size,
-                                  struct GNUNET_TIME_Relative timeout,
                                   GNUNET_DATASTORE_ContinuationWithStatus cont,
                                   void *cont_cls);
 
@@ -200,7 +210,6 @@ GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h,
  * @param queue_priority ranking of this request in the priority queue
  * @param max_queue_size at what queue size should this request be dropped
  *        (if other requests of higher priority are in the queue)
- * @param timeout how long to wait at most for a response
  * @param cont continuation to call when done
  * @param cont_cls closure for @a cont
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
@@ -214,7 +223,6 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h,
                          struct GNUNET_TIME_Absolute expiration,
                          unsigned int queue_priority,
                          unsigned int max_queue_size,
-                         struct GNUNET_TIME_Relative timeout,
                          GNUNET_DATASTORE_ContinuationWithStatus cont,
                          void *cont_cls);
 
@@ -232,7 +240,6 @@ GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h,
  * @param queue_priority ranking of this request in the priority queue
  * @param max_queue_size at what queue size should this request be dropped
  *        (if other requests of higher priority are in the queue)
- * @param timeout how long to wait at most for a response
  * @param cont continuation to call when done
  * @param cont_cls closure for @a cont
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
@@ -246,7 +253,6 @@ GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
                          const void *data,
                          unsigned int queue_priority,
                          unsigned int max_queue_size,
-                         struct GNUNET_TIME_Relative timeout,
                          GNUNET_DATASTORE_ContinuationWithStatus cont,
                          void *cont_cls);
 
@@ -291,7 +297,6 @@ typedef void
  * @param queue_priority ranking of this request in the priority queue
  * @param max_queue_size at what queue size should this request be dropped
  *        (if other requests of higher priority are in the queue)
- * @param timeout how long to wait at most for a response
  * @param proc function to call on a matching value;
  *        or with a NULL value if no datum matches
  * @param proc_cls closure for @a proc
@@ -305,7 +310,6 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h,
                           enum GNUNET_BLOCK_Type type,
                           unsigned int queue_priority,
                           unsigned int max_queue_size,
-                          struct GNUNET_TIME_Relative timeout,
                           GNUNET_DATASTORE_DatumProcessor proc,
                           void *proc_cls);
 
@@ -325,7 +329,6 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h,
  * @param queue_priority ranking of this request in the priority queue
  * @param max_queue_size at what queue size should this request be dropped
  *        (if other requests of higher priority are in the queue)
- * @param timeout how long to wait at most for a response
  * @param type allowed type for the operation (never zero)
  * @param proc function to call on a random value; it
  *        will be called once with a value (if available)
@@ -339,7 +342,6 @@ GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
                                      uint64_t offset,
                                      unsigned int queue_priority,
                                      unsigned int max_queue_size,
-                                     struct GNUNET_TIME_Relative timeout,
                                      enum GNUNET_BLOCK_Type type,
                                      GNUNET_DATASTORE_DatumProcessor proc,
                                      void *proc_cls);
@@ -356,7 +358,6 @@ GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
  * @param queue_priority ranking of this request in the priority queue
  * @param max_queue_size at what queue size should this request be dropped
  *        (if other requests of higher priority are in the queue)
- * @param timeout how long to wait at most for a response
  * @param proc function to call on a random value; it
  *        will be called once with a value (if available)
  *        and always once with a value of NULL.
@@ -368,7 +369,6 @@ struct GNUNET_DATASTORE_QueueEntry *
 GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h,
                                       unsigned int queue_priority,
                                       unsigned int max_queue_size,
-                                      struct GNUNET_TIME_Relative timeout,
                                       GNUNET_DATASTORE_DatumProcessor proc,
                                       void *proc_cls);
 
@@ -391,5 +391,6 @@ GNUNET_DATASTORE_cancel (struct GNUNET_DATASTORE_QueueEntry *qe);
 }
 #endif
 
-/* end of gnunet_datastore_service.h */
 #endif
+
+/** @} */  /* end of group */