aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_gnsrecord_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_gnsrecord_lib.h')
-rw-r--r--src/include/gnunet_gnsrecord_lib.h57
1 files changed, 31 insertions, 26 deletions
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h
index 1ff348b71..21fb610f3 100644
--- a/src/include/gnunet_gnsrecord_lib.h
+++ b/src/include/gnunet_gnsrecord_lib.h
@@ -124,6 +124,35 @@ enum GNUNET_GNSRECORD_Flags
124#define GNUNET_GNSRECORD_RF_RCMP_FLAGS (GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION) 124#define GNUNET_GNSRECORD_RF_RCMP_FLAGS (GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION)
125}; 125};
126 126
127/**
128 * Filter for GNUNET_GNSRECORD_normalize_record_set().
129 */
130enum GNUNET_GNSRECORD_Filter
131{
132 /**
133 * No filter flags set.
134 * Private and public records are returned,
135 * maintenance records (TOMBSTONE etc) are not.
136 */
137 GNUNET_GNSRECORD_FILTER_NONE = 0,
138
139 /**
140 * Include maintenance records (TOMBSTONE etc).
141 */
142 GNUNET_GNSRECORD_FILTER_INCLUDE_MAINTENANCE = 1,
143
144 /**
145 * Filter private records
146 */
147 GNUNET_GNSRECORD_FILTER_OMIT_PRIVATE = 2,
148
149 /**
150 * Filter public records.
151 * FIXME: Not implemented
152 */
153 //GNUNET_NAMESTORE_FILTER_OMIT_PUBLIC = 4,
154};
155
127 156
128/** 157/**
129 * A GNS record. 158 * A GNS record.
@@ -725,7 +754,7 @@ GNUNET_GNSRECORD_is_critical (uint32_t type);
725 * @param rd_public where to write the converted records 754 * @param rd_public where to write the converted records
726 * @param rd_public_count number of records written to @a rd_public 755 * @param rd_public_count number of records written to @a rd_public
727 * @param min_expiry the minimum expiration of this set 756 * @param min_expiry the minimum expiration of this set
728 * @param include_private GNUNET_YES if private records should be included. 757 * @param filter the record set filter, see GNUNET_GNSRECORD_Filter.
729 * @param emsg the error message if something went wrong 758 * @param emsg the error message if something went wrong
730 * @return GNUNET_OK if set could be normalized and is consistent 759 * @return GNUNET_OK if set could be normalized and is consistent
731 */ 760 */
@@ -736,35 +765,11 @@ GNUNET_GNSRECORD_normalize_record_set (const char *label,
736 struct GNUNET_GNSRECORD_Data *rd_public, 765 struct GNUNET_GNSRECORD_Data *rd_public,
737 unsigned int *rd_count_public, 766 unsigned int *rd_count_public,
738 struct GNUNET_TIME_Absolute *min_expiry, 767 struct GNUNET_TIME_Absolute *min_expiry,
739 int include_private, 768 enum GNUNET_GNSRECORD_Filter filter,
740 char **emsg); 769 char **emsg);
741 770
742 771
743/** 772/**
744 * Convert namestore records from the internal format to that
745 * suitable for publication (removes private records).
746 *
747 * @param label the label under which this set is (supposed to be) published.
748 * @param rd input records
749 * @param rd_count size of the @a rd and @a rd_public arrays
750 * @param rd_public where to write the converted records
751 * @param rd_public_count number of records written to @a rd_public
752 * @param expiry the expiration of the block
753 * @param emsg the error message if something went wrong
754 * @return GNUNET_OK if set is consistent and can be exported
755 */
756enum GNUNET_GenericReturnValue
757GNUNET_GNSRECORD_convert_records_for_export (const char *label,
758 const struct
759 GNUNET_GNSRECORD_Data *rd,
760 unsigned int rd_count,
761 struct GNUNET_GNSRECORD_Data *
762 rd_public,
763 unsigned int *rd_count_public,
764 struct GNUNET_TIME_Absolute *expiry,
765 char **emsg);
766
767/**
768 * Check label for invalid characters. 773 * Check label for invalid characters.
769 * 774 *
770 * @param label the label to check 775 * @param label the label to check