Hi Sudheer,
Yes, I had a similar use-case and faced the same problem. 

I ensured that my daemon was properly "osso-initialised" to ensure that its 
triggered properly by gui-app via dbus-daemon successfully. 

But, in your use-case, you seem to use QT. I am not aware of the fix.

Regards,
Chitti

Message: 27
Date: Fri, 7 May 2010 23:26:18 -0700
From: Scifi Guy <scifi....@hotmail.com>
Subject: RE: Noob question re Qt Application structure
To: <dotted...@dottedmag.net>
Cc: Maemo Dev Mailing List <maemo-developers@maemo.org>
Message-ID: <blu146-w207510d72dfaa65e43c698fc...@phx.gbl>
Content-Type: text/plain; charset="iso-8859-1"


>> Twas brillig at 10:05:38 07.05.2010 UTC-07 when scifi....@hotmail.com
>> did gyre and gimble:
>> 
>>  SG> Could you please elaborate what you mean by "upon first access"?
>> 
>> There is elaborate documentation.
>> 
>> http://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-starting-services
>> 
>> -- 
>>   http://fossarchy.blogspot.com/

>Thank you :) 
>
>I will create the service for the daemon and post back the results. Probably 
>tonight (at work now). 
>
>Thank you all for taking time to read and respond to my post.
>
>~Sudheer
                           
I am back with my questions again. Not sure If I need to start a new thread but 
let me ask anyway.

I have split my functionality into two apps, one running as a daemon and 
another as a GUI app. Now, I am trying send dbus signals to daemon. Till now I 
am not successful. Could you guys tell me what am I doing wrong here?

Here is my  /usr/share/dbus-1/services/org.maemo.vicar.service file content

# Service description file
[D-BUS Service]
Name=org.maemo.vicar
Exec=/home/user/vicar-daemon

# Code from the cpp file
    if (!connection.registerService("org.maemo.vicar")) {
        qDebug() << dbusUtility.getErrorMessage();
        exit(1);
    }

    if (!connection.registerObject("/org/maemo/vicar", this,
            QDBusConnection::ExportScriptableSlots)) {
        qDebug() << dbusUtility.getErrorMessage();
        exit(2);
    }

1) If I reboot the device, the service does not get activated automatically. I 
verified this by running the method call  org.freedesktop.DBus.ListNames (on 
System Bus). But If I run the executable manually, the service is registered 
successfully to system bus and I can see the name listed with the method call 
org.freedesktop.DBus.ListNames. Why is the daemon not launched automatically?

2) The daemon app connects to a custom signal on launch. 
   
  QDBusConnection connection = QDBusConnection::systemBus();

    bool success = connection.connect(QString(""),
                       QString(""),
                       QString("org.maemo.vicar"),
                       QString("startOutgoingCallMonitor"),this,
                       SLOT(startOutgoingCallMonitor()));

I am receiving the boolean value as successful. With the app running, I tried 
to send the Dbus signal from terminal. I am not successful so far. Could you 
tell me what is wrong here?

~ $ dbus-send --system --print-reply --type=signal --dest=org.maemo.vicar 
org/maemo/vicar org.maemo.vicar.startOutgoingCallMonitor
process 1686: arguments to dbus_message_new_signal() were incorrect, assertion 
"_dbus_check_is_valid_path (path)" failed in file dbus-message.c line 1165.
This is normally a bug in some application using the D-Bus library.
Couldn't allocate D-Bus message
                         



      
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to