Debian Codegraph @

lib/wp/proc-utils.h

raw
1 /* WirePlumber
2 *
3 * Copyright © 2024 Collabora Ltd.
4 * @author Julian Bouzas <[email protected]>
5 *
6 * SPDX-License-Identifier: MIT
7 */
8
9 #ifndef __WIREPLUMBER_PROC_UTILS_H__
10 #define __WIREPLUMBER_PROC_UTILS_H__
11
12 #include <gio/gio.h>
13
14 G_BEGIN_DECLS
15
16 /*!
17 * \brief The WpProcInfo GType
18 * \ingroup wpprocutils
19 */
20 #define WP_TYPE_PROC_INFO (wp_proc_info_get_type ())
21 WP_API
22 GType wp_proc_info_get_type (void);
23
24 typedef struct _WpProcInfo WpProcInfo;
25
26 WP_API
27 WpProcInfo *wp_proc_info_ref (WpProcInfo * self);
28
29 WP_API
30 void wp_proc_info_unref (WpProcInfo * self);
31
32 WP_API
33 pid_t wp_proc_info_get_pid (WpProcInfo * self);
34
35 WP_API
36 pid_t wp_proc_info_get_parent_pid (WpProcInfo * self);
37
38 WP_API
39 guint wp_proc_info_get_n_args (WpProcInfo * self);
40
41 WP_API
42 const gchar *wp_proc_info_get_arg (WpProcInfo * self, guint index);
43
44 WP_API
45 const gchar *wp_proc_info_get_cgroup (WpProcInfo * self);
46
47 G_DEFINE_AUTOPTR_CLEANUP_FUNC (WpProcInfo, wp_proc_info_unref)
48
49 WP_API
50 WpProcInfo *wp_proc_utils_get_proc_info (pid_t pid);
51
52 G_END_DECLS
53
54 #endif