maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   DBUS Confusion (https://talk.maemo.org/showthread.php?t=5000)

spycedtx 2007-03-01 00:06

DBUS Confusion
 
I'm attempting to access EDS services, and running into an obstacle.

When attempting to access, a supposedly synchronous call, to EDS, I'm receiving an error message of:

Message did not receive a reply (timeout by message bus)

Here is the offending code, within a static void section linked to a menu action:
Code:

EBook *mybook = e_book_new_from_uri("/home/adam/books/adambook", &err);
if (mybook == NULL)
{
  hildon_banner_show_information(GTK_WIDGET(app->window), NULL, err->message);
}

I've gone through numerous iterations of changing the service name registered in the code, the .service file, the .desktop file, all to the same result. I've tried "my.own.domain.myservice", as well as the prior required "com.nokia.myservice". I'm afraid I might have missed a particular combination of where to (not) include the domain between the code and descriptors.

I'm hoping some guru can lend a hand or direction. I'm running this under 2.2, scratchbox 1, with a PC target. I've tried running dbus-monitor (i swear i used to be able to use the keyboard from within the xterm app under scratchbox), but I really don't know what I'm looking for. I do see calls to the addressbook and said factories.

I hope I've provided enough information to go on.... Thanks for any help!

For the sake of brevity, all tests to make sure things are initialized aren't pasted in here.. but, they're in the code, and they come back a success.

Initialization code, tried with and without "TRUE":
Code:

appData.context = osso_initialize("myapplication", "1.0", TRUE, NULL);
osso abook init code (tried with and without)
Code:

    if (!osso_abook_init (&argc, &argv, appData.context))

myapplication.desktop:
Code:

Encoding=UTF-8
Version=1.0
Name=AddressApp
Comment=Address Book stuff
Exec=/home/adam/hello-world-gtk/hildpc/src/ihello
Icon=terminal
Terminal=false
Type=Application
Categories=User;Contact
X-HildonDesk-ShowInToolbar=true
X-Osso-Service=com.nokia.myapplication
X-Osso-Type=application/x-executable

myapplication.service
Code:

[D-BUS Service]
Name=com.nokia.myapplication
Exec=/home/adam/hello-world-gtk/hildpc/src/ihello


spycedtx 2007-03-01 08:57

Re: DBUS Confusion
 
Here's the output from dbus-monitor, if it helps, when running the e_book_new_from_uri().

with the null destination lines, I can't help but wonder if there's something broken in my dbus registrations.

Code:

method call sender=:1.6 -> dest=org.freedesktop.DBus interface=org.freedesktop.DBus; member=StartServiceByName
 string "org.gnome.evolution.dataserver.AddressBook"
uint32 0
signal sender=org.freedesktop.DBus -> dest=(null destination) interface=org.freedesktop.DBus; member=NameOwnerChanged
 string ":1.7"
string ""
string ":1.7"
method call sender=:1.7 -> dest=org.freedesktop.DBus interface=org.freedesktop.DBus; member=Hello
method call sender=:1.7 -> dest=org.freedesktop.DBus interface=org.freedesktop.DBus; member=AddMatch
 string "type='signal',sender='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged'"
method call sender=:1.7 -> dest=org.freedesktop.DBus interface=org.freedesktop.DBus; member=AddMatch
 string "type='signal',sender='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus'"
method call sender=:1.7 -> dest=org.freedesktop.DBus interface=org.freedesktop.DBus; member=GetNameOwner
 string "org.freedesktop.DBus"
signal sender=org.freedesktop.DBus -> dest=(null destination) interface=org.freedesktop.DBus; member=NameOwnerChanged
 string "org.gnome.evolution.dataserver.AddressBook"
string ""
string ":1.7"
method call sender=:1.7 -> dest=org.freedesktop.DBus interface=org.freedesktop.DBus; member=RequestName
 string "org.gnome.evolution.dataserver.AddressBook"
uint32 0
method call sender=:1.6 -> dest=org.freedesktop.DBus interface=org.freedesktop.DBus; member=GetNameOwner
 string "org.gnome.evolution.dataserver.AddressBook"
method call sender=:1.6 -> dest=org.freedesktop.DBus interface=org.freedesktop.DBus; member=AddMatch
 string "type='signal',sender='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged'"
method call sender=:1.6 -> dest=org.freedesktop.DBus interface=org.freedesktop.DBus; member=AddMatch
 string "type='signal',sender=':1.7',path='/org/gnome/evolution/dataserver/addressbook/BookFactory',interface='org.gnome.evolution.dataserver.addressbook.BookFactory'"
method call sender=:1.7 -> dest=org.freedesktop.DBus interface=org.freedesktop.DBus; member=AddMatch
 string "type='signal',sender='com.nokia.backup',path='/com/nokia/backup',interface='com.nokia.backup'"
signal sender=org.freedesktop.DBus -> dest=(null destination) interface=org.freedesktop.DBus; member=NameOwnerChanged
 string "org.gnome.evolution.dataserver.AddressBook"
string ":1.7"
string ""
signal sender=org.freedesktop.DBus -> dest=(null destination) interface=org.freedesktop.DBus; member=NameOwnerChanged
 string ":1.7"
string ":1.7"
string ""


aflegg 2007-03-01 09:05

Re: DBUS Confusion
 
You'd probably be better off on the maemo-developers mailing list.

HTH,

Andrew

spycedtx 2007-03-01 09:22

Re: DBUS Confusion
 
Thanks for the heads up. I'm scouring the list archives now. I'll refrain from the grumbling on the lack of a search feature. :)

henry 2007-03-01 11:26

Re: DBUS Confusion
 
Quote:

Originally Posted by spycedtx (Post 37152)
Thanks for the heads up. I'm scouring the list archives now. I'll refrain from the grumbling on the lack of a search feature. :)

Have you tried google? I'm positive that the mailinglist archives are being indexed.


All times are GMT. The time now is 11:57.

vBulletin® Version 3.8.8