1 /* GIO - GLib Input, Output and Streaming Library
3 * Copyright © 2012,2013 Colin Walters <walters@verbum.org>
4 * Copyright © 2012,2013 Canonical Limited
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library 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 GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General
17 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 * Author: Ryan Lortie <desrt@desrt.ca>
20 * Author: Colin Walters <walters@verbum.org>
23 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
24 #error "Only <gio/gio.h> can be included directly."
27 #ifndef __G_SUBPROCESS_LAUNCHER_H__
28 #define __G_SUBPROCESS_LAUNCHER_H__
30 #include <gio/giotypes.h>
34 #define G_TYPE_SUBPROCESS_LAUNCHER (g_subprocess_launcher_get_type ())
35 #define G_SUBPROCESS_LAUNCHER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SUBPROCESS_LAUNCHER, GSubprocessLauncher))
36 #define G_IS_SUBPROCESS_LAUNCHER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SUBPROCESS_LAUNCHER))
38 GLIB_AVAILABLE_IN_2_40
39 GType
g_subprocess_launcher_get_type (void) G_GNUC_CONST
;
41 GLIB_AVAILABLE_IN_2_40
42 GSubprocessLauncher
* g_subprocess_launcher_new (GSubprocessFlags flags
);
44 GLIB_AVAILABLE_IN_2_40
45 GSubprocess
* g_subprocess_launcher_spawn (GSubprocessLauncher
*self
,
48 ...) G_GNUC_NULL_TERMINATED
;
50 GLIB_AVAILABLE_IN_2_40
51 GSubprocess
* g_subprocess_launcher_spawnv (GSubprocessLauncher
*self
,
52 const gchar
* const *argv
,
55 GLIB_AVAILABLE_IN_2_40
56 void g_subprocess_launcher_set_environ (GSubprocessLauncher
*self
,
59 GLIB_AVAILABLE_IN_2_40
60 void g_subprocess_launcher_setenv (GSubprocessLauncher
*self
,
61 const gchar
*variable
,
65 GLIB_AVAILABLE_IN_2_40
66 void g_subprocess_launcher_unsetenv (GSubprocessLauncher
*self
,
67 const gchar
*variable
);
69 GLIB_AVAILABLE_IN_2_40
70 const gchar
* g_subprocess_launcher_getenv (GSubprocessLauncher
*self
,
71 const gchar
*variable
);
73 GLIB_AVAILABLE_IN_2_40
74 void g_subprocess_launcher_set_cwd (GSubprocessLauncher
*self
,
76 GLIB_AVAILABLE_IN_2_40
77 void g_subprocess_launcher_set_flags (GSubprocessLauncher
*self
,
78 GSubprocessFlags flags
);
80 /* Extended I/O control, only available on UNIX */
82 GLIB_AVAILABLE_IN_2_40
83 void g_subprocess_launcher_set_stdin_file_path (GSubprocessLauncher
*self
,
85 GLIB_AVAILABLE_IN_2_40
86 void g_subprocess_launcher_take_stdin_fd (GSubprocessLauncher
*self
,
88 GLIB_AVAILABLE_IN_2_40
89 void g_subprocess_launcher_set_stdout_file_path (GSubprocessLauncher
*self
,
91 GLIB_AVAILABLE_IN_2_40
92 void g_subprocess_launcher_take_stdout_fd (GSubprocessLauncher
*self
,
94 GLIB_AVAILABLE_IN_2_40
95 void g_subprocess_launcher_set_stderr_file_path (GSubprocessLauncher
*self
,
97 GLIB_AVAILABLE_IN_2_40
98 void g_subprocess_launcher_take_stderr_fd (GSubprocessLauncher
*self
,
101 GLIB_AVAILABLE_IN_2_40
102 void g_subprocess_launcher_take_fd (GSubprocessLauncher
*self
,
106 /* Child setup, only available on UNIX */
107 GLIB_AVAILABLE_IN_2_40
108 void g_subprocess_launcher_set_child_setup (GSubprocessLauncher
*self
,
109 GSpawnChildSetupFunc child_setup
,
111 GDestroyNotify destroy_notify
);
116 #endif /* __G_SUBPROCESS_H__ */