| 1 |
/* sysprof-subprocess-output.h |
| 2 |
* |
| 3 |
* Copyright 2023 Christian Hergert <[email protected]> |
| 4 |
* |
| 5 |
* This program is free software: you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation, either version 3 of the License, or |
| 8 |
* (at your option) any later version. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
* |
| 18 |
* SPDX-License-Identifier: GPL-3.0-or-later |
| 19 |
*/ |
| 20 |
|
| 21 |
#pragma once |
| 22 |
|
| 23 |
#include "sysprof-instrument.h" |
| 24 |
#include "sysprof-recording.h" |
| 25 |
|
| 26 |
G_BEGIN_DECLS |
| 27 |
|
| 28 |
#define SYSPROF_TYPE_SUBPROCESS_OUTPUT (sysprof_subprocess_output_get_type()) |
| 29 |
#define SYSPROF_IS_SUBPROCESS_OUTPUT(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, SYSPROF_TYPE_SUBPROCESS_OUTPUT) |
| 30 |
#define SYSPROF_SUBPROCESS_OUTPUT(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, SYSPROF_TYPE_SUBPROCESS_OUTPUT, SysprofSubprocessOutput) |
| 31 |
#define SYSPROF_SUBPROCESS_OUTPUT_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass, SYSPROF_TYPE_SUBPROCESS_OUTPUT, SysprofSubprocessOutputClass) |
| 32 |
|
| 33 |
typedef struct _SysprofSubprocessOutput SysprofSubprocessOutput; |
| 34 |
typedef struct _SysprofSubprocessOutputClass SysprofSubprocessOutputClass; |
| 35 |
|
| 36 |
SYSPROF_AVAILABLE_IN_ALL |
| 37 |
GType sysprof_subprocess_output_get_type (void) G_GNUC_CONST; |
| 38 |
SYSPROF_AVAILABLE_IN_ALL |
| 39 |
SysprofRecordingPhase sysprof_subprocess_output_get_phase (SysprofSubprocessOutput *self); |
| 40 |
SYSPROF_AVAILABLE_IN_ALL |
| 41 |
void sysprof_subprocess_output_set_phase (SysprofSubprocessOutput *self, |
| 42 |
SysprofRecordingPhase phase); |
| 43 |
SYSPROF_AVAILABLE_IN_ALL |
| 44 |
SysprofInstrument *sysprof_subprocess_output_new (void); |
| 45 |
SYSPROF_AVAILABLE_IN_ALL |
| 46 |
const char *sysprof_subprocess_output_get_stdout_path (SysprofSubprocessOutput *self); |
| 47 |
SYSPROF_AVAILABLE_IN_ALL |
| 48 |
const char *sysprof_subprocess_output_get_command_cwd (SysprofSubprocessOutput *self); |
| 49 |
SYSPROF_AVAILABLE_IN_ALL |
| 50 |
const char * const *sysprof_subprocess_output_get_command_argv (SysprofSubprocessOutput *self); |
| 51 |
SYSPROF_AVAILABLE_IN_ALL |
| 52 |
const char * const *sysprof_subprocess_output_get_command_environ (SysprofSubprocessOutput *self); |
| 53 |
SYSPROF_AVAILABLE_IN_ALL |
| 54 |
void sysprof_subprocess_output_set_stdout_path (SysprofSubprocessOutput *self, |
| 55 |
const char *stdout_path); |
| 56 |
SYSPROF_AVAILABLE_IN_ALL |
| 57 |
void sysprof_subprocess_output_set_command_cwd (SysprofSubprocessOutput *self, |
| 58 |
const char *command_cwd); |
| 59 |
SYSPROF_AVAILABLE_IN_ALL |
| 60 |
void sysprof_subprocess_output_set_command_argv (SysprofSubprocessOutput *self, |
| 61 |
const char * const *command_argv); |
| 62 |
SYSPROF_AVAILABLE_IN_ALL |
| 63 |
void sysprof_subprocess_output_set_command_environ (SysprofSubprocessOutput *self, |
| 64 |
const char * const *command_environ); |
| 65 |
|
| 66 |
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofSubprocessOutput, g_object_unref) |
| 67 |
|
| 68 |
G_END_DECLS |