*/
/**
- * @file datastore/datastore.hc
+ * @file datastore/datastore.h
* @brief structs for communication between datastore service and API
* @author Christian Grothoff
*/
#ifndef DATASTORE_H
#define DATASTORE_H
+#define DEBUG_DATASTORE GNUNET_YES
+
#include "gnunet_util_lib.h"
/**
struct GNUNET_MessageHeader header;
/**
- * Always zero.
+ * Number of items to reserve.
*/
- uint32_t reserved GNUNET_PACKED;
+ uint32_t entries GNUNET_PACKED;
/**
* Number of bytes to reserve.
*/
- uint64_t size GNUNET_PACKED;
-
- /**
- * Number of items to reserve.
- */
- uint64_t items GNUNET_PACKED;
+ uint64_t amount GNUNET_PACKED;
};
struct GNUNET_MessageHeader header;
/**
- * Status code.
+ * Status code, -1 for errors.
*/
int32_t status GNUNET_PACKED;
uint32_t anonymity GNUNET_PACKED;
/**
- * Unique ID for the content (can be used for UPDATE).
+ * Unique ID for the content (can be used for UPDATE);
+ * can be zero for remove (which indicates that
+ * the datastore should use whatever UID matches
+ * the key and content).
*/
uint64_t uid;