ide-subprocess-supervisor.h 2.49 KB
Newer Older
1 2
/* ide-subprocess-supervisor.h
 *
3
 * Copyright 2016-2019 Christian Hergert <chergert@redhat.com>
4 5 6 7 8 9 10 11 12 13 14 15 16
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * 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 24 25
#if !defined (IDE_THREADING_INSIDE) && !defined (IDE_THREADING_COMPILATION)
# error "Only <libide-threading.h> can be included directly."
#endif
26

27 28 29 30
#include <libide-core.h>

#include "ide-subprocess.h"
#include "ide-subprocess-launcher.h"
31 32 33 34 35

G_BEGIN_DECLS

#define IDE_TYPE_SUBPROCESS_SUPERVISOR (ide_subprocess_supervisor_get_type())

Christian Hergert's avatar
Christian Hergert committed
36
IDE_AVAILABLE_IN_3_32
37 38 39 40 41 42
G_DECLARE_DERIVABLE_TYPE (IdeSubprocessSupervisor, ide_subprocess_supervisor, IDE, SUBPROCESS_SUPERVISOR, GObject)

struct _IdeSubprocessSupervisorClass
{
  GObjectClass parent_class;

43 44 45
  void (*spawned) (IdeSubprocessSupervisor *self,
                   IdeSubprocess           *subprocess);

46
  /*< private >*/
47
  gpointer _reserved[8];
48 49
};

Christian Hergert's avatar
Christian Hergert committed
50
IDE_AVAILABLE_IN_3_32
51
IdeSubprocessSupervisor *ide_subprocess_supervisor_new            (void);
Christian Hergert's avatar
Christian Hergert committed
52
IDE_AVAILABLE_IN_3_32
53
IdeSubprocessLauncher   *ide_subprocess_supervisor_get_launcher   (IdeSubprocessSupervisor *self);
Christian Hergert's avatar
Christian Hergert committed
54
IDE_AVAILABLE_IN_3_32
55 56
void                     ide_subprocess_supervisor_set_launcher   (IdeSubprocessSupervisor *self,
                                                                   IdeSubprocessLauncher   *launcher);
Christian Hergert's avatar
Christian Hergert committed
57
IDE_AVAILABLE_IN_3_32
58
void                     ide_subprocess_supervisor_start          (IdeSubprocessSupervisor *self);
Christian Hergert's avatar
Christian Hergert committed
59
IDE_AVAILABLE_IN_3_32
60
void                     ide_subprocess_supervisor_stop           (IdeSubprocessSupervisor *self);
Christian Hergert's avatar
Christian Hergert committed
61
IDE_AVAILABLE_IN_3_32
62
IdeSubprocess           *ide_subprocess_supervisor_get_subprocess (IdeSubprocessSupervisor *self);
Christian Hergert's avatar
Christian Hergert committed
63
IDE_AVAILABLE_IN_3_32
64 65 66 67
void                     ide_subprocess_supervisor_set_subprocess (IdeSubprocessSupervisor *self,
                                                                   IdeSubprocess           *subprocess);

G_END_DECLS