Should "INTERFACE" be split into FROM_INTERFACE and TO_INTERFACE?

David A. Wheeler dwheeler@dwheeler.com
Sat Jan 22 14:25:46 PST 2005


In the heading, "INTERFACE" currently has opposite meanings
depending on whether it's a method call or a signal.

In a method call, it's the DESTINATION interface, but in
signals it's the SOURCE interface.  I can easily imagine
in the future wanting to specify both source and destination
for one of them, and in any case having this meaning
shift seems likely to cause trouble.

I suggest changing INTERFACE to be "TO_INTERFACE", and
making a separate "FROM_INTERFACE" type (used by signals).
I don't care about the names per se;
"DEST_INTERFACE" and "SRC_INTERFACE" or whatever
is fine too.  I just think it'd be wise to separate these
meanings out, so that you can use them both if useful.
Besides, having the meaning change seems likely to cause future
confusion.


By the way, for 16-bit values, since 's' is already "string",
I suggest using the letter 'h' to represent a 16-bit integer
(second letter of sHort, just like bYte uses the 2nd letter;
it also can stand for 'half' size).  The letter 'n' could
mean an unsigned 16-bit integer ("uNsigned short", and also
'u' upside down).  I just realized another major reason to
support 16-bit values; D-BUS corrects for endianness, and
16-bit values really need that kind of correction.


--- David A. Wheeler



More information about the dbus mailing list