libkdenetwork Library API Documentation

io.h

00001 /* io.h - Interface to the I/O functions.
00002    Copyright (C) 2000 Werner Koch (dd9jn)
00003    Copyright (C) 2001, 2002, 2003 g10 Code GmbH
00004 
00005    This file is part of GPGME.
00006  
00007    GPGME is free software; you can redistribute it and/or modify it
00008    under the terms of the GNU General Public License as published by
00009    the Free Software Foundation; either version 2 of the License, or
00010    (at your option) any later version.
00011  
00012    GPGME is distributed in the hope that it will be useful, but
00013    WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    General Public License for more details.
00016  
00017    You should have received a copy of the GNU General Public License
00018    along with GPGME; if not, write to the Free Software Foundation,
00019    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
00020 
00021 #ifndef IO_H
00022 #define IO_H
00023 
00024 /* A single file descriptor passed to spawn.  For child fds, dup_to
00025    specifies the fd it should become in the child.  */
00026 struct spawn_fd_item_s
00027 {
00028   int fd;
00029   int dup_to;
00030 };
00031 
00032 struct io_select_fd_s
00033 {
00034   int fd;
00035   int for_read;
00036   int for_write;
00037   int signaled;
00038   int frozen;
00039   void *opaque;
00040 };
00041 
00042 /* These function are either defined in posix-io.c or w32-io.c.  */
00043 void _gpgme_io_subsystem_init (void);
00044 int _gpgme_io_read (int fd, void *buffer, size_t count);
00045 int _gpgme_io_write (int fd, const void *buffer, size_t count);
00046 int _gpgme_io_pipe (int filedes[2], int inherit_idx);
00047 int _gpgme_io_close (int fd);
00048 int _gpgme_io_set_close_notify (int fd, void (*handler) (int, void *),
00049                 void *value);
00050 int _gpgme_io_set_nonblocking (int fd);
00051 
00052 /* Spawn the executable PATH with ARGV as arguments, after forking
00053    close all fds in FD_PARENT_LIST in the parent and close or dup all
00054    fds in FD_CHILD_LIST in the child.  */
00055 int _gpgme_io_spawn (const char *path, char **argv,
00056              struct spawn_fd_item_s *fd_child_list,
00057              struct spawn_fd_item_s *fd_parent_list);
00058 int _gpgme_io_waitpid (int pid, int hang, int *r_status, int *r_signal);
00059 int _gpgme_io_kill (int pid, int hard);
00060 int _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock);
00061 
00062 #endif /* IO_H */
00063 
00064 
00065 
KDE Logo
This file is part of the documentation for libkdenetwork Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 4 14:39:09 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003