Session Management Proposal
Ray Strode
halfline at hawaii.rr.com
Wed Dec 31 10:49:53 EET 2003
Hi,
I've incorporated most things that have been discussed so
far into the spec. It's attached in docbook xml and online as html at
http://www.grokthecruft.org/dsme/. Improvements will be appreciated.
I did add something to the spec about session managers reporting to
their clients what shutdown modes are available.
Having the session manager set properties (opposed to having clients
set properties) is bit of an ugly situation because the XSMP (and
SMlib) never planned for it to happen. For one thing, there is no
client notification when properties are set, which means if clients
want to watch properties they are going to have to resort to polling.
If a client wants to watch some properties it basically has to do
something along the lines of:
/* in a timeout that runs every once in a while */
/* queue a request for the session manager to
send all the properties that belong to the client back to the
client */
SmcGetProperties (..., properties_received_callback, ...);
...
/* exit timeout, do other things, and wait for
properties_received_callback () to be invoked */
...
/* later in properties_received_callback */
for each property in set of received properties:
if property is being watched
and property's value has changed:
notify property handler that property has changed
Sending all the properties of a client over and over again for
as long as the client is connected to the session manager doesn't sound
like a nice idea at all. Luckily, the property we're concerned with
right now, _DSME_AvailableShutdownModes, isn't something that's likely
to change over the lifetime of the session manager, so there shouldn't
be any need for the clients to worry about watching the property.
What it does mean is that we should avoid having the session manager
set properties that are subject to change after clients initially
fetch them.
--Ray
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dsme-spec-0.6.xml
Type: text/xml
Size: 29454 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20031230/61162f07/attachment.bin
More information about the xdg
mailing list