[gnome-settings-daemon] power: Add an internal error quark for future code



commit e65413fd427c7c88be2a5bac2ed253bf5360838a
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jun 23 11:51:25 2011 +0100

    power: Add an internal error quark for future code

 plugins/power/gsd-power-manager.c |    9 +++++++++
 plugins/power/gsd-power-manager.h |    7 +++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index b7f668d..ed07695 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -94,6 +94,15 @@ G_DEFINE_TYPE (GsdPowerManager, gsd_power_manager, G_TYPE_OBJECT)
 
 static gpointer manager_object = NULL;
 
+GQuark
+gsd_power_manager_error_quark (void)
+{
+        static GQuark quark = 0;
+        if (!quark)
+                quark = g_quark_from_static_string ("gsd_power_manager_error");
+        return quark;
+}
+
 static void
 gnome_session_shutdown_cb (GObject *source_object,
                            GAsyncResult *res,
diff --git a/plugins/power/gsd-power-manager.h b/plugins/power/gsd-power-manager.h
index aaf3647..3440faf 100644
--- a/plugins/power/gsd-power-manager.h
+++ b/plugins/power/gsd-power-manager.h
@@ -31,6 +31,7 @@ G_BEGIN_DECLS
 #define GSD_IS_POWER_MANAGER(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GSD_TYPE_POWER_MANAGER))
 #define GSD_IS_POWER_MANAGER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GSD_TYPE_POWER_MANAGER))
 #define GSD_POWER_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GSD_TYPE_POWER_MANAGER, GsdPowerManagerClass))
+#define GSD_POWER_MANAGER_ERROR        (gsd_power_manager_error_quark ())
 
 typedef struct GsdPowerManagerPrivate GsdPowerManagerPrivate;
 
@@ -45,7 +46,13 @@ typedef struct
         GObjectClass   parent_class;
 } GsdPowerManagerClass;
 
+enum
+{
+        GSD_POWER_MANAGER_ERROR_FAILED
+};
+
 GType                   gsd_power_manager_get_type            (void);
+GQuark                  gsd_power_manager_error_quark         (void);
 
 GsdPowerManager *       gsd_power_manager_new                 (void);
 gboolean                gsd_power_manager_start               (GsdPowerManager *manager,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]