diff options
author | Florian Dold <florian.dold@gmail.com> | 2012-11-26 17:12:24 +0000 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2012-11-26 17:12:24 +0000 |
commit | 691d973ea5dc7e297f598c7261fc2704b381972f (patch) | |
tree | 21c9ea084b305a59f402b17efd5415300c8e8ac1 /src/include/gnunet_consensus_service.h | |
parent | 3c4db5aeee2a22aa38ee8049c3dbbd7fa989bf45 (diff) | |
download | gnunet-691d973ea5dc7e297f598c7261fc2704b381972f.tar.gz gnunet-691d973ea5dc7e297f598c7261fc2704b381972f.zip |
fixed doxygen
Diffstat (limited to 'src/include/gnunet_consensus_service.h')
-rw-r--r-- | src/include/gnunet_consensus_service.h | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/src/include/gnunet_consensus_service.h b/src/include/gnunet_consensus_service.h index 8e2d8f572..bd7e83fe1 100644 --- a/src/include/gnunet_consensus_service.h +++ b/src/include/gnunet_consensus_service.h | |||
@@ -85,6 +85,8 @@ struct GNUNET_CONSENSUS_Handle; | |||
85 | 85 | ||
86 | /** | 86 | /** |
87 | * Create a consensus session. | 87 | * Create a consensus session. |
88 | * The set being reconciled is initially empty. Only reconcile with other peers | ||
89 | * after GNUNET_CONSENSUS_reconcile has been called. | ||
88 | * | 90 | * |
89 | * @param cfg | 91 | * @param cfg |
90 | * @param num_peers | 92 | * @param num_peers |
@@ -92,9 +94,7 @@ struct GNUNET_CONSENSUS_Handle; | |||
92 | * Inclusion of the local peer is optional. | 94 | * Inclusion of the local peer is optional. |
93 | * @param session_id session identifier | 95 | * @param session_id session identifier |
94 | * Allows a group of peers to have more than consensus session. | 96 | * Allows a group of peers to have more than consensus session. |
95 | * @param num_initial_elements number of entries in the 'initial_elements' array | 97 | * @param new_element_cb callback, called when a new element is added to the set by |
96 | * @param initial_elements our elements for the consensus (each of 'element_size' | ||
97 | * @param new_element callback, called when a new element is added to the set by | ||
98 | * another peer | 98 | * another peer |
99 | * @param new_element_cls closure for new_element | 99 | * @param new_element_cls closure for new_element |
100 | * @return handle to use, NULL on error | 100 | * @return handle to use, NULL on error |
@@ -104,11 +104,7 @@ GNUNET_CONSENSUS_create (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
104 | unsigned int num_peers, | 104 | unsigned int num_peers, |
105 | const struct GNUNET_PeerIdentity *peers, | 105 | const struct GNUNET_PeerIdentity *peers, |
106 | const struct GNUNET_HashCode *session_id, | 106 | const struct GNUNET_HashCode *session_id, |
107 | /* | 107 | GNUNET_CONSENSUS_NewElementCallback new_element_cb, |
108 | unsigned int num_initial_elements, | ||
109 | const struct GNUNET_CONSENSUS_Element **initial_elements, | ||
110 | */ | ||
111 | GNUNET_CONSENSUS_NewElementCallback new_element, | ||
112 | void *new_element_cls); | 108 | void *new_element_cls); |
113 | 109 | ||
114 | 110 | ||
@@ -126,8 +122,9 @@ typedef void (*GNUNET_CONSENSUS_InsertDoneCallback) (void *cls, | |||
126 | 122 | ||
127 | 123 | ||
128 | /** | 124 | /** |
129 | * Insert an element in the set being reconsiled. Must not be called after | 125 | * Insert an element in the set being reconsiled. Only transmit changes to |
130 | * "GNUNET_CONSENSUS_conclude". | 126 | * other peers if "GNUNET_CONSENSUS_begin" has been called. |
127 | * Must not be called after "GNUNET_CONSENSUS_conclude". | ||
131 | * | 128 | * |
132 | * @param consensus handle for the consensus session | 129 | * @param consensus handle for the consensus session |
133 | * @param element the element to be inserted | 130 | * @param element the element to be inserted |
@@ -143,6 +140,18 @@ GNUNET_CONSENSUS_insert (struct GNUNET_CONSENSUS_Handle *consensus, | |||
143 | 140 | ||
144 | 141 | ||
145 | /** | 142 | /** |
143 | * Begin reconciling elements with other peers. | ||
144 | * May not be called if an insert operation has not yet finished. | ||
145 | * | ||
146 | * @param consensus handle for the consensus session | ||
147 | */ | ||
148 | void | ||
149 | GNUNET_CONSENSUS_begin (struct GNUNET_CONSENSUS_Handle *consensus); | ||
150 | |||
151 | |||
152 | |||
153 | |||
154 | /** | ||
146 | * Called when a conclusion was successful. | 155 | * Called when a conclusion was successful. |
147 | * | 156 | * |
148 | * @param cls | 157 | * @param cls |