diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-16 20:21:27 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-16 20:21:27 +0000 |
commit | accfd6bd85274da2f19e7230c8da6b273cfb2ece (patch) | |
tree | 60966194963795ff07b4da94f4efb6c46d6a23cf /src/include/gnunet_gnsrecord_lib.h | |
parent | 3d670727232e79b7e49a1df7ba9260db4e5798a0 (diff) | |
download | gnunet-accfd6bd85274da2f19e7230c8da6b273cfb2ece.tar.gz gnunet-accfd6bd85274da2f19e7230c8da6b273cfb2ece.zip |
-another renaming fest for GNUNET_NAMESTORE_ to GNUNET_GNSRECORD_ symbols that were moved
Diffstat (limited to 'src/include/gnunet_gnsrecord_lib.h')
-rw-r--r-- | src/include/gnunet_gnsrecord_lib.h | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/src/include/gnunet_gnsrecord_lib.h b/src/include/gnunet_gnsrecord_lib.h index aefdeb4a4..96e7e3aee 100644 --- a/src/include/gnunet_gnsrecord_lib.h +++ b/src/include/gnunet_gnsrecord_lib.h | |||
@@ -37,7 +37,7 @@ extern "C" | |||
37 | /** | 37 | /** |
38 | * Maximum size of a value that can be stored in a GNS block. | 38 | * Maximum size of a value that can be stored in a GNS block. |
39 | */ | 39 | */ |
40 | #define GNUNET_NAMESTORE_MAX_VALUE_SIZE (63 * 1024) | 40 | #define GNUNET_GNSRECORD_MAX_BLOCK_SIZE (63 * 1024) |
41 | 41 | ||
42 | 42 | ||
43 | /** | 43 | /** |
@@ -84,37 +84,37 @@ extern "C" | |||
84 | /** | 84 | /** |
85 | * Flags that can be set for a record. | 85 | * Flags that can be set for a record. |
86 | */ | 86 | */ |
87 | enum GNUNET_NAMESTORE_RecordFlags | 87 | enum GNUNET_GNSRECORD_Flags |
88 | { | 88 | { |
89 | 89 | ||
90 | /** | 90 | /** |
91 | * No special options. | 91 | * No special options. |
92 | */ | 92 | */ |
93 | GNUNET_NAMESTORE_RF_NONE = 0, | 93 | GNUNET_GNSRECORD_RF_NONE = 0, |
94 | 94 | ||
95 | /** | 95 | /** |
96 | * This is a private record of this peer and it should | 96 | * This is a private record of this peer and it should |
97 | * thus not be handed out to other peers. | 97 | * thus not be handed out to other peers. |
98 | */ | 98 | */ |
99 | GNUNET_NAMESTORE_RF_PRIVATE = 2, | 99 | GNUNET_GNSRECORD_RF_PRIVATE = 2, |
100 | 100 | ||
101 | /** | 101 | /** |
102 | * This record was added automatically by the system | 102 | * This record was added automatically by the system |
103 | * and is pending user confimation. | 103 | * and is pending user confimation. |
104 | */ | 104 | */ |
105 | GNUNET_NAMESTORE_RF_PENDING = 4, | 105 | GNUNET_GNSRECORD_RF_PENDING = 4, |
106 | 106 | ||
107 | /** | 107 | /** |
108 | * This expiration time of the record is a relative | 108 | * This expiration time of the record is a relative |
109 | * time (not an absolute time). | 109 | * time (not an absolute time). |
110 | */ | 110 | */ |
111 | GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION = 8, | 111 | GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION = 8, |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * This record should not be used unless all (other) records with an absolute | 114 | * This record should not be used unless all (other) records with an absolute |
115 | * expiration time have expired. | 115 | * expiration time have expired. |
116 | */ | 116 | */ |
117 | GNUNET_NAMESTORE_RF_SHADOW_RECORD = 16 | 117 | GNUNET_GNSRECORD_RF_SHADOW_RECORD = 16 |
118 | 118 | ||
119 | /** | 119 | /** |
120 | * When comparing flags for record equality for removal, | 120 | * When comparing flags for record equality for removal, |
@@ -125,16 +125,16 @@ enum GNUNET_NAMESTORE_RecordFlags | |||
125 | * pass the '--private' option when removing a record from | 125 | * pass the '--private' option when removing a record from |
126 | * the namestore, hence we don't require this particular option | 126 | * the namestore, hence we don't require this particular option |
127 | * to match upon removal). See also | 127 | * to match upon removal). See also |
128 | * #GNUNET_NAMESTORE_records_cmp. | 128 | * #GNUNET_GNSRECORD_records_cmp. |
129 | */ | 129 | */ |
130 | #define GNUNET_NAMESTORE_RF_RCMP_FLAGS (GNUNET_NAMESTORE_RF_RELATIVE_EXPIRATION) | 130 | #define GNUNET_GNSRECORD_RF_RCMP_FLAGS (GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION) |
131 | }; | 131 | }; |
132 | 132 | ||
133 | 133 | ||
134 | /** | 134 | /** |
135 | * A GNS record. | 135 | * A GNS record. |
136 | */ | 136 | */ |
137 | struct GNUNET_NAMESTORE_RecordData | 137 | struct GNUNET_GNSRECORD_Data |
138 | { | 138 | { |
139 | 139 | ||
140 | /** | 140 | /** |
@@ -164,7 +164,7 @@ struct GNUNET_NAMESTORE_RecordData | |||
164 | /** | 164 | /** |
165 | * Flags for the record. | 165 | * Flags for the record. |
166 | */ | 166 | */ |
167 | enum GNUNET_NAMESTORE_RecordFlags flags; | 167 | enum GNUNET_GNSRECORD_Flags flags; |
168 | }; | 168 | }; |
169 | 169 | ||
170 | 170 | ||
@@ -175,7 +175,7 @@ GNUNET_NETWORK_STRUCT_BEGIN | |||
175 | /** | 175 | /** |
176 | * Information we have in an encrypted block with record data (i.e. in the DHT). | 176 | * Information we have in an encrypted block with record data (i.e. in the DHT). |
177 | */ | 177 | */ |
178 | struct GNUNET_NAMESTORE_Block | 178 | struct GNUNET_GNSRECORD_Block |
179 | { | 179 | { |
180 | 180 | ||
181 | /** | 181 | /** |
@@ -212,9 +212,9 @@ GNUNET_NETWORK_STRUCT_END | |||
212 | * @param rd_count number of entries in @a rd array | 212 | * @param rd_count number of entries in @a rd array |
213 | * @param rd array of records with data to store | 213 | * @param rd array of records with data to store |
214 | */ | 214 | */ |
215 | typedef void (*GNUNET_NAMESTORE_RecordCallback) (void *cls, | 215 | typedef void (*GNUNET_GNSRECORD_RecordCallback) (void *cls, |
216 | unsigned int rd_count, | 216 | unsigned int rd_count, |
217 | const struct GNUNET_NAMESTORE_RecordData *rd); | 217 | const struct GNUNET_GNSRECORD_Data *rd); |
218 | 218 | ||
219 | 219 | ||
220 | 220 | ||
@@ -279,26 +279,26 @@ GNUNET_GNSRECORD_number_to_typename (uint32_t type); | |||
279 | * records. | 279 | * records. |
280 | * | 280 | * |
281 | * @param rd_count number of records in the @a rd array | 281 | * @param rd_count number of records in the @a rd array |
282 | * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements | 282 | * @param rd array of #GNUNET_GNSRECORD_Data with @a rd_count elements |
283 | * @return the required size to serialize | 283 | * @return the required size to serialize |
284 | */ | 284 | */ |
285 | size_t | 285 | size_t |
286 | GNUNET_NAMESTORE_records_get_size (unsigned int rd_count, | 286 | GNUNET_GNSRECORD_records_get_size (unsigned int rd_count, |
287 | const struct GNUNET_NAMESTORE_RecordData *rd); | 287 | const struct GNUNET_GNSRECORD_Data *rd); |
288 | 288 | ||
289 | 289 | ||
290 | /** | 290 | /** |
291 | * Serialize the given records to the given destination buffer. | 291 | * Serialize the given records to the given destination buffer. |
292 | * | 292 | * |
293 | * @param rd_count number of records in the @a rd array | 293 | * @param rd_count number of records in the @a rd array |
294 | * @param rd array of #GNUNET_NAMESTORE_RecordData with @a rd_count elements | 294 | * @param rd array of #GNUNET_GNSRECORD_Data with @a rd_count elements |
295 | * @param dest_size size of the destination array @a dst | 295 | * @param dest_size size of the destination array @a dst |
296 | * @param dest where to write the result | 296 | * @param dest where to write the result |
297 | * @return the size of serialized records, -1 if records do not fit | 297 | * @return the size of serialized records, -1 if records do not fit |
298 | */ | 298 | */ |
299 | ssize_t | 299 | ssize_t |
300 | GNUNET_NAMESTORE_records_serialize (unsigned int rd_count, | 300 | GNUNET_GNSRECORD_records_serialize (unsigned int rd_count, |
301 | const struct GNUNET_NAMESTORE_RecordData *rd, | 301 | const struct GNUNET_GNSRECORD_Data *rd, |
302 | size_t dest_size, | 302 | size_t dest_size, |
303 | char *dest); | 303 | char *dest); |
304 | 304 | ||
@@ -313,10 +313,10 @@ GNUNET_NAMESTORE_records_serialize (unsigned int rd_count, | |||
313 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error | 313 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
314 | */ | 314 | */ |
315 | int | 315 | int |
316 | GNUNET_NAMESTORE_records_deserialize (size_t len, | 316 | GNUNET_GNSRECORD_records_deserialize (size_t len, |
317 | const char *src, | 317 | const char *src, |
318 | unsigned int rd_count, | 318 | unsigned int rd_count, |
319 | struct GNUNET_NAMESTORE_RecordData *dest); | 319 | struct GNUNET_GNSRECORD_Data *dest); |
320 | 320 | ||
321 | 321 | ||
322 | /* ******* general APIs relating to blocks, records and labels ******** */ | 322 | /* ******* general APIs relating to blocks, records and labels ******** */ |
@@ -331,7 +331,7 @@ GNUNET_NAMESTORE_records_deserialize (size_t len, | |||
331 | * #GNUNET_NO if not | 331 | * #GNUNET_NO if not |
332 | */ | 332 | */ |
333 | int | 333 | int |
334 | GNUNET_NAMESTORE_is_expired (const struct GNUNET_NAMESTORE_RecordData *rd); | 334 | GNUNET_GNSRECORD_is_expired (const struct GNUNET_GNSRECORD_Data *rd); |
335 | 335 | ||
336 | 336 | ||
337 | /** | 337 | /** |
@@ -340,7 +340,7 @@ GNUNET_NAMESTORE_is_expired (const struct GNUNET_NAMESTORE_RecordData *rd); | |||
340 | * @return converted result | 340 | * @return converted result |
341 | */ | 341 | */ |
342 | char * | 342 | char * |
343 | GNUNET_NAMESTORE_normalize_string (const char *src); | 343 | GNUNET_GNSRECORD_string_to_lowercase (const char *src); |
344 | 344 | ||
345 | 345 | ||
346 | /** | 346 | /** |
@@ -349,10 +349,10 @@ GNUNET_NAMESTORE_normalize_string (const char *src); | |||
349 | * NOT reentrant! | 349 | * NOT reentrant! |
350 | * | 350 | * |
351 | * @param z public key of a zone | 351 | * @param z public key of a zone |
352 | * @return string form; will be overwritten by next call to #GNUNET_NAMESTORE_z2s. | 352 | * @return string form; will be overwritten by next call to #GNUNET_GNSRECORD_z2s. |
353 | */ | 353 | */ |
354 | const char * | 354 | const char * |
355 | GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z); | 355 | GNUNET_GNSRECORD_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z); |
356 | 356 | ||
357 | 357 | ||
358 | /** | 358 | /** |
@@ -366,7 +366,7 @@ GNUNET_NAMESTORE_z2s (const struct GNUNET_CRYPTO_EcdsaPublicKey *z); | |||
366 | * key in an encoding suitable for DNS labels. | 366 | * key in an encoding suitable for DNS labels. |
367 | */ | 367 | */ |
368 | const char * | 368 | const char * |
369 | GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); | 369 | GNUNET_GNSRECORD_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); |
370 | 370 | ||
371 | 371 | ||
372 | /** | 372 | /** |
@@ -379,7 +379,7 @@ GNUNET_NAMESTORE_pkey_to_zkey (const struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); | |||
379 | * @return #GNUNET_SYSERR if @a zkey has the wrong syntax | 379 | * @return #GNUNET_SYSERR if @a zkey has the wrong syntax |
380 | */ | 380 | */ |
381 | int | 381 | int |
382 | GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey, | 382 | GNUNET_GNSRECORD_zkey_to_pkey (const char *zkey, |
383 | struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); | 383 | struct GNUNET_CRYPTO_EcdsaPublicKey *pkey); |
384 | 384 | ||
385 | 385 | ||
@@ -391,7 +391,7 @@ GNUNET_NAMESTORE_zkey_to_pkey (const char *zkey, | |||
391 | * @param query hash to use for the query | 391 | * @param query hash to use for the query |
392 | */ | 392 | */ |
393 | void | 393 | void |
394 | GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, | 394 | GNUNET_GNSRECORD_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, |
395 | const char *label, | 395 | const char *label, |
396 | struct GNUNET_HashCode *query); | 396 | struct GNUNET_HashCode *query); |
397 | 397 | ||
@@ -404,7 +404,7 @@ GNUNET_NAMESTORE_query_from_private_key (const struct GNUNET_CRYPTO_EcdsaPrivate | |||
404 | * @param query hash to use for the query | 404 | * @param query hash to use for the query |
405 | */ | 405 | */ |
406 | void | 406 | void |
407 | GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub, | 407 | GNUNET_GNSRECORD_query_from_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKey *pub, |
408 | const char *label, | 408 | const char *label, |
409 | struct GNUNET_HashCode *query); | 409 | struct GNUNET_HashCode *query); |
410 | 410 | ||
@@ -418,11 +418,11 @@ GNUNET_NAMESTORE_query_from_public_key (const struct GNUNET_CRYPTO_EcdsaPublicKe | |||
418 | * @param rd record data | 418 | * @param rd record data |
419 | * @param rd_count number of records in @a rd | 419 | * @param rd_count number of records in @a rd |
420 | */ | 420 | */ |
421 | struct GNUNET_NAMESTORE_Block * | 421 | struct GNUNET_GNSRECORD_Block * |
422 | GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | 422 | GNUNET_GNSRECORD_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, |
423 | struct GNUNET_TIME_Absolute expire, | 423 | struct GNUNET_TIME_Absolute expire, |
424 | const char *label, | 424 | const char *label, |
425 | const struct GNUNET_NAMESTORE_RecordData *rd, | 425 | const struct GNUNET_GNSRECORD_Data *rd, |
426 | unsigned int rd_count); | 426 | unsigned int rd_count); |
427 | 427 | ||
428 | 428 | ||
@@ -434,7 +434,7 @@ GNUNET_NAMESTORE_block_create (const struct GNUNET_CRYPTO_EcdsaPrivateKey *key, | |||
434 | * @return #GNUNET_OK if the signature is valid | 434 | * @return #GNUNET_OK if the signature is valid |
435 | */ | 435 | */ |
436 | int | 436 | int |
437 | GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block); | 437 | GNUNET_GNSRECORD_block_verify (const struct GNUNET_GNSRECORD_Block *block); |
438 | 438 | ||
439 | 439 | ||
440 | /** | 440 | /** |
@@ -449,10 +449,10 @@ GNUNET_NAMESTORE_block_verify (const struct GNUNET_NAMESTORE_Block *block); | |||
449 | * not well-formed | 449 | * not well-formed |
450 | */ | 450 | */ |
451 | int | 451 | int |
452 | GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, | 452 | GNUNET_GNSRECORD_block_decrypt (const struct GNUNET_GNSRECORD_Block *block, |
453 | const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key, | 453 | const struct GNUNET_CRYPTO_EcdsaPublicKey *zone_key, |
454 | const char *label, | 454 | const char *label, |
455 | GNUNET_NAMESTORE_RecordCallback proc, | 455 | GNUNET_GNSRECORD_RecordCallback proc, |
456 | void *proc_cls); | 456 | void *proc_cls); |
457 | 457 | ||
458 | 458 | ||
@@ -464,8 +464,8 @@ GNUNET_NAMESTORE_block_decrypt (const struct GNUNET_NAMESTORE_Block *block, | |||
464 | * @return #GNUNET_YES if the records are equal, or #GNUNET_NO if not. | 464 | * @return #GNUNET_YES if the records are equal, or #GNUNET_NO if not. |
465 | */ | 465 | */ |
466 | int | 466 | int |
467 | GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a, | 467 | GNUNET_GNSRECORD_records_cmp (const struct GNUNET_GNSRECORD_Data *a, |
468 | const struct GNUNET_NAMESTORE_RecordData *b); | 468 | const struct GNUNET_GNSRECORD_Data *b); |
469 | 469 | ||
470 | 470 | ||
471 | /** | 471 | /** |
@@ -478,8 +478,8 @@ GNUNET_NAMESTORE_records_cmp (const struct GNUNET_NAMESTORE_RecordData *a, | |||
478 | * @return absolute expiration time | 478 | * @return absolute expiration time |
479 | */ | 479 | */ |
480 | struct GNUNET_TIME_Absolute | 480 | struct GNUNET_TIME_Absolute |
481 | GNUNET_NAMESTORE_record_get_expiration_time (unsigned int rd_count, | 481 | GNUNET_GNSRECORD_record_get_expiration_time (unsigned int rd_count, |
482 | const struct GNUNET_NAMESTORE_RecordData *rd); | 482 | const struct GNUNET_GNSRECORD_Data *rd); |
483 | 483 | ||
484 | 484 | ||
485 | 485 | ||