Creating signal using Qt and Glib bindings

Bogdan Lotko boguslaw.lotko at chello.at
Sun Apr 10 13:06:13 PDT 2011


Of course, you are right, I was imprecise. I meant  
QDBusMessage::createSignal()  method.

For my excuse I have to mention 2 things:
1. I am still novice in all D-Bus topics :)
2. The naming and syntax in Qt suggest that the message (OK message not 
signal)  is being created and sent:
QBbusMessage msg = QDBbusMessage::createSignal( <objectPath>, 
<interface>, <methodName> );
   dbusConn->send(msg);

But still I have the same question:
How to do this same using GLib bindings?
My goal is to sent a broadcast message to many applications  and as I 
already mentioned, neither in the g_signal_new() nor in the 
g_signal_emit() methods I can't recognize the <objectPath> and 
<interface> parameters.
The interface name can be given in the interface definition .xml file - 
is this correct?
Of course the objectPath can be taken from the object g_signal_emit( 
gpointer instance,... ) //||//
but first - it is not clearly documented, in manual there is only 
//|"instance|/ : the instance the signal is being emitted on/"
second - please note that in Qt I don't need to register any object (at 
least not explicitly) in order to send a broadcast message.

Thanks for your help,

with best regards

Bogdan Lotko


On 4/10/2011 15:00, Thiago Macieira wrote:
> On Friday, 8 de April de 2011 21:41:50 Bogdan wrote:
>> How to create a signal (using Glib bindings), that is identical with the one
>> created with the following Qt statement:
>>
>> connectionX.createSignal(<objectPath>,<interface>,<methodName>  );
> Do you mean QDBusMessage::createSignal? That doesn't create a signal in an
> interface, it creates a message that emits a signal.
>
>> This signal has to be received by the Qt application that uses following Qt
>> connect statement:
>>
>> connectionY.connect(<service>,<objectPath>,<interface>,<methodName>,
>> this, SLOT(âEUR¦) );
>>
>> Neither in the g_signal_new() nor in the g_signal_emit() methods I canâEUR^(TM)t
>> recognize the<objectPath>  and<interface>  parameters.
>
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20110410/8e3f4bed/attachment.html>


More information about the dbus mailing list