Debian Codegraph @

src/libsysprof/sysprof-profiler.h

raw
1 /* sysprof-profiler.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 <gio/gio.h>
24
25 #include <sysprof-capture.h>
26
27 #include "sysprof-instrument.h"
28 #include "sysprof-recording.h"
29 #include "sysprof-spawnable.h"
30
31 G_BEGIN_DECLS
32
33 #define SYSPROF_TYPE_PROFILER (sysprof_profiler_get_type())
34
35 SYSPROF_AVAILABLE_IN_ALL
36 G_DECLARE_FINAL_TYPE (SysprofProfiler, sysprof_profiler, SYSPROF, PROFILER, GObject)
37
38 SYSPROF_AVAILABLE_IN_ALL
39 SysprofProfiler *sysprof_profiler_new (void);
40 SYSPROF_AVAILABLE_IN_ALL
41 SysprofSpawnable *sysprof_profiler_get_spawnable (SysprofProfiler *self);
42 SYSPROF_AVAILABLE_IN_ALL
43 void sysprof_profiler_set_spawnable (SysprofProfiler *self,
44 SysprofSpawnable *spawnable);
45 SYSPROF_AVAILABLE_IN_ALL
46 void sysprof_profiler_add_instrument (SysprofProfiler *self,
47 SysprofInstrument *instrument);
48 SYSPROF_AVAILABLE_IN_ALL
49 void sysprof_profiler_record_async (SysprofProfiler *self,
50 SysprofCaptureWriter *writer,
51 GCancellable *cancellable,
52 GAsyncReadyCallback callback,
53 gpointer user_data);
54 SYSPROF_AVAILABLE_IN_ALL
55 SysprofRecording *sysprof_profiler_record_finish (SysprofProfiler *self,
56 GAsyncResult *result,
57 GError **error);
58 SYSPROF_AVAILABLE_IN_49
59 gboolean sysprof_profiler_get_acquire_privileges (SysprofProfiler *self);
60 SYSPROF_AVAILABLE_IN_49
61 void sysprof_profiler_set_acquire_privileges (SysprofProfiler *self,
62 gboolean acquire_privileges);
63
64 G_END_DECLS