diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-04 22:43:22 +0900 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-10-04 22:43:22 +0900 |
commit | 1741ddcf5efa177181518015f2becc0a67726bd7 (patch) | |
tree | 8b5325f28ff80b661758213bf2d53ab096749fa3 /src/include/gnunet_namestore_service.h | |
parent | 64344eb7c6360d1bea65c008814de52b7f834a79 (diff) | |
download | gnunet-1741ddcf5efa177181518015f2becc0a67726bd7.tar.gz gnunet-1741ddcf5efa177181518015f2becc0a67726bd7.zip |
NAMESTORE: Massaging new bulk API
Diffstat (limited to 'src/include/gnunet_namestore_service.h')
-rw-r--r-- | src/include/gnunet_namestore_service.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/include/gnunet_namestore_service.h b/src/include/gnunet_namestore_service.h index a42619156..6183fb8d0 100644 --- a/src/include/gnunet_namestore_service.h +++ b/src/include/gnunet_namestore_service.h | |||
@@ -82,6 +82,18 @@ enum GNUNET_NAMESTORE_TxControl | |||
82 | }; | 82 | }; |
83 | 83 | ||
84 | /** | 84 | /** |
85 | * A struct for record bulk import. | ||
86 | * The fields are arrays pointing to individual GNS records and names. | ||
87 | */ | ||
88 | struct GNUNET_NAMESTORE_RecordInfo | ||
89 | { | ||
90 | const char *a_label; | ||
91 | unsigned int a_rd_count; | ||
92 | struct GNUNET_GNSRECORD_Data *a_rd; | ||
93 | }; | ||
94 | |||
95 | |||
96 | /** | ||
85 | * Connect to the namestore service. | 97 | * Connect to the namestore service. |
86 | * | 98 | * |
87 | * @param cfg configuration to use | 99 | * @param cfg configuration to use |
@@ -165,9 +177,7 @@ GNUNET_NAMESTORE_records_store (struct GNUNET_NAMESTORE_Handle *h, | |||
165 | * @param h handle to the namestore | 177 | * @param h handle to the namestore |
166 | * @param pkey private key of the zone | 178 | * @param pkey private key of the zone |
167 | * @param rd_set_count the number of record sets | 179 | * @param rd_set_count the number of record sets |
168 | * @param a_label an array of size @a rd_set_count of names for each record set | 180 | * @param record_info the records to add containing @a rd_set_count records |
169 | * @param a_rd_count an array of size @a rd_set_count containing the number of records in the corresponding 'rd' array | ||
170 | * @param a_rd an array of size @a rd_set_count of arrays of records with data to store | ||
171 | * @param cont continuation to call when done | 181 | * @param cont continuation to call when done |
172 | * @param cont_cls closure for @a cont | 182 | * @param cont_cls closure for @a cont |
173 | * @return handle to abort the request | 183 | * @return handle to abort the request |
@@ -177,9 +187,7 @@ GNUNET_NAMESTORE_records_store2 ( | |||
177 | struct GNUNET_NAMESTORE_Handle *h, | 187 | struct GNUNET_NAMESTORE_Handle *h, |
178 | const struct GNUNET_IDENTITY_PrivateKey *pkey, | 188 | const struct GNUNET_IDENTITY_PrivateKey *pkey, |
179 | unsigned int rd_set_count, | 189 | unsigned int rd_set_count, |
180 | const char **a_label, | 190 | const struct GNUNET_NAMESTORE_RecordInfo *record_info, |
181 | unsigned int *a_rd_count, | ||
182 | const struct GNUNET_GNSRECORD_Data **a_rd, | ||
183 | GNUNET_NAMESTORE_ContinuationWithStatus cont, | 191 | GNUNET_NAMESTORE_ContinuationWithStatus cont, |
184 | void *cont_cls); | 192 | void *cont_cls); |
185 | 193 | ||