[maemo-developers] [maemo-developers] dbus_bus_activate_service

From: andrew gatt a.gatt at btinternet.com
Date: Mon Jan 15 21:33:40 EET 2007

Kimmo Hämäläinen wrote:
> On Sat, 2007-01-13 at 17:28 +0000, ext andrew gatt wrote:
>> Is there any way to compile and use dbus_bus_service_activate under 
>> maemo. 
>> https://stage.maemo.org/svn/maemo/projects/email/osso-email/trunk/src/ui/viewcallback.c
>> Seems to suggest you can, however i can't get the function to compile, 
>> the compiler flags it as an undefined reference with all the headers 
>> i've tried.
>> Doing `grep dbus_bus_activate_service /usr/include/ -R` doesn't bring 
>> anything up so does it not exist?
> It seems that it's deprecated and you should use
> dbus_bus_start_service_by_name instead.
> BR; Kimmo
Ah, thanks for the input. I've changed the reference to 
dbus_bus_start_service_by_name. It seems to bring up the window, but 
then it goes away straight away and a browser window is opened. I've 
read (on the GtkSocket api page) that this is often caused when the 
GtkSocket widget goes out of scope before the external app is embedded, 
however the socket widget is returned and held in the main function and 
should therefore remain in scope (see previous email for code). Any 
ideas on this one?

I'm having troubles finding a route into this as i'm not entirely sure 
how the ui_viewer_embed_new_browser_window function is actually 
accomplishing its task. It seems to be using the 
osso-browser-interface.h OSSO_BROWSER_PLUG_NEW_WINDOW_REQ define to 
embed the browser with dbus message calls. I've also tried replacing all 
those dbus calls with:

ret =osso_rpc_run_with_defaults(appdata->context, "osso_browser",
DBUS_TYPE_UINT32, window_id,
DBUS_TYPE_STRING, "email.css",
DBUS_TYPE_STRING, "com.nokia.exmaple_libosso",

To embed the browser in the socket widget, but this opens the window 
then opens the browser window on top. I'm missing something vital but i 
can't put my finger on it.


More information about the maemo-developers mailing list