1 /* io.h - I/O functions
2 * Copyright (C) 2000 Werner Koch (dd9jn)
4 * This file is part of GPGME.
6 * GPGME is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * GPGME is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
26 struct spawn_fd_item_s {
32 struct io_select_fd_s {
43 /* These function are either defined in posix-io.c or w32-io.c */
45 int _gpgme_io_read ( int fd, void *buffer, size_t count );
46 int _gpgme_io_write ( int fd, const void *buffer, size_t count );
47 int _gpgme_io_pipe ( int filedes[2], int inherit_idx );
48 int _gpgme_io_close ( int fd );
49 int _gpgme_io_set_close_notify (int fd,
50 void (*handler)(int, void*), void *value);
51 int _gpgme_io_set_nonblocking ( int fd );
52 int _gpgme_io_spawn ( const char *path, char **argv,
53 struct spawn_fd_item_s *fd_child_list,
54 struct spawn_fd_item_s *fd_parent_list );
55 int _gpgme_io_waitpid ( int pid, int hang, int *r_status, int *r_signal );
56 int _gpgme_io_kill ( int pid, int hard );
57 int _gpgme_io_select ( struct io_select_fd_s *fds, size_t nfds);