[maemo-developers] top_application?

From: Mika Yrjölä exploderi at gmail.com
Date: Wed Jul 11 15:25:29 EEST 2007
On 7/11/07, Murray Cumming <murrayc at murrayc.com> wrote:
> On Wed, 2007-07-11 at 13:53 +0300, Mika Yrjölä wrote:
> > On 7/11/07, Murray Cumming <murrayc at murrayc.com> wrote:
> > > Some applications seem to handle the "top_application" D-Bus method. I
> > > guess that this is maybe sent to the application when it's launched from
> > > the menu. And I guess that this maybe allows applications to be
> > > activated by D-Bus without showing their UI, so there UI can then be
> > > shown later when it's launched from the menu.
> > >
> > > But I can't find any real documentation for this D-Bus method. I'd
> > > rather not guess.
> >
> > Hi,
> >
> > the top_application support resides in libosso (to be more specific,
> > see libosso API documentation or libosso.h and
> > osso-application-top.[c|h] from the sources) .
>
> Sorry I can't find anything in the documentation. Do you have a URL?

Sure, here goes:

http://maemo.org/api_refs/3.0/libosso/group__Apps.html

documents the libosso features that use the top_application method
(however, it's true that the documentation doesn't mention that,
probably because it's just an internal implementation detail). I don't
know if there would be additional information in the rest of the
libosso docs (other than the source :), as most of the other libosso
doc links seem to be broken at the moment, though...

Desktop appears indeed to currently send a top_application method call
while it starts an application, at least according to a quick look to
the source (osso_manager_launch function).

> >  It's supposed to be
> > there for the purposes of bringing the target application to
> > foreground and to allow the apps to notice/do something  useful when
> > that happens with the corresponding callbacks, but as it's deprecated,
> > I think using it in new applications might now not be worth it.
>
> Is this replaced by anything in particular? Is there some recommended
> way to get the behaviour that I described?

AFAIK the mechanism is in use for now, even though the deprecation
notice implies that this might not be the case forever (the osso_rpc_*
functions are suggested as an alternative). I don't have any immediate
idea about how to do what you originally wished for, though (as the
top_application would cause the  application to become the active
one).

More information about the maemo-developers mailing list