diff options
author | Gabor X Toth <*@tg-x.net> | 2013-08-11 23:46:26 +0000 |
---|---|---|
committer | Gabor X Toth <*@tg-x.net> | 2013-08-11 23:46:26 +0000 |
commit | 5d7126e2dcfe6f8130b8b703f4363bf5d6089272 (patch) | |
tree | 32670dd1c1caa21e19306088696eabd4d575b277 /src/include/gnunet_psycstore_service.h | |
parent | b0c337c0b91e0301baf7cf07b91611284dcfd315 (diff) | |
download | gnunet-5d7126e2dcfe6f8130b8b703f4363bf5d6089272.tar.gz gnunet-5d7126e2dcfe6f8130b8b703f4363bf5d6089272.zip |
social: use full pubkey as place/nym id; multicast/psyc/store: identify members by their pubkey here too
Diffstat (limited to 'src/include/gnunet_psycstore_service.h')
-rw-r--r-- | src/include/gnunet_psycstore_service.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/include/gnunet_psycstore_service.h b/src/include/gnunet_psycstore_service.h index 864b95105..f243fdc70 100644 --- a/src/include/gnunet_psycstore_service.h +++ b/src/include/gnunet_psycstore_service.h | |||
@@ -77,36 +77,36 @@ struct GNUNET_PSYCSTORE_OperationHandle; | |||
77 | 77 | ||
78 | /** | 78 | /** |
79 | * Function called with the result of an asynchronous operation. | 79 | * Function called with the result of an asynchronous operation. |
80 | ; * | 80 | * |
81 | * @param result #GNUNET_SYSERR on error, | 81 | * @param result #GNUNET_SYSERR on error, |
82 | * #GNUNET_YES on success or if the peer was a member, | 82 | * #GNUNET_YES on success or if the peer was a member, |
83 | * #GNUNET_NO if the peer was not a member | 83 | * #GNUNET_NO if the peer was not a member |
84 | */ | 84 | */ |
85 | typedef void (*GNUNET_PSYCSTORE_ContinuationCallback)(void *cls, | 85 | typedef void (*GNUNET_PSYCSTORE_ResultCallback)(void *cls, |
86 | int result); | 86 | int result); |
87 | 87 | ||
88 | /** | 88 | /** |
89 | * Store join/leave events for a PSYC channel in order to be able to answer | 89 | * Store join/leave events for a PSYC channel in order to be able to answer |
90 | * membership test queries later. | 90 | * membership test queries later. |
91 | * | 91 | * |
92 | * @param h Handle for the PSYCstore. | 92 | * @param h Handle for the PSYCstore. |
93 | * @param channel_id ID of the channel where the event happened. | 93 | * @param channel_key The channel where the event happened. |
94 | * @param slave_key Public key of joining/leaving slave. | ||
94 | * @param message_id ID of the message in which this event was announced. | 95 | * @param message_id ID of the message in which this event was announced. |
95 | * @param peer Identity of joining/leaving peer. | ||
96 | * @param did_join #GNUNET_YES on join, #GNUNET_NO on leave. | 96 | * @param did_join #GNUNET_YES on join, #GNUNET_NO on leave. |
97 | * @param ccb Callback to call with the result of the storage operation. | 97 | * @param rcb Callback to call with the result of the storage operation. |
98 | * @param ccb_cls Closure for the callback. | 98 | * @param rcb_cls Closure for the callback. |
99 | * | 99 | * |
100 | * @return Operation handle that can be used to cancel the operation. | 100 | * @return Operation handle that can be used to cancel the operation. |
101 | */ | 101 | */ |
102 | struct GNUNET_PSYCSTORE_OperationHandle * | 102 | struct GNUNET_PSYCSTORE_OperationHandle * |
103 | GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h, | 103 | GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h, |
104 | const struct GNUNET_HashCode *channel_id, | 104 | const struct GNUNET_CRYPTO_EccPublicKey *channel_key, |
105 | const struct GNUNET_CRYPTO_EccPublicKey *slave_key, | ||
105 | uint64_t message_id, | 106 | uint64_t message_id, |
106 | const struct GNUNET_PeerIdentity *peer, | ||
107 | int did_join, | 107 | int did_join, |
108 | GNUNET_PSYCSTORE_ContinuationCallback ccb, | 108 | GNUNET_PSYCSTORE_ResultCallback rcb, |
109 | void *ccb_cls); | 109 | void *rcb_cls); |
110 | 110 | ||
111 | 111 | ||
112 | /** | 112 | /** |
@@ -117,40 +117,40 @@ GNUNET_PSYCSTORE_membership_store (struct GNUNET_PSYCSTORE_Handle *h, | |||
117 | * to see the requested message. | 117 | * to see the requested message. |
118 | * | 118 | * |
119 | * @param h Handle for the PSYCstore. | 119 | * @param h Handle for the PSYCstore. |
120 | * @param channel_id The channel we are interested in. | 120 | * @param channel_key The channel we are interested in. |
121 | * @param slave_key Public key of slave whose membership to check. | ||
121 | * @param fragment_id Message fragment ID to check. | 122 | * @param fragment_id Message fragment ID to check. |
122 | * @param peer Peer whose membership to check. | 123 | * @param rcb Callback to call with the test result. |
123 | * @param ccb Callback to call with the test result. | 124 | * @param rcb_cls Closure for the callback. |
124 | * @param ccb_cls Closure for the callback. | ||
125 | * | 125 | * |
126 | * @return Operation handle that can be used to cancel the operation. | 126 | * @return Operation handle that can be used to cancel the operation. |
127 | */ | 127 | */ |
128 | struct GNUNET_PSYCSTORE_OperationHandle * | 128 | struct GNUNET_PSYCSTORE_OperationHandle * |
129 | GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h, | 129 | GNUNET_PSYCSTORE_membership_test (struct GNUNET_PSYCSTORE_Handle *h, |
130 | const struct GNUNET_HashCode *channel_id, | 130 | const struct GNUNET_CRYPTO_EccPublicKey *channel_key, |
131 | const struct GNUNET_CRYPTO_EccPublicKey *slave_key, | ||
131 | uint64_t fragment_id, | 132 | uint64_t fragment_id, |
132 | const struct GNUNET_PeerIdentity *peer, | 133 | GNUNET_PSYCSTORE_ResultCallback rcb, |
133 | GNUNET_PSYCSTORE_ContinuationCallback ccb, | 134 | void *rcb_cls); |
134 | void *ccb_cls); | ||
135 | 135 | ||
136 | 136 | ||
137 | /** | 137 | /** |
138 | * Store a message fragment sent to a channel. | 138 | * Store a message fragment sent to a channel. |
139 | * | 139 | * |
140 | * @param h Handle for the PSYCstore. | 140 | * @param h Handle for the PSYCstore. |
141 | * @param channel_id The channel the message belongs to. | 141 | * @param channel_key The channel the message belongs to. |
142 | * @param message Message to store. | 142 | * @param message Message to store. |
143 | * @param ccb Callback to call with the result of the operation. | 143 | * @param rcb Callback to call with the result of the operation. |
144 | * @param ccb_cls Closure for the callback. | 144 | * @param rcb_cls Closure for the callback. |
145 | * | 145 | * |
146 | * @return Handle that can be used to cancel the operation. | 146 | * @return Handle that can be used to cancel the operation. |
147 | */ | 147 | */ |
148 | struct GNUNET_PSYCSTORE_OperationHandle * | 148 | struct GNUNET_PSYCSTORE_OperationHandle * |
149 | GNUNET_PSYCSTORE_fragment_store (struct GNUNET_PSYCSTORE_Handle *h, | 149 | GNUNET_PSYCSTORE_fragment_store (struct GNUNET_PSYCSTORE_Handle *h, |
150 | const struct GNUNET_HashCode *channel_id, | 150 | const struct GNUNET_CRYPTO_EccPublicKey *channel_key, |
151 | const struct GNUNET_MULTICAST_MessageHeader *message, | 151 | const struct GNUNET_MULTICAST_MessageHeader *message, |
152 | GNUNET_PSYCSTORE_ContinuationCallback ccb, | 152 | GNUNET_PSYCSTORE_ResultCallback rcb, |
153 | void *ccb_cls); | 153 | void *rcb_cls); |
154 | 154 | ||
155 | 155 | ||
156 | /** | 156 | /** |
@@ -170,7 +170,7 @@ typedef void (*GNUNET_PSYCSTORE_FragmentResultCallback)(void *cls, | |||
170 | * Retrieve a message fragment by fragment ID. | 170 | * Retrieve a message fragment by fragment ID. |
171 | * | 171 | * |
172 | * @param h Handle for the PSYCstore. | 172 | * @param h Handle for the PSYCstore. |
173 | * @param channel_id The channel we are interested in. | 173 | * @param channel_key The channel we are interested in. |
174 | * @param fragment_id Fragment ID to check. Use 0 to get the latest message fragment. | 174 | * @param fragment_id Fragment ID to check. Use 0 to get the latest message fragment. |
175 | * @param rcb Callback to call with the result of the operation. | 175 | * @param rcb Callback to call with the result of the operation. |
176 | * @param rcb_cls Closure for the callback. | 176 | * @param rcb_cls Closure for the callback. |
@@ -179,7 +179,7 @@ typedef void (*GNUNET_PSYCSTORE_FragmentResultCallback)(void *cls, | |||
179 | */ | 179 | */ |
180 | struct GNUNET_PSYCSTORE_OperationHandle * | 180 | struct GNUNET_PSYCSTORE_OperationHandle * |
181 | GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h, | 181 | GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h, |
182 | const struct GNUNET_HashCode *channel_id, | 182 | const struct GNUNET_CRYPTO_EccPublicKey *channel_key, |
183 | uint64_t fragment_id, | 183 | uint64_t fragment_id, |
184 | GNUNET_PSYCSTORE_FragmentResultCallback rcb, | 184 | GNUNET_PSYCSTORE_FragmentResultCallback rcb, |
185 | void *rcb_cls); | 185 | void *rcb_cls); |
@@ -189,7 +189,7 @@ GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h, | |||
189 | * Retrieve a message by ID. | 189 | * Retrieve a message by ID. |
190 | * | 190 | * |
191 | * @param h Handle for the PSYCstore. | 191 | * @param h Handle for the PSYCstore. |
192 | * @param channel_id The channel we are interested in. | 192 | * @param channel_key The channel we are interested in. |
193 | * @param message_id Message ID to check. Use 0 to get the latest message. | 193 | * @param message_id Message ID to check. Use 0 to get the latest message. |
194 | * @param rcb Callback to call with the result of the operation. | 194 | * @param rcb Callback to call with the result of the operation. |
195 | * @param rcb_cls Closure for the callback. | 195 | * @param rcb_cls Closure for the callback. |
@@ -198,7 +198,7 @@ GNUNET_PSYCSTORE_fragment_get (struct GNUNET_PSYCSTORE_Handle *h, | |||
198 | */ | 198 | */ |
199 | struct GNUNET_PSYCSTORE_OperationHandle * | 199 | struct GNUNET_PSYCSTORE_OperationHandle * |
200 | GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h, | 200 | GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h, |
201 | const struct GNUNET_HashCode *channel_id, | 201 | const struct GNUNET_CRYPTO_EccPublicKey *channel_key, |
202 | uint64_t message_id, | 202 | uint64_t message_id, |
203 | GNUNET_PSYCSTORE_FragmentResultCallback rcb, | 203 | GNUNET_PSYCSTORE_FragmentResultCallback rcb, |
204 | void *rcb_cls); | 204 | void *rcb_cls); |
@@ -213,27 +213,27 @@ GNUNET_PSYCSTORE_message_get (struct GNUNET_PSYCSTORE_Handle *h, | |||
213 | * operations before the current one. | 213 | * operations before the current one. |
214 | * | 214 | * |
215 | * @param h Handle for the PSYCstore. | 215 | * @param h Handle for the PSYCstore. |
216 | * @param channel_id The channel we are interested in. | 216 | * @param channel_key The channel we are interested in. |
217 | * @param message_id ID of the message that contains this state modifier. | 217 | * @param message_id ID of the message that contains this state modifier. |
218 | * @param oper Operation to perform. | 218 | * @param oper Operation to perform. |
219 | * @param name Name of variable. | 219 | * @param name Name of variable. |
220 | * @param value_size Size of @a value. | 220 | * @param value_size Size of @a value. |
221 | * @param value Value of variable. | 221 | * @param value Value of variable. |
222 | * @param ccb Callback to call with the result of the operation. | 222 | * @param rcb Callback to call with the result of the operation. |
223 | * @param ccb_cls Closure for the callback. | 223 | * @param rcb_cls Closure for the callback. |
224 | * | 224 | * |
225 | * @return Handle that can be used to cancel the operation. | 225 | * @return Handle that can be used to cancel the operation. |
226 | */ | 226 | */ |
227 | struct GNUNET_PSYCSTORE_OperationHandle * | 227 | struct GNUNET_PSYCSTORE_OperationHandle * |
228 | GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h, | 228 | GNUNET_PSYCSTORE_state_modify (struct GNUNET_PSYCSTORE_Handle *h, |
229 | const struct GNUNET_HashCode *channel_id, | 229 | const struct GNUNET_CRYPTO_EccPublicKey *channel_key, |
230 | uint64_t message_id, | 230 | uint64_t message_id, |
231 | enum GNUNET_ENV_Operator *oper, | 231 | enum GNUNET_ENV_Operator *oper, |
232 | const char *name, | 232 | const char *name, |
233 | size_t value_size, | 233 | size_t value_size, |
234 | const void *value, | 234 | const void *value, |
235 | GNUNET_PSYCSTORE_ContinuationCallback ccb, | 235 | GNUNET_PSYCSTORE_ResultCallback rcb, |
236 | void *ccb_cls); | 236 | void *rcb_cls); |
237 | 237 | ||
238 | 238 | ||
239 | /** | 239 | /** |
@@ -255,7 +255,7 @@ typedef void (*GNUNET_PSYCSTORE_StateResultCallback)(void *cls, | |||
255 | * Retrieve the given state variable for a channel. | 255 | * Retrieve the given state variable for a channel. |
256 | * | 256 | * |
257 | * @param h Handle for the PSYCstore. | 257 | * @param h Handle for the PSYCstore. |
258 | * @param channel_id The channel we are interested in. | 258 | * @param channel_key The channel we are interested in. |
259 | * @param name Name of variable to get. | 259 | * @param name Name of variable to get. |
260 | * @param rcb Callback to call with the result. | 260 | * @param rcb Callback to call with the result. |
261 | * @param rcb_cls Closure for the callback. | 261 | * @param rcb_cls Closure for the callback. |
@@ -264,7 +264,7 @@ typedef void (*GNUNET_PSYCSTORE_StateResultCallback)(void *cls, | |||
264 | */ | 264 | */ |
265 | struct GNUNET_PSYCSTORE_OperationHandle * | 265 | struct GNUNET_PSYCSTORE_OperationHandle * |
266 | GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h, | 266 | GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h, |
267 | const struct GNUNET_HashCode *channel_id, | 267 | const struct GNUNET_CRYPTO_EccPublicKey *channel_key, |
268 | const char *name, | 268 | const char *name, |
269 | GNUNET_PSYCSTORE_StateResultCallback rcb, | 269 | GNUNET_PSYCSTORE_StateResultCallback rcb, |
270 | void *rcb_cls); | 270 | void *rcb_cls); |
@@ -274,7 +274,7 @@ GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h, | |||
274 | * Retrieve all state variables for a channel. | 274 | * Retrieve all state variables for a channel. |
275 | * | 275 | * |
276 | * @param h Handle for the PSYCstore. | 276 | * @param h Handle for the PSYCstore. |
277 | * @param channel_id The channel we are interested in. | 277 | * @param channel_key The channel we are interested in. |
278 | * @param rcb Callback to call with the result. | 278 | * @param rcb Callback to call with the result. |
279 | * @param rcb_cls Closure for the callback. | 279 | * @param rcb_cls Closure for the callback. |
280 | * | 280 | * |
@@ -282,7 +282,7 @@ GNUNET_PSYCSTORE_state_get (struct GNUNET_PSYCSTORE_Handle *h, | |||
282 | */ | 282 | */ |
283 | struct GNUNET_PSYCSTORE_OperationHandle * | 283 | struct GNUNET_PSYCSTORE_OperationHandle * |
284 | GNUNET_PSYCSTORE_state_get_all (struct GNUNET_PSYCSTORE_Handle *h, | 284 | GNUNET_PSYCSTORE_state_get_all (struct GNUNET_PSYCSTORE_Handle *h, |
285 | const struct GNUNET_HashCode *channel_id, | 285 | const struct GNUNET_CRYPTO_EccPublicKey *channel_key, |
286 | GNUNET_PSYCSTORE_StateResultCallback rcb, | 286 | GNUNET_PSYCSTORE_StateResultCallback rcb, |
287 | void *rcb_cls); | 287 | void *rcb_cls); |
288 | 288 | ||