diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-14 08:54:54 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-14 08:54:54 +0000 |
commit | 94d4ab8921b60870144bc3ba6d885f43976ead78 (patch) | |
tree | da7e588c16d5cbb2a50da3db56297a06c7554125 /src/include/gnunet_disk_lib.h | |
parent | e5813ba1a2630818148fad6c050c4fedf4edcd34 (diff) | |
download | gnunet-94d4ab8921b60870144bc3ba6d885f43976ead78.tar.gz gnunet-94d4ab8921b60870144bc3ba6d885f43976ead78.zip |
-needing yet another API to box stdin for scheduler reading, not ported to W32 yet
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r-- | src/include/gnunet_disk_lib.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index ae9cdbbe9..fdd9e8d77 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -425,6 +425,7 @@ GNUNET_DISK_pipe (int blocking_read, int blocking_write, int inherit_read, int i | |||
425 | struct GNUNET_DISK_PipeHandle * | 425 | struct GNUNET_DISK_PipeHandle * |
426 | GNUNET_DISK_pipe_from_fd (int blocking_read, int blocking_write, int fd[2]); | 426 | GNUNET_DISK_pipe_from_fd (int blocking_read, int blocking_write, int fd[2]); |
427 | 427 | ||
428 | |||
428 | /** | 429 | /** |
429 | * Closes an interprocess channel | 430 | * Closes an interprocess channel |
430 | * @param p pipe | 431 | * @param p pipe |
@@ -433,6 +434,7 @@ GNUNET_DISK_pipe_from_fd (int blocking_read, int blocking_write, int fd[2]); | |||
433 | int | 434 | int |
434 | GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p); | 435 | GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p); |
435 | 436 | ||
437 | |||
436 | /** | 438 | /** |
437 | * Closes one half of an interprocess channel | 439 | * Closes one half of an interprocess channel |
438 | * | 440 | * |
@@ -465,6 +467,18 @@ const struct GNUNET_DISK_FileHandle * | |||
465 | GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p, | 467 | GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p, |
466 | enum GNUNET_DISK_PipeEnd n); | 468 | enum GNUNET_DISK_PipeEnd n); |
467 | 469 | ||
470 | |||
471 | /** | ||
472 | * Get a handle from a native FD. | ||
473 | * | ||
474 | * @param fd native file descriptor | ||
475 | * @return file handle corresponding to the descriptor | ||
476 | */ | ||
477 | const struct GNUNET_DISK_FileHandle * | ||
478 | GNUNET_DISK_get_handle_from_native (FILE *fd); | ||
479 | |||
480 | |||
481 | |||
468 | /** | 482 | /** |
469 | * Read the contents of a binary file into a buffer. | 483 | * Read the contents of a binary file into a buffer. |
470 | * @param h handle to an open file | 484 | * @param h handle to an open file |
@@ -476,6 +490,7 @@ ssize_t | |||
476 | GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h, void *result, | 490 | GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h, void *result, |
477 | size_t len); | 491 | size_t len); |
478 | 492 | ||
493 | |||
479 | /** | 494 | /** |
480 | * Read the contents of a binary file into a buffer. | 495 | * Read the contents of a binary file into a buffer. |
481 | * Guarantees not to block (returns GNUNET_SYSERR and sets errno to EAGAIN | 496 | * Guarantees not to block (returns GNUNET_SYSERR and sets errno to EAGAIN |
@@ -488,7 +503,8 @@ GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h, void *result, | |||
488 | */ | 503 | */ |
489 | ssize_t | 504 | ssize_t |
490 | GNUNET_DISK_file_read_non_blocking (const struct GNUNET_DISK_FileHandle * h, | 505 | GNUNET_DISK_file_read_non_blocking (const struct GNUNET_DISK_FileHandle * h, |
491 | void *result, size_t len); | 506 | void *result, size_t len); |
507 | |||
492 | 508 | ||
493 | /** | 509 | /** |
494 | * Read the contents of a binary file into a buffer. | 510 | * Read the contents of a binary file into a buffer. |