From 4d37f7a1e94f469fb1e3eacde4d2424ebf6ccf0b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 29 Sep 2016 13:49:01 +0200 Subject: core: refactor private data in "src" - use _NM_GET_PRIVATE() and _NM_GET_PRIVATE_PTR() everywhere. - reorder statements, to have GObject related functions (init, dispose, constructed) at the bottom of each file and in a consistent order w.r.t. each other. - unify whitespaces in signal and properties declarations. - use NM_GOBJECT_PROPERTIES_DEFINE() and _notify() - drop unused signal slots in class structures - drop unused header files for device factories --- src/nm-sleep-monitor.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'src/nm-sleep-monitor.c') diff --git a/src/nm-sleep-monitor.c b/src/nm-sleep-monitor.c index 13ce1be000..ccb99e76ed 100644 --- a/src/nm-sleep-monitor.c +++ b/src/nm-sleep-monitor.c @@ -64,8 +64,17 @@ #endif +/*****************************************************************************/ + +enum { + SLEEPING, + LAST_SIGNAL, +}; + +static guint signals[LAST_SIGNAL] = {0}; + struct _NMSleepMonitor { - GObject parent_instance; + GObject parent; GDBusProxy *proxy; @@ -81,19 +90,11 @@ struct _NMSleepMonitor { }; struct _NMSleepMonitorClass { - GObjectClass parent_class; + GObjectClass parent; }; -enum { - SLEEPING, - LAST_SIGNAL, -}; -static guint signals[LAST_SIGNAL] = {0}; - G_DEFINE_TYPE (NMSleepMonitor, nm_sleep_monitor, G_TYPE_OBJECT); -static void sleep_signal (NMSleepMonitor *self, gboolean is_about_to_suspend); - /*****************************************************************************/ #define _NMLOG_DOMAIN LOGD_SUSPEND @@ -107,6 +108,10 @@ static void sleep_signal (NMSleepMonitor *self, gboolean is_about_to_suspend); /*****************************************************************************/ +static void sleep_signal (NMSleepMonitor *self, gboolean is_about_to_suspend); + +/*****************************************************************************/ + #if USE_UPOWER static void @@ -337,6 +342,8 @@ on_proxy_acquired (GObject *object, #endif } +/*****************************************************************************/ + static void nm_sleep_monitor_init (NMSleepMonitor *self) { -- cgit v1.2.1