diff options
Diffstat (limited to 'src/include/gnunet_gnsrecord_lib.h')
-rw-r--r-- | src/include/gnunet_gnsrecord_lib.h | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h index 530879b21..0bf2ceed7 100644 --- a/src/include/gnunet_gnsrecord_lib.h +++ b/src/include/gnunet_gnsrecord_lib.h | |||
@@ -686,16 +686,48 @@ GNUNET_GNSRECORD_query_from_block (const struct GNUNET_GNSRECORD_Block *block, | |||
686 | 686 | ||
687 | 687 | ||
688 | /** | 688 | /** |
689 | * Build a #GNUNET_GNSRECORD_PublicKey from a | 689 | * Build a #GNUNET_GNSRECORD_PublicKey from |
690 | * zone delegation resource record set. | 690 | * zone delegation resource record data. |
691 | * | 691 | * |
692 | * @param the resource record set. MUST be a delegation record. | 692 | * @param data the record data- |
693 | * @param key where to write the identtiy key. | 693 | * @param data_size the data size. |
694 | * @return GNUNET_SYSERR on error or if the zone is not a delegation zone. | 694 | * @param type the record type |
695 | * @param key the identity key to store the data in (must be allocated). | ||
696 | * @return GNUNET_OK if successful. | ||
695 | */ | 697 | */ |
696 | enum GNUNET_GenericReturnValue | 698 | enum GNUNET_GenericReturnValue |
697 | GNUNET_GNSRECORD_record_to_identity_key (const struct GNUNET_GNSRECORD_Data *rd, | 699 | GNUNET_GNSRECORD_identity_from_data (const char *data, |
698 | struct GNUNET_IDENTITY_PublicKey *key); | 700 | size_t data_size, |
701 | uint32_t type, | ||
702 | struct GNUNET_IDENTITY_PublicKey *key); | ||
703 | |||
704 | |||
705 | /** | ||
706 | * Create record data and size from an identity key. | ||
707 | * | ||
708 | * @param key the identity key to use. | ||
709 | * @param data the record data (will be allocated) | ||
710 | * @param data_size the allocated data size. | ||
711 | * @param type the resulting record type | ||
712 | * @return GNUNET_OK if successful. | ||
713 | */ | ||
714 | enum GNUNET_GenericReturnValue | ||
715 | GNUNET_GNSRECORD_data_from_identity (const struct GNUNET_IDENTITY_PublicKey *key, | ||
716 | char **data, | ||
717 | size_t *data_size, | ||
718 | uint32_t *type); | ||
719 | |||
720 | |||
721 | /** | ||
722 | * Check if this type is one of the supported GNS zone | ||
723 | * types. | ||
724 | * | ||
725 | * @param type the type to check | ||
726 | * @return GNUNET_YES if it is one of the supported types. | ||
727 | */ | ||
728 | enum GNUNET_GenericReturnValue | ||
729 | GNUNET_GNSRECORD_is_zonekey_type (uint32_t type); | ||
730 | |||
699 | 731 | ||
700 | #if 0 /* keep Emacsens' auto-indent happy */ | 732 | #if 0 /* keep Emacsens' auto-indent happy */ |
701 | { | 733 | { |