Re: listener question



Hi William,

On Tue, 2003-11-11 at 18:33, William Jon McCann wrote:
> > 	Right; the problem is: getting notifications of newly registered
> > components with b-a-s is not possible, something we could/should add to
> > b-a-s I guess.
> 
> OK, that explains some things.  I couldn't get successive calls of the 
> following to pick up changes:
>   bonobo_activation_query ("((repo_ids.has('IDL:GNOME/Rhythmbox:1.0')) 
> AND (_active == TRUE))", NULL, &ev);

	Urk - it's possible of course that we arn't flushing the client side
cache when a new thing is activated; quite possibly this is a bug, in
the client side caching. We should prolly scan the query string for
'_active' and not hit the cache for this case in:

	libbonobo/bonobo-activation/bonobo-activation-activate.c
		(bonobo_activation_query)

	since flushing every client cache every time something new was
activated would be far too expensive. Any chance of a nice tested patch
that does that ?

> But I was able to with the command line tool:
> /usr/bin/bonobo-activation-run-query 
> "((repo_ids.has('IDL:GNOME/Rhythmbox:1.0')) AND (_active == TRUE))"

	Sure - it had no cache.

> It would be great if I didn't have to do any polling at all.  One 
> notification that an event souce became available.  One notification 
> that an event source died.

	Sure; that can be done: simply add 3 new methods to the idl in
libbonobo/idl/Bonobo_ActivationContext.idl one on the client, two on the
server - to add/remove a listener and recieve an event and hook them up
in activation-server / bonobo-activation.

	NB. if you want this API in - you have ~5 days to get it done before
we're freezing the API for Gnome 2.6 though ... [ I'd appreciate a
separate patch to the above simple _activate cache fix ].

	Looking forward to some nice unified diffs :-)

	Regards,

		Michael.

-- 
 michael ximian com  <><, Pseudo Engineer, itinerant idiot




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