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