CK: more paranoia, idle status, and creation-time
William Jon McCann
mccann at jhu.edu
Tue Feb 20 11:51:21 PST 2007
Hey,
On 2/19/07, David Zeuthen <david at fubar.dk> wrote:
> On Mon, 2007-02-19 at 13:56 -0500, William Jon McCann wrote:
> > Perhaps we need to be a little more obvious about this. Maybe we
> > should add the word "hint" in the property name or something like
> > that. For example, instead of ck_session_set_idle
> > ck_session_set_idle_hint.
>
> That'd be nice. I was thinking it might be useful with a method
>
> bool Manager.GetHintAllSessionsIdle()
>
> and a signal
>
> Manager.HintAllSessionsIdleChanged (bool all_sessions_are_idle)
>
> Clearly if no sessions are available the method returns FALSE.
>
> I want to use this in HAL to change the polling frequency on removable
> drives from 2 secs to, say, 30 secs iff all sessions on the system are
> idle. Believe it or not, this thing comes up every time I'm at a
> conference so I'd like to fix it :-)
>
> Of course, this is already possible today given the recent idle status
> stuff, but it requires hald-addon-storage, to track sessions, keep
> scores and in general do a lot of IPC that is not needed if you have the
> global interface. So I think this would be nice. I can write a patch
> (unless you beat me to it!) for this if you want. Thoughts?
Well I found some time today and put this together:
http://gitweb.freedesktop.org/?p=ConsoleKit.git;a=commit;h=eb9361c9b0b05c3bd51de7325c3327db79431fc9
I decided to use the name GetSystemIdleHint because I think perhaps
the name GetAllSessionsIdleHint is a little unclear when there are no
sessions. I'm not married to the name though.
Jon
More information about the hal
mailing list