aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_disk_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-06-14 08:54:54 +0000
committerChristian Grothoff <christian@grothoff.org>2012-06-14 08:54:54 +0000
commit94d4ab8921b60870144bc3ba6d885f43976ead78 (patch)
treeda7e588c16d5cbb2a50da3db56297a06c7554125 /src/include/gnunet_disk_lib.h
parente5813ba1a2630818148fad6c050c4fedf4edcd34 (diff)
downloadgnunet-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.h18
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
425struct GNUNET_DISK_PipeHandle * 425struct GNUNET_DISK_PipeHandle *
426GNUNET_DISK_pipe_from_fd (int blocking_read, int blocking_write, int fd[2]); 426GNUNET_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]);
433int 434int
434GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p); 435GNUNET_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 *
465GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p, 467GNUNET_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 */
477const struct GNUNET_DISK_FileHandle *
478GNUNET_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
476GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h, void *result, 490GNUNET_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 */
489ssize_t 504ssize_t
490GNUNET_DISK_file_read_non_blocking (const struct GNUNET_DISK_FileHandle * h, 505GNUNET_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.