aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_disk_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-10-06 11:16:26 +0000
committerChristian Grothoff <christian@grothoff.org>2013-10-06 11:16:26 +0000
commit2ebfdbbe8af9eef26ad1a2776a20227715560558 (patch)
tree9ce4e1f88ab32a156653dc6d74a9c02a82c77ee1 /src/include/gnunet_disk_lib.h
parentb0f956058355ea7e96a7d3022b08dd951acd99a5 (diff)
downloadgnunet-2ebfdbbe8af9eef26ad1a2776a20227715560558.tar.gz
gnunet-2ebfdbbe8af9eef26ad1a2776a20227715560558.zip
-load revocations from disk, misc doxygen/style fixes
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r--src/include/gnunet_disk_lib.h49
1 files changed, 32 insertions, 17 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h
index a800010f8..b5f0ccdda 100644
--- a/src/include/gnunet_disk_lib.h
+++ b/src/include/gnunet_disk_lib.h
@@ -282,7 +282,7 @@ GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
282 * (of a file that exists and that is not a directory). 282 * (of a file that exists and that is not a directory).
283 * 283 *
284 * @param fil filename to check 284 * @param fil filename to check
285 * @return GNUNET_YES if yes, GNUNET_NO if not a file, GNUNET_SYSERR if something 285 * @return #GNUNET_YES if yes, #GNUNET_NO if not a file, #GNUNET_SYSERR if something
286 * else (will print an error message in that case, too). 286 * else (will print an error message in that case, too).
287 */ 287 */
288int 288int
@@ -320,15 +320,16 @@ GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, OFF_T offset,
320 * @param size set to the size of the file (or, 320 * @param size set to the size of the file (or,
321 * in the case of directories, the sum 321 * in the case of directories, the sum
322 * of all sizes of files in the directory) 322 * of all sizes of files in the directory)
323 * @param includeSymLinks should symbolic links be 323 * @param include_symbolic_links should symbolic links be
324 * included? 324 * included?
325 * @param singleFileMode GNUNET_YES to only get size of one file 325 * @param single_file_mode #GNUNET_YES to only get size of one file
326 * and return GNUNET_SYSERR for directories. 326 * and return #GNUNET_SYSERR for directories.
327 * @return GNUNET_SYSERR on error, GNUNET_OK on success 327 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success
328 */ 328 */
329int 329int
330GNUNET_DISK_file_size (const char *filename, uint64_t * size, 330GNUNET_DISK_file_size (const char *filename, uint64_t *size,
331 int includeSymLinks, int singleFileMode); 331 int include_symbolic_links,
332 int single_file_mode);
332 333
333 334
334/** 335/**
@@ -347,8 +348,9 @@ GNUNET_DISK_file_size (const char *filename, uint64_t * size,
347 * @return GNUNET_OK on success 348 * @return GNUNET_OK on success
348 */ 349 */
349int 350int
350GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev, 351GNUNET_DISK_file_get_identifiers (const char *filename,
351 uint64_t * ino); 352 uint64_t *dev,
353 uint64_t *ino);
352 354
353 355
354/** 356/**
@@ -392,7 +394,8 @@ GNUNET_DISK_mkdtemp (const char *t);
392 * @return IO handle on success, NULL on error 394 * @return IO handle on success, NULL on error
393 */ 395 */
394struct GNUNET_DISK_FileHandle * 396struct GNUNET_DISK_FileHandle *
395GNUNET_DISK_file_open (const char *fn, enum GNUNET_DISK_OpenFlags flags, 397GNUNET_DISK_file_open (const char *fn,
398 enum GNUNET_DISK_OpenFlags flags,
396 enum GNUNET_DISK_AccessPermissions perm); 399 enum GNUNET_DISK_AccessPermissions perm);
397 400
398 401
@@ -418,7 +421,10 @@ GNUNET_DISK_file_handle_size (struct GNUNET_DISK_FileHandle *fh,
418 * @return handle to the new pipe, NULL on error 421 * @return handle to the new pipe, NULL on error
419 */ 422 */
420struct GNUNET_DISK_PipeHandle * 423struct GNUNET_DISK_PipeHandle *
421GNUNET_DISK_pipe (int blocking_read, int blocking_write, int inherit_read, int inherit_write); 424GNUNET_DISK_pipe (int blocking_read,
425 int blocking_write,
426 int inherit_read,
427 int inherit_write);
422 428
423 429
424/** 430/**
@@ -432,7 +438,9 @@ GNUNET_DISK_pipe (int blocking_read, int blocking_write, int inherit_read, int i
432 * @return handle to the new pipe, NULL on error 438 * @return handle to the new pipe, NULL on error
433 */ 439 */
434struct GNUNET_DISK_PipeHandle * 440struct GNUNET_DISK_PipeHandle *
435GNUNET_DISK_pipe_from_fd (int blocking_read, int blocking_write, int fd[2]); 441GNUNET_DISK_pipe_from_fd (int blocking_read,
442 int blocking_write,
443 int fd[2]);
436 444
437 445
438/** 446/**
@@ -529,13 +537,15 @@ GNUNET_DISK_get_handle_from_native (FILE *fd);
529 537
530/** 538/**
531 * Read the contents of a binary file into a buffer. 539 * Read the contents of a binary file into a buffer.
540 *
532 * @param h handle to an open file 541 * @param h handle to an open file
533 * @param result the buffer to write the result to 542 * @param result the buffer to write the result to
534 * @param len the maximum number of bytes to read 543 * @param len the maximum number of bytes to read
535 * @return the number of bytes read on success, #GNUNET_SYSERR on failure 544 * @return the number of bytes read on success, #GNUNET_SYSERR on failure
536 */ 545 */
537ssize_t 546ssize_t
538GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h, void *result, 547GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h,
548 void *result,
539 size_t len); 549 size_t len);
540 550
541 551
@@ -579,18 +589,20 @@ GNUNET_DISK_fn_read (const char *fn,
579 */ 589 */
580ssize_t 590ssize_t
581GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h, 591GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h,
582 const void *buffer, size_t n); 592 const void *buffer,
593 size_t n);
583 594
584 595
585/** 596/**
586 * Write a buffer to a file, blocking, if necessary. 597 * Write a buffer to a file, blocking, if necessary.
598 *
587 * @param h handle to open file 599 * @param h handle to open file
588 * @param buffer the data to write 600 * @param buffer the data to write
589 * @param n number of bytes to write 601 * @param n number of bytes to write
590 * @return number of bytes written on success, #GNUNET_SYSERR on error 602 * @return number of bytes written on success, #GNUNET_SYSERR on error
591 */ 603 */
592ssize_t 604ssize_t
593GNUNET_DISK_file_write_blocking (const struct GNUNET_DISK_FileHandle * h, 605GNUNET_DISK_file_write_blocking (const struct GNUNET_DISK_FileHandle *h,
594 const void *buffer, 606 const void *buffer,
595 size_t n); 607 size_t n);
596 608
@@ -606,7 +618,9 @@ GNUNET_DISK_file_write_blocking (const struct GNUNET_DISK_FileHandle * h,
606 * @return number of bytes written on success, #GNUNET_SYSERR on error 618 * @return number of bytes written on success, #GNUNET_SYSERR on error
607 */ 619 */
608ssize_t 620ssize_t
609GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n, 621GNUNET_DISK_fn_write (const char *fn,
622 const void *buffer,
623 size_t n,
610 enum GNUNET_DISK_AccessPermissions mode); 624 enum GNUNET_DISK_AccessPermissions mode);
611 625
612 626
@@ -766,7 +780,8 @@ GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh,
766 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 780 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
767 */ 781 */
768int 782int
769GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh, OFF_T unlock_start, 783GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh,
784 OFF_T unlock_start,
770 OFF_T unlock_end); 785 OFF_T unlock_end);
771 786
772 787