summaryrefslogtreecommitdiffstats
path: root/libkdenetwork/libgpgme-copy/gpgme/priv-io.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch)
tree67208f7c145782a7e90b123b982ca78d88cc2c87 /libkdenetwork/libgpgme-copy/gpgme/priv-io.h
downloadtdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz
tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdenetwork/libgpgme-copy/gpgme/priv-io.h')
-rw-r--r--libkdenetwork/libgpgme-copy/gpgme/priv-io.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/libkdenetwork/libgpgme-copy/gpgme/priv-io.h b/libkdenetwork/libgpgme-copy/gpgme/priv-io.h
new file mode 100644
index 000000000..4c2a604aa
--- /dev/null
+++ b/libkdenetwork/libgpgme-copy/gpgme/priv-io.h
@@ -0,0 +1,67 @@
+/* priv-io.h - Interface to the private I/O functions.
+ Copyright (C) 2000 Werner Koch (dd9jn)
+ Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH
+
+ This file is part of GPGME.
+
+ GPGME is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ GPGME is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
+
+#ifndef IO_H
+#define IO_H
+
+
+/* A single file descriptor passed to spawn. For child fds, dup_to
+ specifies the fd it should become in the child. */
+struct spawn_fd_item_s
+{
+ int fd;
+ int dup_to;
+};
+
+struct io_select_fd_s
+{
+ int fd;
+ int for_read;
+ int for_write;
+ int signaled;
+ int frozen;
+ void *opaque;
+};
+
+/* These function are either defined in posix-io.c or w32-io.c. */
+void _gpgme_io_subsystem_init (void);
+int _gpgme_io_read (int fd, void *buffer, size_t count);
+int _gpgme_io_write (int fd, const void *buffer, size_t count);
+int _gpgme_io_pipe (int filedes[2], int inherit_idx);
+int _gpgme_io_close (int fd);
+int _gpgme_io_set_close_notify (int fd, void (*handler) (int, void *),
+ void *value);
+int _gpgme_io_set_nonblocking (int fd);
+
+/* Spawn the executable PATH with ARGV as arguments, after forking
+ close all fds in FD_PARENT_LIST in the parent and close or dup all
+ fds in FD_CHILD_LIST in the child. */
+int _gpgme_io_spawn (const char *path, char **argv,
+ struct spawn_fd_item_s *fd_child_list,
+ struct spawn_fd_item_s *fd_parent_list);
+int _gpgme_io_select (struct io_select_fd_s *fds, size_t nfds, int nonblock);
+
+/* Write the printable version of FD to the buffer BUF of length
+ BUFLEN. The printable version is the representation on the command
+ line that the child process expects. */
+int _gpgme_io_fd2str (char *buf, int buflen, int fd);
+
+#endif /* IO_H */