Re: [gupnp] two more introspection methods

From: Jorn Baayen <jorn@openedhand.com>
Date: Wed Aug 08 2007 - 08:11:32 EDT

On Wed, 2007-08-08 at 15:05 +0300, Zeeshan Ali wrote:
> Hey!
>
> On 8/8/07, Jorn Baayen <jorn@openedhand.com> wrote:
> > On Wed, 2007-08-08 at 14:02 +0300, Zeeshan Ali wrote:
> > > Thanks a lot. I'll send a patch to service info to make it cache the
> > > introspection in a while.
> >
> > Hmm this doesn't seem like a good idea?
> > For example Service needs to briefly look at introspection on init but
> > will never look again. In these cases the caching will end up taking up
> > unnecessary memory for the rest of the apps lifetime.
> > I'd say let apps maintain a reference to the introspection object if
> > they need it.
>
> I see you point! how about caching the scpd document?

Still the same problem. Let's just leave the caching up to the app as
it's not obvious the caching makes sense in the majority of cases.

>
> > > One thing that I am trying to figure right now is, given a list (a
> > > GList or array) of action arguments (tuples of name, type and value)
> > > how do i turn it into a gupnp_service_proxy_send_action() call. Is the
> > > _valist exactly for such cases? Perhaps i should read on va_list..
> >
> > Hmm right, I didn't envision this would be necessary when designing the
> > API (due to its initial focus on specific service implementations). I am
> > not particularly enthusiastic about adding additional API for this (also
> > as nor DBus proxy nor Bonobo API have anything else besides va_list
> > calls for this), but because we have gotten so far already with the
> > device spy perhaps we should just add something. I guess the most
> > sensible thing to do would be to add calls taking hashtables of
> > argname-GValue pairs. What do you think?
>
> Sounds good!

Ok, I'll add something tomorrow at the latest ..

>
> > Also please don't use send_action() in a UI - it may block the UI for
> > seconds.
>
> Not a big problem in my case, besides i don't see an async verion of it :)

begin_action()/end_action() is the async version. And believe me, you
want it. :) If a device becomes unavailable without announcing it
unavailability your app is going to hang for a little while until things
time out. It's not hard to use the async version ;)

Cheers,

Jorn

--
To unsubscribe send a mail to gupnp+unsubscribe\@o-hand.com
Received on Wed, 08 Aug 2007 15:11:32 +0300

This archive was generated by hypermail 2.1.8 : Wed Aug 08 2007 - 09:00:07 EDT