Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:00:00

0001 /* GIO - GLib Input, Output and Streaming Library
0002  *
0003  * Copyright © 2012,2013 Colin Walters <walters@verbum.org>
0004  * Copyright © 2012,2013 Canonical Limited
0005  *
0006  * SPDX-License-Identifier: LGPL-2.1-or-later
0007  *
0008  * This library is free software; you can redistribute it and/or
0009  * modify it under the terms of the GNU Lesser General Public
0010  * License as published by the Free Software Foundation; either
0011  * version 2.1 of the License, or (at your option) any later version.
0012  *
0013  * This library is distributed in the hope that it will be useful,
0014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0016  * Lesser General Public License for more details.
0017  *
0018  * You should have received a copy of the GNU Lesser General
0019  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0020  *
0021  * Author: Ryan Lortie <desrt@desrt.ca>
0022  * Author: Colin Walters <walters@verbum.org>
0023  */
0024 
0025 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0026 #error "Only <gio/gio.h> can be included directly."
0027 #endif
0028 
0029 #ifndef __G_SUBPROCESS_LAUNCHER_H__
0030 #define __G_SUBPROCESS_LAUNCHER_H__
0031 
0032 #include <gio/giotypes.h>
0033 
0034 G_BEGIN_DECLS
0035 
0036 #define G_TYPE_SUBPROCESS_LAUNCHER         (g_subprocess_launcher_get_type ())
0037 #define G_SUBPROCESS_LAUNCHER(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_SUBPROCESS_LAUNCHER, GSubprocessLauncher))
0038 #define G_IS_SUBPROCESS_LAUNCHER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_SUBPROCESS_LAUNCHER))
0039 
0040 GIO_AVAILABLE_IN_2_40
0041 GType                   g_subprocess_launcher_get_type                  (void) G_GNUC_CONST;
0042 
0043 GIO_AVAILABLE_IN_2_40
0044 GSubprocessLauncher *   g_subprocess_launcher_new                       (GSubprocessFlags       flags);
0045 
0046 GIO_AVAILABLE_IN_2_40
0047 GSubprocess *           g_subprocess_launcher_spawn                     (GSubprocessLauncher   *self,
0048                                                                          GError               **error,
0049                                                                          const gchar           *argv0,
0050                                                                          ...) G_GNUC_NULL_TERMINATED;
0051 
0052 GIO_AVAILABLE_IN_2_40
0053 GSubprocess *           g_subprocess_launcher_spawnv                    (GSubprocessLauncher   *self,
0054                                                                          const gchar * const   *argv,
0055                                                                          GError               **error);
0056 
0057 GIO_AVAILABLE_IN_2_40
0058 void                    g_subprocess_launcher_set_environ               (GSubprocessLauncher   *self,
0059                                                                          gchar                **env);
0060 
0061 GIO_AVAILABLE_IN_2_40
0062 void                    g_subprocess_launcher_setenv                    (GSubprocessLauncher   *self,
0063                                                                          const gchar           *variable,
0064                                                                          const gchar           *value,
0065                                                                          gboolean               overwrite);
0066 
0067 GIO_AVAILABLE_IN_2_40
0068 void                    g_subprocess_launcher_unsetenv                  (GSubprocessLauncher *self,
0069                                                                          const gchar         *variable);
0070 
0071 GIO_AVAILABLE_IN_2_40
0072 const gchar *           g_subprocess_launcher_getenv                    (GSubprocessLauncher   *self,
0073                                                                          const gchar           *variable);
0074 
0075 GIO_AVAILABLE_IN_2_40
0076 void                    g_subprocess_launcher_set_cwd                   (GSubprocessLauncher   *self,
0077                                                                          const gchar           *cwd);
0078 GIO_AVAILABLE_IN_2_40
0079 void                    g_subprocess_launcher_set_flags                 (GSubprocessLauncher   *self,
0080                                                                          GSubprocessFlags       flags);
0081 
0082 /* Extended I/O control, only available on UNIX */
0083 #ifdef G_OS_UNIX
0084 GIO_AVAILABLE_IN_2_40
0085 void                    g_subprocess_launcher_set_stdin_file_path       (GSubprocessLauncher   *self,
0086                                                                          const gchar           *path);
0087 GIO_AVAILABLE_IN_2_40
0088 void                    g_subprocess_launcher_take_stdin_fd             (GSubprocessLauncher   *self,
0089                                                                          gint                   fd);
0090 GIO_AVAILABLE_IN_2_40
0091 void                    g_subprocess_launcher_set_stdout_file_path      (GSubprocessLauncher   *self,
0092                                                                          const gchar           *path);
0093 GIO_AVAILABLE_IN_2_40
0094 void                    g_subprocess_launcher_take_stdout_fd            (GSubprocessLauncher   *self,
0095                                                                          gint                   fd);
0096 GIO_AVAILABLE_IN_2_40
0097 void                    g_subprocess_launcher_set_stderr_file_path      (GSubprocessLauncher   *self,
0098                                                                          const gchar           *path);
0099 GIO_AVAILABLE_IN_2_40
0100 void                    g_subprocess_launcher_take_stderr_fd            (GSubprocessLauncher   *self,
0101                                                                          gint                   fd);
0102 
0103 GIO_AVAILABLE_IN_2_40
0104 void                    g_subprocess_launcher_take_fd                   (GSubprocessLauncher   *self,
0105                                                                          gint                   source_fd,
0106                                                                          gint                   target_fd);
0107 
0108 GIO_AVAILABLE_IN_2_68
0109 void                    g_subprocess_launcher_close                     (GSubprocessLauncher      *self);
0110 
0111 /* Child setup, only available on UNIX */
0112 GIO_AVAILABLE_IN_2_40
0113 void                    g_subprocess_launcher_set_child_setup           (GSubprocessLauncher   *self,
0114                                                                          GSpawnChildSetupFunc   child_setup,
0115                                                                          gpointer               user_data,
0116                                                                          GDestroyNotify         destroy_notify);
0117 #endif
0118 
0119 G_END_DECLS
0120 
0121 #endif /* __G_SUBPROCESS_H__ */