diff options
author | Florian Dold <florian.dold@gmail.com> | 2013-03-07 14:12:11 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2013-03-07 14:12:11 +0000 |
commit | 159e38f1ed94c6b44ca20bc2a78fd5cad7027fd0 (patch) | |
tree | e4e60aec526c9a0ffbe3dd69896d394587e8586a /src/include/gnunet_consensus_service.h | |
parent | 1a17d075effa5fbc3b3521ab0d15b2d035599969 (diff) | |
download | gnunet-159e38f1ed94c6b44ca20bc2a78fd5cad7027fd0.tar.gz gnunet-159e38f1ed94c6b44ca20bc2a78fd5cad7027fd0.zip |
consensus now implemented with primitive conclusion group selection
Diffstat (limited to 'src/include/gnunet_consensus_service.h')
-rw-r--r-- | src/include/gnunet_consensus_service.h | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/src/include/gnunet_consensus_service.h b/src/include/gnunet_consensus_service.h index 55b1a0386..fe35d4794 100644 --- a/src/include/gnunet_consensus_service.h +++ b/src/include/gnunet_consensus_service.h | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | /** | 21 | /** |
22 | * @file include/gnunet_consensus_service.h | 22 | * @file include/gnunet_consensus_service.h |
23 | * @brief | 23 | * @brief multi-peer set reconciliation |
24 | * @author Florian Dold | 24 | * @author Florian Dold |
25 | */ | 25 | */ |
26 | 26 | ||
@@ -65,9 +65,7 @@ struct GNUNET_CONSENSUS_Element | |||
65 | 65 | ||
66 | /** | 66 | /** |
67 | * Called when a new element was received from another peer, or an error occured. | 67 | * Called when a new element was received from another peer, or an error occured. |
68 | * | ||
69 | * May deliver duplicate values. | 68 | * May deliver duplicate values. |
70 | * | ||
71 | * Elements given to a consensus operation by the local peer are NOT given | 69 | * Elements given to a consensus operation by the local peer are NOT given |
72 | * to this callback. | 70 | * to this callback. |
73 | * | 71 | * |
@@ -147,32 +145,17 @@ GNUNET_CONSENSUS_insert (struct GNUNET_CONSENSUS_Handle *consensus, | |||
147 | void *idc_cls); | 145 | void *idc_cls); |
148 | 146 | ||
149 | 147 | ||
150 | /** | ||
151 | * Begin reconciling elements with other peers. | ||
152 | * May not be called if an insert operation has not yet finished. | ||
153 | * | ||
154 | * @param consensus handle for the consensus session | ||
155 | */ | ||
156 | void | ||
157 | GNUNET_CONSENSUS_begin (struct GNUNET_CONSENSUS_Handle *consensus); | ||
158 | |||
159 | |||
160 | |||
161 | struct GNUNET_CONSENSUS_DeltaRequest; | 148 | struct GNUNET_CONSENSUS_DeltaRequest; |
162 | 149 | ||
163 | /** | 150 | /** |
164 | * We are finished inserting new elements into the consensus; | 151 | * FIXME |
165 | * try to conclude the consensus within a given time window. | ||
166 | * | 152 | * |
167 | * @param consensus consensus session | 153 | * @param consensus consensus session |
168 | * @param timeout timeout after which the conculde callback | 154 | * @param remove_element_cb callback that receives the removed elements |
169 | * must be called | 155 | * @return a handle to cancel the request |
170 | * @param conclude called when the conclusion was successful | ||
171 | * @param conclude_cls closure for the conclude callback | ||
172 | */ | 156 | */ |
173 | struct GNUNET_CONSENSUS_DeltaRequest * | 157 | struct GNUNET_CONSENSUS_DeltaRequest * |
174 | GNUNET_CONSENSUS_get_delta (struct GNUNET_CONSENSUS_Handle *consensus, | 158 | GNUNET_CONSENSUS_get_delta (struct GNUNET_CONSENSUS_Handle *consensus, |
175 | uint32_t group_id, | ||
176 | GNUNET_CONSENSUS_ElementCallback remove_element_cb, | 159 | GNUNET_CONSENSUS_ElementCallback remove_element_cb, |
177 | void *remove_element_cb_cls); | 160 | void *remove_element_cb_cls); |
178 | 161 | ||
@@ -194,9 +177,8 @@ struct GNUNET_CONSENSUS_Group | |||
194 | * | 177 | * |
195 | * @param cls | 178 | * @param cls |
196 | * @param group | 179 | * @param group |
197 | * @return GNUNET_YES if more consensus groups should be offered, GNUNET_NO if not | ||
198 | */ | 180 | */ |
199 | typedef int (*GNUNET_CONSENSUS_ConcludeCallback) (void *cls, const struct GNUNET_CONSENSUS_Group *group); | 181 | typedef void (*GNUNET_CONSENSUS_ConcludeCallback) (void *cls, const struct GNUNET_CONSENSUS_Group *group); |
200 | 182 | ||
201 | 183 | ||
202 | /** | 184 | /** |