diff options
author | LRN <lrn1986@gmail.com> | 2013-02-14 16:15:15 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-02-14 16:15:15 +0000 |
commit | fb325794836981c17396a187f97da0c542ff34d0 (patch) | |
tree | b6118f2e0cee3df9e6358398b6b6d3df870ab78e /src/include/gnunet_disk_lib.h | |
parent | bb0344c616bfa067498fbfd455768847115fe96e (diff) | |
download | gnunet-fb325794836981c17396a187f97da0c542ff34d0.tar.gz gnunet-fb325794836981c17396a187f97da0c542ff34d0.zip |
More flexible native->GNUnet_handle file opening
Can now open not just FILEs, but also integer fds and
native Windows handles.
The last two will be used later by the new pipe control code.
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r-- | src/include/gnunet_disk_lib.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index 0f36353b0..2e1276374 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -504,6 +504,27 @@ GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p, | |||
504 | enum GNUNET_DISK_PipeEnd n); | 504 | enum GNUNET_DISK_PipeEnd n); |
505 | 505 | ||
506 | 506 | ||
507 | #if WINDOWS | ||
508 | /** | ||
509 | * Get a GNUnet file handle from a W32 handle (W32-only). | ||
510 | * Do not call on non-W32 platforms (returns NULL). | ||
511 | * | ||
512 | * @param handle native handle | ||
513 | * @return GNUnet file handle corresponding to the W32 handle | ||
514 | */ | ||
515 | struct GNUNET_DISK_FileHandle * | ||
516 | GNUNET_DISK_get_handle_from_w32_handle (HANDLE osfh); | ||
517 | #endif | ||
518 | |||
519 | /** | ||
520 | * Get a handle from a native integer FD. | ||
521 | * | ||
522 | * @param fd native integer file descriptor | ||
523 | * @return file handle corresponding to the descriptor | ||
524 | */ | ||
525 | struct GNUNET_DISK_FileHandle * | ||
526 | GNUNET_DISK_get_handle_from_int_fd (int fno); | ||
527 | |||
507 | /** | 528 | /** |
508 | * Get a handle from a native FD. | 529 | * Get a handle from a native FD. |
509 | * | 530 | * |