screensaver and power manager dbus interfaces
Rodrigo Moya
rodrigo at gnome-db.org
Fri Jun 2 16:30:12 EEST 2006
On Fri, 2006-06-02 at 14:09 +0200, Holger Macht wrote:
> >
> > Richard
> >
> > -------------- next part --------------
> > The GNOME Power Manager DBUS API
> > ------------------------------
> >
> > This API is currently unstable and is likely to change in the future.
> >
> > GNOME Power Manager exposes a DBUS API for programs to obtain
> > information about the DPMS state and to change it if required.
> >
> > The following constants are used to uniquely refer to the
> > PowerManager object when making DBUS method calls:
> >
> > DBUS Service: "org.gnome.PowerManager"
> > DBUS Object Path: "/org/gnome/PowerManager"
> > DBUS Interface: "org.gnome.PowerManager"
> >
> > Methods
> > =======
> >
> > Name: Suspend
> > Args: (none)
> > Returns: BOOLEAN
> > Description: This call will attempt to suspend the system.
> >
> > Name: Hibernate
> > Args: (none)
> > Returns: BOOLEAN
> > Description: This call will attempt to hibernate the system.
> >
> > Name: Shutdown
> > Args: (none)
> > Returns: BOOLEAN
> > Description: This call will attempt to shutdown the system.
>
> Why do we need this in a power managmenet context. I think all desktop
> will provide such a "Shutdown method" via dbus regardless of power
> management.
>
I think it makes sense here, in power management interface, since
shutdown = power off. I would even add Reboot here, now that you mention
this.
> >
> > Name: CanSuspend
> > Args: (none)
> > Returns: BOOLEAN
> > Description: This call Finds if the current user in the session
> > is able to suspend, and has permission to do so.
> >
> > Name: CanHibernate
> > Args: (none)
> > Returns: BOOLEAN
> > Description: This call Finds if the current user in the session
> > is able to hibernate, and has permission to do so.
>
> How is this ment to be? Does it just a mirror the corresponding HAL
> methods power_management.can_hibernate/suspend? If so, I think we don't
> need it. Desktops will have a close connection to Hal anyway to query Hal
> itself for this information IMHO.
>
> If the Can{Suspend,Hibernate} methods are not meant to state this, what I
> think we need is something like...
>
> AllowedSuspend and
> AllowedHibernate
>
yeah, this sounds much better, and should return whether the user making
the call is allowed to suspend/hibernate. Maybe I would leave
CanSuspend/Hibernate, to return whether the current system can
suspend/hibernate.
> >
> > Name: setDpmsMode
> > Args: STRING
> > value: on 100%
> > standby <80%
> > suspend <30W
> > off <8W
> > Returns: (nothing)
> > Description: DPMS is a standard from the VESA consortium for
> > managing the power supply of monitors.
> > This call requests a change in the state of DPMS for
> > the current screen.
> >
> > Name: getDpmsMode
> > Args: (none)
> > Returns: STRING
> > Descriptions: Returns the DPMS mode state.
> > See setDpmsMode().
>
> Do we really need them? We have the X extensions/functions for that.
>
for the same reason I think we should add the Reboot and keep Shutdown
methods, I think it's better if apps use only a standard interface for
all power management-related tasks than having to use dbus for some
operations, X libs for another, etc. Of course, as you say, this is just
a convencience wrapper, but that would make it easier for the developer,
I think.
--
Rodrigo Moya <rodrigo at gnome-db.org>
More information about the xdg
mailing list