| 1 |
/* sysprof-instrument-private.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 <libdex.h> |
| 24 |
|
| 25 |
#include "sysprof-instrument.h" |
| 26 |
#include "sysprof-recording.h" |
| 27 |
|
| 28 |
G_BEGIN_DECLS |
| 29 |
|
| 30 |
#define SYSPROF_INSTRUMENT_GET_CLASS(obj) G_TYPE_INSTANCE_GET_CLASS(obj, SYSPROF_TYPE_INSTRUMENT, SysprofInstrumentClass) |
| 31 |
|
| 32 |
struct _SysprofInstrument |
| 33 |
{ |
| 34 |
GObject parent; |
| 35 |
}; |
| 36 |
|
| 37 |
struct _SysprofInstrumentClass |
| 38 |
{ |
| 39 |
GObjectClass parent_class; |
| 40 |
|
| 41 |
char **(*list_required_policy) (SysprofInstrument *self); |
| 42 |
void (*set_connection) (SysprofInstrument *self, |
| 43 |
GDBusConnection *connection); |
| 44 |
DexFuture *(*prepare) (SysprofInstrument *self, |
| 45 |
SysprofRecording *recording); |
| 46 |
DexFuture *(*record) (SysprofInstrument *self, |
| 47 |
SysprofRecording *recording, |
| 48 |
GCancellable *cancellable); |
| 49 |
DexFuture *(*augment) (SysprofInstrument *self, |
| 50 |
SysprofRecording *recording); |
| 51 |
DexFuture *(*process_started) (SysprofInstrument *self, |
| 52 |
SysprofRecording *recording, |
| 53 |
int pid, |
| 54 |
const char *comm); |
| 55 |
}; |
| 56 |
|
| 57 |
void _sysprof_instruments_set_connection (GPtrArray *instruments, |
| 58 |
GDBusConnection *connection); |
| 59 |
DexFuture *_sysprof_instruments_acquire_policy (GPtrArray *instruments, |
| 60 |
SysprofRecording *recording); |
| 61 |
DexFuture *_sysprof_instruments_prepare (GPtrArray *instruments, |
| 62 |
SysprofRecording *recording); |
| 63 |
DexFuture *_sysprof_instruments_record (GPtrArray *instruments, |
| 64 |
SysprofRecording *recording, |
| 65 |
GCancellable *cancellable); |
| 66 |
DexFuture *_sysprof_instruments_augment (GPtrArray *instruments, |
| 67 |
SysprofRecording *recording); |
| 68 |
DexFuture *_sysprof_instruments_process_started (GPtrArray *instruments, |
| 69 |
SysprofRecording *recording, |
| 70 |
int pid, |
| 71 |
const char *comm); |
| 72 |
|
| 73 |
G_END_DECLS |