[gnome-power-manager] trivial: unexport gpm_control_allowed_suspend() and gpm_control_allowed_hibernate() stubs



commit e2ce87a4ccea29bcd838a12a3538ce4bde7baa5e
Author: Richard Hughes <richard hughsie com>
Date:   Thu Oct 15 15:55:46 2009 +0100

    trivial: unexport gpm_control_allowed_suspend() and gpm_control_allowed_hibernate() stubs

 src/gpm-control.c |   44 ++++++--------------------------------------
 src/gpm-control.h |    9 ---------
 2 files changed, 6 insertions(+), 47 deletions(-)
---
diff --git a/src/gpm-control.c b/src/gpm-control.c
index 734c733..92f72f2 100644
--- a/src/gpm-control.c
+++ b/src/gpm-control.c
@@ -86,41 +86,6 @@ gpm_control_error_quark (void)
 }
 
 /**
- * gpm_control_allowed_suspend:
- * @control: This class instance
- * @can: If we can suspend
- *
- * checks gconf to see if we are allowed to suspend this computer.
- **/
-gboolean
-gpm_control_allowed_suspend (GpmControl *control, gboolean *can, GError **error)
-{
-	/* get values from DkpClient */
-	g_object_get (control->priv->client,
-		      "can-suspend", can,
-		      NULL);
-	return TRUE;
-}
-
-/**
- * gpm_control_allowed_hibernate:
- * @control: This class instance
- * @can: If we can hibernate
- *
- * Checks the HAL key power_management.can_suspend_to_disk and also
- * checks gconf to see if we are allowed to hibernate this computer.
- **/
-gboolean
-gpm_control_allowed_hibernate (GpmControl *control, gboolean *can, GError **error)
-{
-	/* get values from DkpClient */
-	g_object_get (control->priv->client,
-		      "can-hibernate", can,
-		      NULL);
-	return TRUE;
-}
-
-/**
  * gpm_control_shutdown:
  * @control: This class instance
  *
@@ -184,7 +149,9 @@ gpm_control_suspend (GpmControl *control, GError **error)
 
 	screensaver = gpm_screensaver_new ();
 
-	gpm_control_allowed_suspend (control, &allowed, error);
+	g_object_get (control->priv->client,
+		      "can-suspend", &allowed,
+		      NULL);
 	if (allowed == FALSE) {
 		egg_debug ("cannot suspend as not allowed from policy");
 		g_set_error (error,
@@ -259,8 +226,9 @@ gpm_control_hibernate (GpmControl *control, GError **error)
 
 	screensaver = gpm_screensaver_new ();
 
-	gpm_control_allowed_hibernate (control, &allowed, error);
-
+	g_object_get (control->priv->client,
+		      "can-hibernate", &allowed,
+		      NULL);
 	if (allowed == FALSE) {
 		egg_debug ("cannot hibernate as not allowed from policy");
 		g_set_error (error,
diff --git a/src/gpm-control.h b/src/gpm-control.h
index 3958543..e2e7b42 100644
--- a/src/gpm-control.h
+++ b/src/gpm-control.h
@@ -74,15 +74,6 @@ typedef struct
 GQuark		 gpm_control_error_quark		(void);
 GType		 gpm_control_get_type			(void);
 GpmControl	*gpm_control_new			(void);
-gboolean	 gpm_control_allowed_suspend		(GpmControl	*control,
-							 gboolean	*can,
-							 GError		**error);
-gboolean	 gpm_control_allowed_hibernate		(GpmControl	*control,
-							 gboolean	*can,
-							 GError		**error);
-gboolean	 gpm_control_allowed_shutdown		(GpmControl	*control,
-							 gboolean	*can,
-							 GError		**error);
 gboolean	 gpm_control_suspend			(GpmControl	*control,
 							 GError		**error);
 gboolean	 gpm_control_hibernate			(GpmControl	*control,



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