aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_consensus_service.h
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2013-01-17 00:59:46 +0000
committerFlorian Dold <florian.dold@gmail.com>2013-01-17 00:59:46 +0000
commit197e2b90cb1b166b613033e07a659eac0f811b07 (patch)
tree87c05c96c663559ce9ae37226eaeb125126c301f /src/include/gnunet_consensus_service.h
parent21273cba1880b1081b4152ee45b2f4ad6768e639 (diff)
downloadgnunet-197e2b90cb1b166b613033e07a659eac0f811b07.tar.gz
gnunet-197e2b90cb1b166b613033e07a659eac0f811b07.zip
-public api
Diffstat (limited to 'src/include/gnunet_consensus_service.h')
-rw-r--r--src/include/gnunet_consensus_service.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/include/gnunet_consensus_service.h b/src/include/gnunet_consensus_service.h
index 951f9a031..55b1a0386 100644
--- a/src/include/gnunet_consensus_service.h
+++ b/src/include/gnunet_consensus_service.h
@@ -77,7 +77,7 @@ struct GNUNET_CONSENSUS_Element
77 * GNUNET_SYSERR if the element should be ignored and not be propagated 77 * GNUNET_SYSERR if the element should be ignored and not be propagated
78 */ 78 */
79typedef int (*GNUNET_CONSENSUS_ElementCallback) (void *cls, 79typedef int (*GNUNET_CONSENSUS_ElementCallback) (void *cls,
80 struct GNUNET_CONSENSUS_Element *element); 80 struct GNUNET_CONSENSUS_Element *element);
81 81
82 82
83 83
@@ -116,6 +116,8 @@ GNUNET_CONSENSUS_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
116 * Called when an insertion (transmission to consensus service, 116 * Called when an insertion (transmission to consensus service,
117 * which does not imply fully consensus on this element with 117 * which does not imply fully consensus on this element with
118 * all other peers) was successful. 118 * all other peers) was successful.
119 * May not call GNUNET_CONSENSUS_destroy; schedule a task to call
120 * GNUNET_CONSENSUS_destroy instead.
119 * 121 *
120 * @param cls 122 * @param cls
121 * @param success GNUNET_OK on success, GNUNET_SYSERR if 123 * @param success GNUNET_OK on success, GNUNET_SYSERR if
@@ -129,6 +131,8 @@ typedef void (*GNUNET_CONSENSUS_InsertDoneCallback) (void *cls,
129 * Insert an element in the set being reconsiled. Only transmit changes to 131 * Insert an element in the set being reconsiled. Only transmit changes to
130 * other peers if "GNUNET_CONSENSUS_begin" has been called. 132 * other peers if "GNUNET_CONSENSUS_begin" has been called.
131 * Must not be called after "GNUNET_CONSENSUS_conclude". 133 * Must not be called after "GNUNET_CONSENSUS_conclude".
134 * May not call GNUNET_CONSENSUS_destroy; schedule a task to call
135 * GNUNET_CONSENSUS_destroy instead.
132 * 136 *
133 * @param consensus handle for the consensus session 137 * @param consensus handle for the consensus session
134 * @param element the element to be inserted 138 * @param element the element to be inserted
@@ -179,7 +183,6 @@ GNUNET_CONSENSUS_get_delta_cancel (struct GNUNET_CONSENSUS_DeltaRequest *dr);
179 183
180struct GNUNET_CONSENSUS_Group 184struct GNUNET_CONSENSUS_Group
181{ 185{
182 uint32_t group_id; /* offset into groups? */
183 unsigned int num_members; 186 unsigned int num_members;
184 uint64_t total_elements_in_group; 187 uint64_t total_elements_in_group;
185 const struct GNUNET_PeerIdentity **members; 188 const struct GNUNET_PeerIdentity **members;
@@ -190,12 +193,10 @@ struct GNUNET_CONSENSUS_Group
190 * Called when a conclusion was successful. 193 * Called when a conclusion was successful.
191 * 194 *
192 * @param cls 195 * @param cls
193 * @param num_peers_in_consensus 196 * @param group
194 * @param peers_in_consensus 197 * @return GNUNET_YES if more consensus groups should be offered, GNUNET_NO if not
195 */ 198 */
196typedef void (*GNUNET_CONSENSUS_ConcludeCallback) (void *cls, 199typedef int (*GNUNET_CONSENSUS_ConcludeCallback) (void *cls, const struct GNUNET_CONSENSUS_Group *group);
197 unsigned int consensus_group_count,
198 const struct GNUNET_CONSENSUS_Group *groups);
199 200
200 201
201/** 202/**