diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-08-15 10:25:25 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-08-15 10:25:25 +0000 |
commit | 8b99bff307642ab05bea6601bae3d11a9cd457a0 (patch) | |
tree | 475868b34046ba9491811cb3a7167afb4f363968 /src/include | |
parent | 3c8feec5381491be406c1032fb72464b0f177a1d (diff) | |
download | gnunet-8b99bff307642ab05bea6601bae3d11a9cd457a0.tar.gz gnunet-8b99bff307642ab05bea6601bae3d11a9cd457a0.zip |
-fixing #2993
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_namestore_plugin.h | 2 | ||||
-rw-r--r-- | src/include/gnunet_namestore_service.h | 50 |
2 files changed, 25 insertions, 27 deletions
diff --git a/src/include/gnunet_namestore_plugin.h b/src/include/gnunet_namestore_plugin.h index 9a6a00462..5ab374ed0 100644 --- a/src/include/gnunet_namestore_plugin.h +++ b/src/include/gnunet_namestore_plugin.h | |||
@@ -77,7 +77,7 @@ struct GNUNET_NAMESTORE_PluginFunctions | |||
77 | void *cls; | 77 | void *cls; |
78 | 78 | ||
79 | /** | 79 | /** |
80 | * Cache a block in the datastore. Overwrites (older) existing blocks | 80 | * Cache a block in the datastore. Overwrites existing blocks |
81 | * for the same zone and label. | 81 | * for the same zone and label. |
82 | * | 82 | * |
83 | * @param cls closure (internal context for the plugin) | 83 | * @param cls closure (internal context for the plugin) |
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h index 5b622e6f2..853352109 100644 --- a/src/include/gnunet_namestore_service.h +++ b/src/include/gnunet_namestore_service.h | |||
@@ -272,7 +272,7 @@ GNUNET_NETWORK_STRUCT_END | |||
272 | * @param h handle to the namestore | 272 | * @param h handle to the namestore |
273 | * @param block block to store | 273 | * @param block block to store |
274 | * @param cont continuation to call when done | 274 | * @param cont continuation to call when done |
275 | * @param cont_cls closure for cont | 275 | * @param cont_cls closure for @a cont |
276 | * @return handle to abort the request | 276 | * @return handle to abort the request |
277 | */ | 277 | */ |
278 | struct GNUNET_NAMESTORE_QueueEntry * | 278 | struct GNUNET_NAMESTORE_QueueEntry * |
@@ -293,7 +293,7 @@ GNUNET_NAMESTORE_block_cache (struct GNUNET_NAMESTORE_Handle *h, | |||
293 | * @param rd_count number of records in the 'rd' array | 293 | * @param rd_count number of records in the 'rd' array |
294 | * @param rd array of records with data to store | 294 | * @param rd array of records with data to store |
295 | * @param cont continuation to call when done | 295 | * @param cont continuation to call when done |
296 | * @param cont_cls closure for 'cont' | 296 | * @param cont_cls closure for @a cont |
297 | * @return handle to abort the request | 297 | * @return handle to abort the request |
298 | */ | 298 | */ |
299 | struct GNUNET_NAMESTORE_QueueEntry * | 299 | struct GNUNET_NAMESTORE_QueueEntry * |
@@ -339,7 +339,7 @@ GNUNET_NAMESTORE_lookup_block (struct GNUNET_NAMESTORE_Handle *h, | |||
339 | * @param cls closure | 339 | * @param cls closure |
340 | * @param zone private key of the zone | 340 | * @param zone private key of the zone |
341 | * @param label label of the records | 341 | * @param label label of the records |
342 | * @param rd_count number of entries in 'rd' array | 342 | * @param rd_count number of entries in @a rd array |
343 | * @param rd array of records with data to store | 343 | * @param rd array of records with data to store |
344 | */ | 344 | */ |
345 | typedef void (*GNUNET_NAMESTORE_RecordMonitor) (void *cls, | 345 | typedef void (*GNUNET_NAMESTORE_RecordMonitor) (void *cls, |
@@ -414,7 +414,7 @@ GNUNET_NAMESTORE_zone_iteration_start (struct GNUNET_NAMESTORE_Handle *h, | |||
414 | 414 | ||
415 | 415 | ||
416 | /** | 416 | /** |
417 | * Calls the record processor specified in GNUNET_NAMESTORE_zone_iteration_start | 417 | * Calls the record processor specified in #GNUNET_NAMESTORE_zone_iteration_start |
418 | * for the next record. | 418 | * for the next record. |
419 | * | 419 | * |
420 | * @param it the iterator | 420 | * @param it the iterator |
@@ -452,10 +452,10 @@ typedef void (*GNUNET_NAMESTORE_RecordsSynchronizedCallback)(void *cls); | |||
452 | 452 | ||
453 | 453 | ||
454 | /** | 454 | /** |
455 | * Begin monitoring a zone for changes. Will first call the 'monitor' function | 455 | * Begin monitoring a zone for changes. Will first call the @a monitor function |
456 | * on all existing records in the selected zone(s), then calls 'sync_cb', | 456 | * on all existing records in the selected zone(s), then calls @a sync_cb, |
457 | * and then calls the 'monitor' whenever a record changes. If the namestore | 457 | * and then calls the @a monitor whenever a record changes. If the namestore |
458 | * disconnects, the 'monitor' function is called with a disconnect event; if | 458 | * disconnects, the @a monitor function is called with a disconnect event; if |
459 | * the connection is re-established, the process begins from the start (all | 459 | * the connection is re-established, the process begins from the start (all |
460 | * existing records, sync, then updates). | 460 | * existing records, sync, then updates). |
461 | * | 461 | * |
@@ -463,7 +463,7 @@ typedef void (*GNUNET_NAMESTORE_RecordsSynchronizedCallback)(void *cls); | |||
463 | * @param zone zone to monitor | 463 | * @param zone zone to monitor |
464 | * @param monitor function to call on zone changes | 464 | * @param monitor function to call on zone changes |
465 | * @param sync_cb function called when we're in sync with the namestore | 465 | * @param sync_cb function called when we're in sync with the namestore |
466 | * @param cls closure for 'monitor' and 'sync_cb' | 466 | * @param cls closure for @a monitor' and @a sync_cb |
467 | * @return handle to stop monitoring | 467 | * @return handle to stop monitoring |
468 | */ | 468 | */ |
469 | struct GNUNET_NAMESTORE_ZoneMonitor * | 469 | struct GNUNET_NAMESTORE_ZoneMonitor * |
@@ -489,11 +489,9 @@ GNUNET_NAMESTORE_zone_monitor_stop (struct GNUNET_NAMESTORE_ZoneMonitor *zm); | |||
489 | * Calculate how many bytes we will need to serialize the given | 489 | * Calculate how many bytes we will need to serialize the given |
490 | * records. | 490 | * records. |
491 | * | 491 | * |
492 | * @param rd_count number of records in the rd array | 492 | * @param rd_count number of records in the @a rd array |
493 | * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements | 493 | * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements |
494 | * | ||
495 | * @return the required size to serialize | 494 | * @return the required size to serialize |
496 | * | ||
497 | */ | 495 | */ |
498 | size_t | 496 | size_t |
499 | GNUNET_NAMESTORE_records_get_size (unsigned int rd_count, | 497 | GNUNET_NAMESTORE_records_get_size (unsigned int rd_count, |
@@ -503,9 +501,9 @@ GNUNET_NAMESTORE_records_get_size (unsigned int rd_count, | |||
503 | /** | 501 | /** |
504 | * Serialize the given records to the given destination buffer. | 502 | * Serialize the given records to the given destination buffer. |
505 | * | 503 | * |
506 | * @param rd_count number of records in the rd array | 504 | * @param rd_count number of records in the @a rd array |
507 | * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements | 505 | * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements |
508 | * @param dest_size size of the destination array | 506 | * @param dest_size size of the destination array @a dst |
509 | * @param dest where to write the result | 507 | * @param dest where to write the result |
510 | * @return the size of serialized records, -1 if records do not fit | 508 | * @return the size of serialized records, -1 if records do not fit |
511 | */ | 509 | */ |
@@ -521,10 +519,9 @@ GNUNET_NAMESTORE_records_serialize (unsigned int rd_count, | |||
521 | * | 519 | * |
522 | * @param len size of the serialized record data | 520 | * @param len size of the serialized record data |
523 | * @param src the serialized record data | 521 | * @param src the serialized record data |
524 | * @param rd_count number of records in the rd array | 522 | * @param rd_count number of records in the @a dest array |
525 | * @param dest where to put the data | 523 | * @param dest where to put the data |
526 | * | 524 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
527 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | ||
528 | */ | 525 | */ |
529 | int | 526 | int |
530 | GNUNET_NAMESTORE_records_deserialize (size_t len, | 527 | GNUNET_NAMESTORE_records_deserialize (size_t len, |
@@ -534,11 +531,12 @@ GNUNET_NAMESTORE_records_deserialize (size_t len, | |||
534 | 531 | ||
535 | 532 | ||
536 | /** | 533 | /** |
537 | * Convert the 'value' of a record to a string. | 534 | * Convert the binary value @a data of a record of |
535 | * type @a type to a human-readable string. | ||
538 | * | 536 | * |
539 | * @param type type of the record | 537 | * @param type type of the record |
540 | * @param data value in binary encoding | 538 | * @param data value in binary encoding |
541 | * @param data_size number of bytes in data | 539 | * @param data_size number of bytes in @a data |
542 | * @return NULL on error, otherwise human-readable representation of the value | 540 | * @return NULL on error, otherwise human-readable representation of the value |
543 | */ | 541 | */ |
544 | char * | 542 | char * |
@@ -548,14 +546,14 @@ GNUNET_NAMESTORE_value_to_string (uint32_t type, | |||
548 | 546 | ||
549 | 547 | ||
550 | /** | 548 | /** |
551 | * Convert human-readable version of a 'value' of a record to the binary | 549 | * Convert human-readable version of the value @a s of a record |
552 | * representation. | 550 | * of type @a type to the respective binary representation. |
553 | * | 551 | * |
554 | * @param type type of the record | 552 | * @param type type of the record |
555 | * @param s human-readable string | 553 | * @param s human-readable string |
556 | * @param data set to value in binary encoding (will be allocated) | 554 | * @param data set to value in binary encoding (will be allocated) |
557 | * @param data_size set to number of bytes in data | 555 | * @param data_size set to number of bytes in @a data |
558 | * @return GNUNET_OK on success | 556 | * @return #GNUNET_OK on success |
559 | */ | 557 | */ |
560 | int | 558 | int |
561 | GNUNET_NAMESTORE_string_to_value (uint32_t type, | 559 | GNUNET_NAMESTORE_string_to_value (uint32_t type, |
@@ -649,7 +647,7 @@ GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EccPublicKey | |||
649 | * @param expire block expiration | 647 | * @param expire block expiration |
650 | * @param label the name for the records | 648 | * @param label the name for the records |
651 | * @param rd record data | 649 | * @param rd record data |
652 | * @param rd_count number of records | 650 | * @param rd_count number of records in @a rd |
653 | */ | 651 | */ |
654 | struct GNUNET_NAMESTORE_Block * | 652 | struct GNUNET_NAMESTORE_Block * |
655 | GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key, | 653 | GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EccPrivateKey *key, |
@@ -706,8 +704,8 @@ GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a, | |||
706 | * expiration time is the expiration time of the block with smallest | 704 | * expiration time is the expiration time of the block with smallest |
707 | * expiration time. | 705 | * expiration time. |
708 | * | 706 | * |
709 | * @param rd_count number of records given in 'rd' | 707 | * @param rd_count number of records given in @a rd |
710 | * @param rd array of records | 708 | * @param rd array of records |
711 | * @return absolute expiration time | 709 | * @return absolute expiration time |
712 | */ | 710 | */ |
713 | struct GNUNET_TIME_Absolute | 711 | struct GNUNET_TIME_Absolute |