1 /* GIO - GLib Input, Output and Streaming Library
2 *
3 * Copyright 2019 Red Hat, Inc.
4 * Copyright 2021 Igalia S.L.
5 *
6 * SPDX-License-Identifier: LGPL-2.1-or-later
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General
19 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
20 */
21
22 #ifndef __G_POWER_PROFILE_MONITOR_H__
23 #define __G_POWER_PROFILE_MONITOR_H__
24
25 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
26 #error "Only <gio/gio.h> can be included directly."
27 #endif
28
29 #include <gio/giotypes.h>
30
31 G_BEGIN_DECLS
32
33 /**
34 * G_POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME:
35 *
36 * Extension point for power profile usage monitoring functionality.
37 * See [Extending GIO][extending-gio].
38 *
39 * Since: 2.70
40 */
41 #define G_POWER_PROFILE_MONITOR_EXTENSION_POINT_NAME "gio-power-profile-monitor"
42
43 #define G_TYPE_POWER_PROFILE_MONITOR (g_power_profile_monitor_get_type ())
44 GIO_AVAILABLE_IN_2_70
45 G_DECLARE_INTERFACE (GPowerProfileMonitor, g_power_profile_monitor, g, power_profile_monitor, GObject)
46
47 #define G_POWER_PROFILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_POWER_PROFILE_MONITOR, GPowerProfileMonitor))
48 #define G_IS_POWER_PROFILE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_POWER_PROFILE_MONITOR))
49 #define G_POWER_PROFILE_MONITOR_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_POWER_PROFILE_MONITOR, GPowerProfileMonitorInterface))
50
51 struct _GPowerProfileMonitorInterface
52 {
53 /*< private >*/
54 GTypeInterface g_iface;
55 };
56
57 GIO_AVAILABLE_IN_2_70
58 GPowerProfileMonitor *g_power_profile_monitor_dup_default (void);
59
60 GIO_AVAILABLE_IN_2_70
61 gboolean g_power_profile_monitor_get_power_saver_enabled (GPowerProfileMonitor *monitor);
62
63 G_END_DECLS
64
65 #endif /* __G_POWER_PROFILE_MONITOR_H__ */