Top | ![]() |
![]() |
![]() |
![]() |
GInputStream *
ide_subprocess_get_stdout_pipe (IdeSubprocess *self
);
GInputStream *
ide_subprocess_get_stderr_pipe (IdeSubprocess *self
);
GOutputStream *
ide_subprocess_get_stdin_pipe (IdeSubprocess *self
);
gboolean ide_subprocess_wait (IdeSubprocess *self
,GCancellable *cancellable
,GError **error
);
gboolean ide_subprocess_wait_check (IdeSubprocess *self
,GCancellable *cancellable
,GError **error
);
void ide_subprocess_wait_async (IdeSubprocess *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gboolean ide_subprocess_wait_finish (IdeSubprocess *self
,GAsyncResult *result
,GError **error
);
void ide_subprocess_wait_check_async (IdeSubprocess *self
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gboolean ide_subprocess_wait_check_finish (IdeSubprocess *self
,GAsyncResult *result
,GError **error
);
gboolean ide_subprocess_check_exit_status (IdeSubprocess *self
,GError **error
);
void ide_subprocess_send_signal (IdeSubprocess *self
,gint signal_num
);
gboolean ide_subprocess_communicate (IdeSubprocess *self
,GBytes *stdin_buf
,GCancellable *cancellable
,GBytes **stdout_buf
,GBytes **stderr_buf
,GError **error
);
gboolean ide_subprocess_communicate_utf8 (IdeSubprocess *self
,const gchar *stdin_buf
,GCancellable *cancellable
,gchar **stdout_buf
,gchar **stderr_buf
,GError **error
);
This process acts identical to g_subprocess_communicate_utf8()
.
void ide_subprocess_communicate_async (IdeSubprocess *self
,GBytes *stdin_buf
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronously communicates with the the child process.
There is no need to call ide_subprocess_wait()
on the process if using
this asynchronous operation as it will internally wait for the child
to exit or be signaled.
Ensure you've set the proper flags to ensure that you can write to stdin or read from stderr/stdout as necessary.
gboolean ide_subprocess_communicate_finish (IdeSubprocess *self
,GAsyncResult *result
,GBytes **stdout_buf
,GBytes **stderr_buf
,GError **error
);
Finishes a request to ide_subprocess_communicate_async()
.
void ide_subprocess_communicate_utf8_async (IdeSubprocess *self
,const gchar *stdin_buf
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
gboolean ide_subprocess_communicate_utf8_finish (IdeSubprocess *self
,GAsyncResult *result
,gchar **stdout_buf
,gchar **stderr_buf
,GError **error
);
struct IdeSubprocessInterface { GTypeInterface parent_interface; const gchar *(*get_identifier) (IdeSubprocess *self); GInputStream *(*get_stdout_pipe) (IdeSubprocess *self); GInputStream *(*get_stderr_pipe) (IdeSubprocess *self); GOutputStream *(*get_stdin_pipe) (IdeSubprocess *self); gboolean (*wait) (IdeSubprocess *self, GCancellable *cancellable, GError **error); void (*wait_async) (IdeSubprocess *self, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (*wait_finish) (IdeSubprocess *self, GAsyncResult *result, GError **error); gboolean (*get_successful) (IdeSubprocess *self); gboolean (*get_if_exited) (IdeSubprocess *self); gint (*get_exit_status) (IdeSubprocess *self); gboolean (*get_if_signaled) (IdeSubprocess *self); gint (*get_term_sig) (IdeSubprocess *self); gint (*get_status) (IdeSubprocess *self); void (*send_signal) (IdeSubprocess *self, gint signal_num); void (*force_exit) (IdeSubprocess *self); gboolean (*communicate) (IdeSubprocess *self, GBytes *stdin_buf, GCancellable *cancellable, GBytes **stdout_buf, GBytes **stderr_buf, GError **error); gboolean (*communicate_utf8) (IdeSubprocess *self, const gchar *stdin_buf, GCancellable *cancellable, gchar **stdout_buf, gchar **stderr_buf, GError **error); void (*communicate_async) (IdeSubprocess *self, GBytes *stdin_buf, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (*communicate_finish) (IdeSubprocess *self, GAsyncResult *result, GBytes **stdout_buf, GBytes **stderr_buf, GError **error); void (*communicate_utf8_async) (IdeSubprocess *self, const gchar *stdin_buf, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean (*communicate_utf8_finish) (IdeSubprocess *self, GAsyncResult *result, gchar **stdout_buf, gchar **stderr_buf, GError **error); };