aboutsummaryrefslogtreecommitdiff
path: root/src/peerstore/peerstore_common.h
diff options
context:
space:
mode:
authorOmar Tarabai <tarabai@devegypt.com>2014-05-17 16:57:49 +0000
committerOmar Tarabai <tarabai@devegypt.com>2014-05-17 16:57:49 +0000
commit7eb684ec9f93d52ebae09729fcf01c16580b5cb9 (patch)
tree72a44f01de2dc157f47a0a70ccb90d36154ddcbf /src/peerstore/peerstore_common.h
parent83c058a5ea11b6d7aa05cb71963c6063cb373603 (diff)
peestore: towards iterate functionality
Diffstat (limited to 'src/peerstore/peerstore_common.h')
-rw-r--r--src/peerstore/peerstore_common.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/peerstore/peerstore_common.h b/src/peerstore/peerstore_common.h
index a15302ed40..cd918497b7 100644
--- a/src/peerstore/peerstore_common.h
+++ b/src/peerstore/peerstore_common.h
@@ -27,6 +27,27 @@
#include "peerstore.h"
/**
+ * Creates a record message ready to be sent
+ *
+ * @param sub_system sub system string
+ * @param peer Peer identity (can be NULL)
+ * @param key record key string (can be NULL)
+ * @param value record value BLOB (can be NULL)
+ * @param value_size record value size in bytes (set to 0 if value is NULL)
+ * @param expiry absolute time after which the record expires
+ * @param msg_type message type to be set in header
+ * @return pointer to record message struct
+ */
+struct StoreRecordMessage *
+PEERSTORE_create_record_message(const char *sub_system,
+ const struct GNUNET_PeerIdentity *peer,
+ const char *key,
+ const void *value,
+ size_t value_size,
+ struct GNUNET_TIME_Absolute *expiry,
+ uint16_t msg_type);
+
+/**
* Creates a MQ envelope for a single record
*
* @param sub_system sub system string
@@ -44,7 +65,7 @@ PEERSTORE_create_record_mq_envelope(const char *sub_system,
const char *key,
const void *value,
size_t value_size,
- struct GNUNET_TIME_Absolute expiry,
+ struct GNUNET_TIME_Absolute *expiry,
uint16_t msg_type);
/**