diff options
author | Omar Tarabai <tarabai@devegypt.com> | 2014-05-17 16:57:49 +0000 |
---|---|---|
committer | Omar Tarabai <tarabai@devegypt.com> | 2014-05-17 16:57:49 +0000 |
commit | 7eb684ec9f93d52ebae09729fcf01c16580b5cb9 (patch) | |
tree | 72a44f01de2dc157f47a0a70ccb90d36154ddcbf /src/peerstore/peerstore_common.h | |
parent | 83c058a5ea11b6d7aa05cb71963c6063cb373603 (diff) | |
download | gnunet-7eb684ec9f93d52ebae09729fcf01c16580b5cb9.tar.gz gnunet-7eb684ec9f93d52ebae09729fcf01c16580b5cb9.zip |
peestore: towards iterate functionality
Diffstat (limited to 'src/peerstore/peerstore_common.h')
-rw-r--r-- | src/peerstore/peerstore_common.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/peerstore/peerstore_common.h b/src/peerstore/peerstore_common.h index a15302ed4..cd918497b 100644 --- a/src/peerstore/peerstore_common.h +++ b/src/peerstore/peerstore_common.h | |||
@@ -27,6 +27,27 @@ | |||
27 | #include "peerstore.h" | 27 | #include "peerstore.h" |
28 | 28 | ||
29 | /** | 29 | /** |
30 | * Creates a record message ready to be sent | ||
31 | * | ||
32 | * @param sub_system sub system string | ||
33 | * @param peer Peer identity (can be NULL) | ||
34 | * @param key record key string (can be NULL) | ||
35 | * @param value record value BLOB (can be NULL) | ||
36 | * @param value_size record value size in bytes (set to 0 if value is NULL) | ||
37 | * @param expiry absolute time after which the record expires | ||
38 | * @param msg_type message type to be set in header | ||
39 | * @return pointer to record message struct | ||
40 | */ | ||
41 | struct StoreRecordMessage * | ||
42 | PEERSTORE_create_record_message(const char *sub_system, | ||
43 | const struct GNUNET_PeerIdentity *peer, | ||
44 | const char *key, | ||
45 | const void *value, | ||
46 | size_t value_size, | ||
47 | struct GNUNET_TIME_Absolute *expiry, | ||
48 | uint16_t msg_type); | ||
49 | |||
50 | /** | ||
30 | * Creates a MQ envelope for a single record | 51 | * Creates a MQ envelope for a single record |
31 | * | 52 | * |
32 | * @param sub_system sub system string | 53 | * @param sub_system sub system string |
@@ -44,7 +65,7 @@ PEERSTORE_create_record_mq_envelope(const char *sub_system, | |||
44 | const char *key, | 65 | const char *key, |
45 | const void *value, | 66 | const void *value, |
46 | size_t value_size, | 67 | size_t value_size, |
47 | struct GNUNET_TIME_Absolute expiry, | 68 | struct GNUNET_TIME_Absolute *expiry, |
48 | uint16_t msg_type); | 69 | uint16_t msg_type); |
49 | 70 | ||
50 | /** | 71 | /** |