mtypes
authorChristian Grothoff <christian@grothoff.org>
Mon, 15 Jun 2009 04:46:53 +0000 (04:46 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 15 Jun 2009 04:46:53 +0000 (04:46 +0000)
src/include/gnunet_datastore_service.h
src/include/gnunet_protocols.h

index ed0fd085623dded301127fd762d2c90ca19c73f1..2f7fce6d8ccc5a406fea4a386f405ce2e482138a 100644 (file)
@@ -155,9 +155,9 @@ GNUNET_DATASTORE_get (struct GNUNET_DATASTORE_Handle *h,
  * Get a random value from the datastore.
  *
  * @param h handle to the datastore
- * @param iter function to call on each matching value;
- *        will be called exactly once; if no values
- *        are available, the value will be NULL.
+ * @param iter 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.
  * @param iter_cls closure for iter
  */
 void
@@ -175,7 +175,7 @@ GNUNET_DATASTORE_get_random (struct GNUNET_DATASTORE_Handle *h,
  */
 void
 GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
-                         const GNUNET_HashCode * key,
+                         const GNUNET_HashCode *key,
                          uint32_t size, const void *data);
 
 
index 342014ae13a313e9d37f3c1091c2cf772de36f24..04bfe2a4f08a4f1632c07f7d82c0defe643bc4ed 100644 (file)
@@ -303,11 +303,59 @@ extern "C"
 #define GNUNET_MESSAGE_TYPE_CORE_HANGUP 84
 
 
+/**
+ * Message sent by datastore client on join.
+ */
+#define GNUNET_MESSAGE_TYPE_DATASTORE_INIT 92
+
+/**
+ * Message sent by datastore to client informing about size.
+ * (in response to JOIN, PUT and REMOVE requests).
+ */
+#define GNUNET_MESSAGE_TYPE_DATASTORE_SIZE 93
+
+/**
+ * Message sent by datastore client to store data.
+ */
+#define GNUNET_MESSAGE_TYPE_DATASTORE_PUT 94
+
+/**
+ * Message sent by datastore client to get data.
+ */
+#define GNUNET_MESSAGE_TYPE_DATASTORE_GET 95
+
+/**
+ * Message sent by datastore client to get random data.
+ */
+#define GNUNET_MESSAGE_TYPE_DATASTORE_GET_RANDOM 96
+
+/**
+ * Message sent by datastore to client providing requested data
+ * (in response to GET or GET_RANDOM request).
+ */
+#define GNUNET_MESSAGE_TYPE_DATASTORE_DATA 97
+
+/**
+ * Message sent by datastore to client signaling end of matching data.
+ * This message will also be sent for "GET_RANDOM", even though
+ * "GET_RANDOM" returns at most one data item.
+ */
+#define GNUNET_MESSAGE_TYPE_DATASTORE_DATA_END 98
+
+/**
+ * Message sent by datastore client to remove data.
+ */
+#define GNUNET_MESSAGE_TYPE_DATASTORE_REMOVE 99
+
+/**
+ * Message sent by datastore client to drop the database.
+ */
+#define GNUNET_MESSAGE_TYPE_DATASTORE_DROP 100
+
 /*
   TODO:
   - DV
   - DHT
-  - datastores
   - applications (FS, VPN, CHAT, TRACEKIT, TBENCH)
 */