[maemo-developers] [maemo-developers] Receiving application activation events from D-BUS

From: Kimmo Hämäläinen kimmo.hamalainen at nokia.com
Date: Mon Dec 4 11:02:42 EET 2006
On Fri, 2006-12-01 at 17:54 -0800, ext Manuel Roman wrote:
> Hi,
> 
> I am trying to write a simple program that listens to the D-BUS to
> learn about applications starting and terminating. Should I use the
> regular osso_rpc_set_cb_f function, or should I be calling another
> method? I have seen one to listen to HW events. If I am supposed to
> use osso_rpc_set_cb_f, what should I register as the source?

Unfortunately the current Libosso API does not allow to do that. The
osso_rpc_* functions are meant for handling D-Bus method calls, not
signals. But you could do it by using the D-Bus API directly (use
osso_get_[sys_]dbus_connection() Libosso function to get the
DBusConnection).

> Is there any documentation that explains how to listen to system
> events? Actually, I tried to find the code for dbus-monitor but could
> not find it.

dbus-monitor sources are here:
https://stage.maemo.org/svn/maemo/projects/haf/tags/dbus/0.61-
osso13fix3/tools/dbus-monitor.c

> Also, is it possible to use the dbus to send a termination message to
> an application? Is there any documentation about these messages?

No, D-Bus does not have a mechanism for killing applications. It could
be done if the application co-operates, e.g. listens to a certain D-Bus
message and terminates when receiving it, but we haven't had need for
that kind of mechanism yet.

BR, Kimmo

> 
> Thanks,
> Manuel
> _______________________________________________
> maemo-developers mailing list
> maemo-developers at maemo.org
> https://maemo.org/mailman/listinfo/maemo-developers

More information about the maemo-developers mailing list