aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_consensus_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-12-21 13:31:55 +0000
committerChristian Grothoff <christian@grothoff.org>2012-12-21 13:31:55 +0000
commit666cabf224bcbd03de1519820316fa5737f70a9b (patch)
tree662234275e9e9203972fad3960190b608f83703c /src/include/gnunet_consensus_service.h
parent6084aa2ec9cbd2c2460e49fc8b1145ccecdc0e84 (diff)
downloadgnunet-666cabf224bcbd03de1519820316fa5737f70a9b.tar.gz
gnunet-666cabf224bcbd03de1519820316fa5737f70a9b.zip
-API discussion
Diffstat (limited to 'src/include/gnunet_consensus_service.h')
-rw-r--r--src/include/gnunet_consensus_service.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/include/gnunet_consensus_service.h b/src/include/gnunet_consensus_service.h
index 1b812290b..13e75e590 100644
--- a/src/include/gnunet_consensus_service.h
+++ b/src/include/gnunet_consensus_service.h
@@ -154,6 +154,49 @@ GNUNET_CONSENSUS_begin (struct GNUNET_CONSENSUS_Handle *consensus);
154 154
155 155
156 156
157struct GNUNET_CONSENSUS_DeltaRequest;
158
159/**
160 * We are finished inserting new elements into the consensus;
161 * try to conclude the consensus within a given time window.
162 *
163 * @param consensus consensus session
164 * @param timeout timeout after which the conculde callback
165 * must be called
166 * @param conclude called when the conclusion was successful
167 * @param conclude_cls closure for the conclude callback
168 */
169struct GNUNET_CONSENSUS_DeltaRequest *
170GNUNET_CONSENSUS_get_delta (struct GNUNET_CONSENSUS_Handle *consensus,
171 uint32_t group_id,
172 GNUNET_CONSENSUS_NewElementCallback remove_element_cb,
173 void *remove_element_cb_cls);
174
175
176void
177GNUNET_CONSENSUS_get_delta_cancel (struct GNUNET_CONSENSUS_DeltaRequest *dr);
178
179
180struct GNUNET_CONSENSUS_Group
181{
182 uint32_t group_id; /* offset into groups? */
183 unsigned int num_members;
184 uint64_t total_elements_in_group;
185 const struct GNUNET_PeerIdentity **members;
186};
187
188
189/**
190 * Called when a conclusion was successful.
191 *
192 * @param cls
193 * @param num_peers_in_consensus
194 * @param peers_in_consensus
195 */
196typedef void (*GNUNET_CONSENSUS_NewConcludeCallback) (void *cls,
197 unsigned int consensus_group_count,
198 const struct GNUNET_CONSENSUS_Group *groups);
199
157 200
158/** 201/**
159 * Called when a conclusion was successful. 202 * Called when a conclusion was successful.