Where to start

Havoc Pennington hp at redhat.com
Thu Mar 31 15:52:20 PST 2005


On Thu, 2005-03-31 at 23:21 +0100, Tony Houghton wrote:
> 
> #define OPTSDBUS_NAME "net.sf.roxterm.Options"
> #define OPTSDBUS_OBJECT_PATH "/net/sf/roxterm/Options"
> #define OPTSDBUS_INTERFACE "net.sf.roxterm.Options"
> #define OPTSDBUS_SIGNAL_NAME OPTSDBUS_NAME

SIGNAL_NAME here is wrong, it should just be a single word with no
periods in it. Though I'm not sure that's true for 0.22 I guess.

It's like this:

 interface net.sf.roxterm.Options {
   method Foo(int arg1);
   signal Bar(int arg1);
 }

So no namespace on method/signal names, the namespace is the interface.

> I got a private message from someone who thought that signals couldn't
> actually have arguments. Is that right? That would explain it. It would
> mean I couldn't easily use signals to broadcast my config changes
> though.

Signals can have arguments. They differ from methods because a) they
have no destination, since they are broadcast and b) they have no reply
message (which means no "out" params)

> Sorry, I didn't get how the receiving of messages was integrated into
> the main loop if GProxy signals weren't working. But looking at
> ROX-Session as an example I can now see that dbus has its own system of
> callbacks (ROX-Session uses dbus_connection_register_object_path; I'd
> probably need to use something slightly different for signal messages).

For signal messages you'd install a "filter"

Havoc




More information about the dbus mailing list