diff options
author | Omar Tarabai <tarabai@devegypt.com> | 2014-05-14 16:40:45 +0000 |
---|---|---|
committer | Omar Tarabai <tarabai@devegypt.com> | 2014-05-14 16:40:45 +0000 |
commit | a760c1b877f3a9ac17f2577cdc298f793c574407 (patch) | |
tree | 7411c99a1865aa1b1a6e1141172aa9a1378d4db7 /src/include/gnunet_peerstore_plugin.h | |
parent | cb67c0bb1e6f2a5bae0295a75bc1f4b1b9f9f765 (diff) | |
download | gnunet-a760c1b877f3a9ac17f2577cdc298f793c574407.tar.gz gnunet-a760c1b877f3a9ac17f2577cdc298f793c574407.zip |
peerstore helper file
Diffstat (limited to 'src/include/gnunet_peerstore_plugin.h')
-rw-r--r-- | src/include/gnunet_peerstore_plugin.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/include/gnunet_peerstore_plugin.h b/src/include/gnunet_peerstore_plugin.h index bf69675e4..9371f6931 100644 --- a/src/include/gnunet_peerstore_plugin.h +++ b/src/include/gnunet_peerstore_plugin.h | |||
@@ -48,8 +48,9 @@ extern "C" | |||
48 | * @param size size of stored value | 48 | * @param size size of stored value |
49 | */ | 49 | */ |
50 | typedef void (*GNUNET_PEERSTORE_RecordIterator) (void *cls, | 50 | typedef void (*GNUNET_PEERSTORE_RecordIterator) (void *cls, |
51 | const struct GNUNET_PeerIdentity *peer, | ||
52 | const char *sub_system, | 51 | const char *sub_system, |
52 | const struct GNUNET_PeerIdentity *peer, | ||
53 | const char *key, | ||
53 | const void *value, | 54 | const void *value, |
54 | size_t size); | 55 | size_t size); |
55 | 56 | ||
@@ -86,19 +87,21 @@ struct GNUNET_PEERSTORE_PluginFunctions | |||
86 | 87 | ||
87 | /** | 88 | /** |
88 | * Iterate over the records given an optional peer id | 89 | * Iterate over the records given an optional peer id |
89 | * and/or sub system. | 90 | * and/or key. |
90 | * | 91 | * |
91 | * @param cls closure (internal context for the plugin) | 92 | * @param cls closure (internal context for the plugin) |
93 | * @param sub_system name of sub system | ||
92 | * @param peer Peer identity (can be NULL) | 94 | * @param peer Peer identity (can be NULL) |
93 | * @param sub_system name of sub system (can be NULL) | 95 | * @param key entry key string (can be NULL) |
94 | * @param iter function to call with the result | 96 | * @param iter function to call with the result |
95 | * @param iter_cls closure for @a iter | 97 | * @param iter_cls closure for @a iter |
96 | * @return #GNUNET_OK on success, #GNUNET_NO if there were no results, #GNUNET_SYSERR on error | 98 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
97 | */ | 99 | */ |
98 | int | 100 | int |
99 | (*iterate_records) (void *cls, | 101 | (*iterate_records) (void *cls, |
100 | const struct GNUNET_PeerIdentity *peer, | ||
101 | const char *sub_system, | 102 | const char *sub_system, |
103 | const struct GNUNET_PeerIdentity *peer, | ||
104 | const char *key, | ||
102 | GNUNET_PEERSTORE_RecordIterator iter, void *iter_cls); | 105 | GNUNET_PEERSTORE_RecordIterator iter, void *iter_cls); |
103 | 106 | ||
104 | }; | 107 | }; |