Kevin Krammer kevin.krammer at
Wed Mar 21 13:06:42 PDT 2007

On Wednesday 21 March 2007 20:39 +0100, Richard Hughes wrote:
> On Wed, 2007-03-21 at 18:36 +0000, Rob Taylor wrote:
> > Does it need a signal for the capabilities changing? e.g. if not on an
> > active console, or permissions have changed?
> Ahh. Valid point.
> That would require signal like CanSuspendChanged and CanHibernateChanged
> unless we use your bitfield thing.
> > It might also make sense to just have a Capabilities bitfield rather
> > than seperate calls for Suspend, Hibernate, Reboot and Shutdown. You're
> > gonna call all of them at startup anyway, so makeing it one call reduces
> > bus round trip considerably.
> Sure, I appreciate that. Using a bit field does make the API more
> complex (replying on magic constants) rather than a simple boolean
> output. I'm open to doing it using a bitfield if this is common
> consensus, but I must admit I like the individual API myself.

I agree. Bitfield sounds a bit like premature optimization.
I am not sure how often this is expected to be called, but an array of items, 
e.g. array of "usable" method names, might be more flexible.

Or even a list of property dicts, e.g.

{ "Capability" => "Hibernate",
   "Users" => [ "root" ],
   "Groups" => [ "root", "powerdev" ],
   "Access" => "AtConsole" }

Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : 

More information about the xdg mailing list