diff options
author | Gabor X Toth <*@tg-x.net> | 2014-07-27 13:17:03 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2014-07-27 13:17:03 +0000 |
commit | b63820a52b63d264bead047d0d6f4b76a94c4030 (patch) | |
tree | a678202b91694d3582ae61c57a7badac483693d1 /src/include | |
parent | 2f0367bf715c7c0abd12b3e167f329311a35f6e2 (diff) | |
download | gnunet-b63820a52b63d264bead047d0d6f4b76a94c4030.tar.gz gnunet-b63820a52b63d264bead047d0d6f4b76a94c4030.zip |
psyc: membership store
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_protocols.h | 7 | ||||
-rw-r--r-- | src/include/gnunet_psycstore_service.h | 57 |
2 files changed, 39 insertions, 25 deletions
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index 4063b2efd..5626e1e5e 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h | |||
@@ -2152,11 +2152,10 @@ extern "C" | |||
2152 | #define GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION 688 | 2152 | #define GNUNET_MESSAGE_TYPE_PSYC_JOIN_DECISION 688 |
2153 | 2153 | ||
2154 | 2154 | ||
2155 | /** C->S: request to remove channel slave from the membership database. */ | 2155 | /** C->S: request to add/remove channel slave in the membership database. */ |
2156 | #define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_SLAVE_ADD 689 | 2156 | #define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_MEMBERSHIP_STORE 689 |
2157 | 2157 | ||
2158 | /** C->S: request to add channel slave to the membership database */ | 2158 | /* 690 */ |
2159 | #define GNUNET_MESSAGE_TYPE_PSYC_CHANNEL_SLAVE_RM 690 | ||
2160 | 2159 | ||
2161 | /** S<--C: PSYC message which contains one or more message parts. */ | 2160 | /** S<--C: PSYC message which contains one or more message parts. */ |
2162 | #define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE 691 | 2161 | #define GNUNET_MESSAGE_TYPE_PSYC_MESSAGE 691 |
diff --git a/src/include/gnunet_psycstore_service.h b/src/include/gnunet_psycstore_service.h index 5a9969bce..84d69c24d 100644 --- a/src/include/gnunet_psycstore_service.h +++ b/src/include/gnunet_psycstore_service.h | |||
@@ -121,18 +121,27 @@ typedef void | |||
121 | * Store join/leave events for a PSYC channel in order to be able to answer | 121 | * Store join/leave events for a PSYC channel in order to be able to answer |
122 | * membership test queries later. | 122 | * membership test queries later. |
123 | * | 123 | * |
124 | * @param h Handle for the PSYCstore. | 124 | * @param h |
125 | * @param channel_key The channel where the event happened. | 125 | * Handle for the PSYCstore. |
126 | * @param slave_key Public key of joining/leaving slave. | 126 | * @param channel_key |
127 | * @param did_join #GNUNET_YES on join, #GNUNET_NO on part. | 127 | * The channel where the event happened. |
128 | * @param announced_at ID of the message that announced the membership change. | 128 | * @param slave_key |
129 | * @param effective_since Message ID this membership change is in effect since. | 129 | * Public key of joining/leaving slave. |
130 | * @param did_join | ||
131 | * #GNUNET_YES on join, #GNUNET_NO on part. | ||
132 | * @param announced_at | ||
133 | * ID of the message that announced the membership change. | ||
134 | * @param effective_since | ||
135 | * Message ID this membership change is in effect since. | ||
130 | * For joins it is <= announced_at, for parts it is always 0. | 136 | * For joins it is <= announced_at, for parts it is always 0. |
131 | * @param group_generation In case of a part, the last group generation the | 137 | * @param group_generation |
132 | * slave has access to. It has relevance when a larger message have | 138 | * In case of a part, the last group generation the slave has access to. |
133 | * fragments with different group generations. | 139 | * It has relevance when a larger message have fragments with different |
134 | * @param rcb Callback to call with the result of the storage operation. | 140 | * group generations. |
135 | * @param rcb_cls Closure for the callback. | 141 | * @param rcb |
142 | * Callback to call with the result of the storage operation. | ||
143 | * @param rcb_cls | ||
144 | * Closure for the callback. | ||
136 | * | 145 | * |
137 | * @return Operation handle that can be used to cancel the operation. | 146 | * @return Operation handle that can be used to cancel the operation. |
138 | */ | 147 | */ |
@@ -156,16 +165,22 @@ GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h, | |||
156 | * is also used when handling join requests to determine whether the slave is | 165 | * is also used when handling join requests to determine whether the slave is |
157 | * currently admitted to the channel. | 166 | * currently admitted to the channel. |
158 | * | 167 | * |
159 | * @param h Handle for the PSYCstore. | 168 | * @param h |
160 | * @param channel_key The channel we are interested in. | 169 | * Handle for the PSYCstore. |
161 | * @param slave_key Public key of slave whose membership to check. | 170 | * @param channel_key |
162 | * @param message_id Message ID for which to do the membership test. | 171 | * The channel we are interested in. |
163 | * @param group_generation Group generation of the fragment of the message to | 172 | * @param slave_key |
164 | * test. It has relevance if the message consists of multiple fragments | 173 | * Public key of slave whose membership to check. |
165 | * with different group generations. | 174 | * @param message_id |
166 | * FIXME: not needed if there are no overlapping messages. | 175 | * Message ID for which to do the membership test. |
167 | * @param rcb Callback to call with the test result. | 176 | * @param group_generation |
168 | * @param rcb_cls Closure for the callback. | 177 | * Group generation of the fragment of the message to test. |
178 | * It has relevance if the message consists of multiple fragments with | ||
179 | * different group generations. | ||
180 | * @param rcb | ||
181 | * Callback to call with the test result. | ||
182 | * @param rcb_cls | ||
183 | * Closure for the callback. | ||
169 | * | 184 | * |
170 | * @return Operation handle that can be used to cancel the operation. | 185 | * @return Operation handle that can be used to cancel the operation. |
171 | */ | 186 | */ |