diff options
author | Florian Dold <florian.dold@gmail.com> | 2013-01-17 00:59:46 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2013-01-17 00:59:46 +0000 |
commit | 197e2b90cb1b166b613033e07a659eac0f811b07 (patch) | |
tree | 87c05c96c663559ce9ae37226eaeb125126c301f /src | |
parent | 21273cba1880b1081b4152ee45b2f4ad6768e639 (diff) | |
download | gnunet-197e2b90cb1b166b613033e07a659eac0f811b07.tar.gz gnunet-197e2b90cb1b166b613033e07a659eac0f811b07.zip |
-public api
Diffstat (limited to 'src')
-rw-r--r-- | src/include/gnunet_consensus_service.h | 15 | ||||
-rw-r--r-- | src/include/gnunet_protocols.h | 7 |
2 files changed, 14 insertions, 8 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 | */ |
79 | typedef int (*GNUNET_CONSENSUS_ElementCallback) (void *cls, | 79 | typedef 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 | ||
180 | struct GNUNET_CONSENSUS_Group | 184 | struct 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 | */ |
196 | typedef void (*GNUNET_CONSENSUS_ConcludeCallback) (void *cls, | 199 | typedef 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 | /** |
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 03d510c20..6c351e2eb 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h | |||
@@ -1681,7 +1681,12 @@ extern "C" | |||
1681 | /** | 1681 | /** |
1682 | * Elements, and requests for further elements | 1682 | * Elements, and requests for further elements |
1683 | */ | 1683 | */ |
1684 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ELEMENTS_AND_REQUESTS 543 | 1684 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_ELEMENTS 543 |
1685 | |||
1686 | /* | ||
1687 | * Initialization message for consensus p2p communication. | ||
1688 | */ | ||
1689 | #define GNUNET_MESSAGE_TYPE_CONSENSUS_P2P_HELLO 544 | ||
1685 | 1690 | ||
1686 | 1691 | ||
1687 | /** | 1692 | /** |