aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_psyc_service.h
diff options
context:
space:
mode:
authorGabor X Toth <*@tg-x.net>2013-09-03 22:33:21 +0000
committerGabor X Toth <*@tg-x.net>2013-09-03 22:33:21 +0000
commiteb9556bf2983ca19a5cbcf7cf460a0b2509b290a (patch)
tree285d31e951f7ecf9308b22257adcadd5b07d80ea /src/include/gnunet_psyc_service.h
parent37bafa60a6f0e447cb5b61547404f0902fa7ad41 (diff)
downloadgnunet-eb9556bf2983ca19a5cbcf7cf460a0b2509b290a.tar.gz
gnunet-eb9556bf2983ca19a5cbcf7cf460a0b2509b290a.zip
PSYCstore SQLite backend; API fixes/enhancements
Diffstat (limited to 'src/include/gnunet_psyc_service.h')
-rw-r--r--src/include/gnunet_psyc_service.h47
1 files changed, 23 insertions, 24 deletions
diff --git a/src/include/gnunet_psyc_service.h b/src/include/gnunet_psyc_service.h
index 8e43b387e..df7a6b4d9 100644
--- a/src/include/gnunet_psyc_service.h
+++ b/src/include/gnunet_psyc_service.h
@@ -208,9 +208,9 @@ struct GNUNET_PSYC_JoinHandle;
208 * @param modifier_count Number of elements in the @a modifiers array. 208 * @param modifier_count Number of elements in the @a modifiers array.
209 * @param modifiers State modifiers and transient variables for the message. 209 * @param modifiers State modifiers and transient variables for the message.
210 * @param data_offset Byte offset of @a data in the overall data of the method. 210 * @param data_offset Byte offset of @a data in the overall data of the method.
211 * @param data_size Number of bytes in @a data.
212 * @param data Data stream given to the method (might not be zero-terminated 211 * @param data Data stream given to the method (might not be zero-terminated
213 * if data is binary). 212 * if data is binary).
213 * @param data_size Number of bytes in @a data.
214 * @param frag Fragmentation status for the data. 214 * @param frag Fragmentation status for the data.
215 */ 215 */
216typedef int 216typedef int
@@ -221,8 +221,8 @@ typedef int
221 size_t modifier_count, 221 size_t modifier_count,
222 const struct GNUNET_ENV_Modifier *modifiers, 222 const struct GNUNET_ENV_Modifier *modifiers,
223 uint64_t data_offset, 223 uint64_t data_offset,
224 size_t data_size,
225 const void *data, 224 const void *data,
225 size_t data_size,
226 enum GNUNET_PSYC_MessageFlags flags); 226 enum GNUNET_PSYC_MessageFlags flags);
227 227
228 228
@@ -234,9 +234,10 @@ typedef int
234 * @param method_name Method name in the join request. 234 * @param method_name Method name in the join request.
235 * @param variable_count Number of elements in the @a variables array. 235 * @param variable_count Number of elements in the @a variables array.
236 * @param variables Transient variables for the join request. 236 * @param variables Transient variables for the join request.
237 * @param data_size Number of bytes in @a data.
238 * @param data Data stream given to the method (might not be zero-terminated 237 * @param data Data stream given to the method (might not be zero-terminated
239 * if data is binary). 238 * if data is binary).
239 * @param data_size Number of bytes in @a data.
240 * @param jh Join handle to use with GNUNET_PSYC_join_decision()
240 */ 241 */
241typedef int 242typedef int
242(*GNUNET_PSYC_JoinCallback) (void *cls, 243(*GNUNET_PSYC_JoinCallback) (void *cls,
@@ -244,8 +245,8 @@ typedef int
244 const char *method_name, 245 const char *method_name,
245 size_t variable_count, 246 size_t variable_count,
246 const struct GNUNET_ENV_Modifier *variables, 247 const struct GNUNET_ENV_Modifier *variables,
247 size_t data_size,
248 const void *data, 248 const void *data,
249 size_t data_size,
249 struct GNUNET_PSYC_JoinHandle *jh); 250 struct GNUNET_PSYC_JoinHandle *jh);
250 251
251 252
@@ -268,8 +269,8 @@ typedef int
268 * peer identity in this array. 269 * peer identity in this array.
269 * @param method_name Method name for the message transmitted with the response. 270 * @param method_name Method name for the message transmitted with the response.
270 * @param env Environment containing transient variables for the message, or NULL. 271 * @param env Environment containing transient variables for the message, or NULL.
271 * @param data_size Size of @a data.
272 * @param data Data of the message. 272 * @param data Data of the message.
273 * @param data_size Size of @a data.
273 */ 274 */
274void 275void
275GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh, 276GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh,
@@ -278,8 +279,8 @@ GNUNET_PSYC_join_decision (struct GNUNET_PSYC_JoinHandle *jh,
278 const struct GNUNET_PeerIdentity *relays, 279 const struct GNUNET_PeerIdentity *relays,
279 const char *method_name, 280 const char *method_name,
280 const struct GNUNET_ENV_Environment *env, 281 const struct GNUNET_ENV_Environment *env,
281 size_t data_size, 282 const void *data,
282 const void *data); 283 size_t data_size);
283 284
284 285
285/** 286/**
@@ -333,21 +334,20 @@ GNUNET_PSYC_master_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
333 * @param cls Closure. 334 * @param cls Closure.
334 * @param message_id Set to the unique message ID that was generated for 335 * @param message_id Set to the unique message ID that was generated for
335 * this message. 336 * this message.
336 * @param[in,out] data_size Initially set to the number of bytes available in @a data, 337 * @param[in,out] data_size Initially set to the number of bytes available in
337 * should be set to the number of bytes written to data (IN/OUT). 338 * @a data, should be set to the number of bytes written to data.
338 * @param[out] data Where to write the body of the message to give to the method; 339 * @param[out] data Where to write the body of the message to give to the
339 * function must copy at most @a *data_size bytes to @a data. 340 * method. The function must copy at most @a data_size bytes to @a data.
340 * @return #GNUNET_SYSERR on error (fatal, aborts transmission) 341 * @return #GNUNET_SYSERR on error (fatal, aborts transmission)
341 * #GNUNET_NO on success, if more data is to be transmitted later 342 * #GNUNET_NO on success, if more data is to be transmitted later
342 * (should be used if @a *data_size was not big enough to take all the data) 343 * (should be used if @a data_size was not big enough to take all the data)
343 * #GNUNET_YES if this completes the transmission (all data supplied) 344 * #GNUNET_YES if this completes the transmission (all data supplied)
344 */ 345 */
345typedef int 346typedef int
346(*GNUNET_PSYC_MasterTransmitNotify)(void *cls, 347(*GNUNET_PSYC_MasterTransmitNotify) (void *cls,
347 uint64_t message_id, 348 uint64_t message_id,
348 size_t *data_size, 349 size_t *data_size,
349 void *data); 350 void *data);
350
351 351
352 352
353/** 353/**
@@ -450,8 +450,8 @@ struct GNUNET_PSYC_Slave;
450 * @param cls Closure for @a method_cb and @a join_cb. 450 * @param cls Closure for @a method_cb and @a join_cb.
451 * @param method_name Method name for the join request. 451 * @param method_name Method name for the join request.
452 * @param env Environment containing transient variables for the request, or NULL. 452 * @param env Environment containing transient variables for the request, or NULL.
453 * @param data_size Number of bytes in @a data.
454 * @param data Payload for the join message. 453 * @param data Payload for the join message.
454 * @param data_size Number of bytes in @a data.
455 * @return Handle for the slave, NULL on error. 455 * @return Handle for the slave, NULL on error.
456 */ 456 */
457struct GNUNET_PSYC_Slave * 457struct GNUNET_PSYC_Slave *
@@ -466,8 +466,8 @@ GNUNET_PSYC_slave_join (const struct GNUNET_CONFIGURATION_Handle *cfg,
466 void *cls, 466 void *cls,
467 const char *method_name, 467 const char *method_name,
468 const struct GNUNET_ENV_Environment *env, 468 const struct GNUNET_ENV_Environment *env,
469 size_t data_size, 469 const void *data,
470 const void *data); 470 size_t data_size);
471 471
472 472
473/** 473/**
@@ -618,7 +618,6 @@ GNUNET_PSYC_channel_slave_add (struct GNUNET_PSYC_Channel *channel,
618 * @param channel Channel handle. 618 * @param channel Channel handle.
619 * @param slave_key Identity of channel slave to remove. 619 * @param slave_key Identity of channel slave to remove.
620 * @param announced_at ID of the message that announced the membership change. 620 * @param announced_at ID of the message that announced the membership change.
621 * @param effective_since Removal of slave is in effect since this message ID.
622 */ 621 */
623void 622void
624GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel, 623GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel,
@@ -632,14 +631,14 @@ GNUNET_PSYC_channel_slave_remove (struct GNUNET_PSYC_Channel *channel,
632 * @param cls Closure. 631 * @param cls Closure.
633 * @param name Name of the state variable. A NULL value indicates that there 632 * @param name Name of the state variable. A NULL value indicates that there
634 * are no more state variables to be returned. 633 * are no more state variables to be returned.
635 * @param value_size Number of bytes in @a value.
636 * @param value Value of the state variable. 634 * @param value Value of the state variable.
635 * @param value_size Number of bytes in @a value.
637 */ 636 */
638typedef void 637typedef void
639(*GNUNET_PSYC_StateCallback) (void *cls, 638(*GNUNET_PSYC_StateCallback) (void *cls,
640 const char *name, 639 const char *name,
641 size_t value_size, 640 const void *value,
642 const void *value); 641 size_t value_size);
643 642
644 643
645/** 644/**