General questions to DBua
Matthias Grimm
matthiasgrimm at users.sourceforge.net
Mon Nov 28 10:23:57 PST 2005
Hi,
I have tried to find out how DBus works since several days but failed.
The documentation as well as the howto seems only usefull for people who
already knows how it works, so I try to ask here.
1. Have a program always to know who the recipent of a signal is? DBus
was describes as 1-to-1 message bus but I want send a signal to
whoever is interested in it (like Battery Low, or Prepare for Sleep).
2. related to 1.: Would a client be able to listen for arbitrary signals
without knowing from which source they will be emitted? If I have a
small Notifier program, that should inform the user about certain
events (for example: Only 10 Minutes Battery left) How could I do
this? The source for the signal may change depending on architecture
or machine model.
3. What is the difference between a "Service" and an "Interface"? It was
really confusing for me that in the complete DBus documentation both
values are always the same. In my understanding a "Service" is like a
office I could go to for certain dutys and the "Interface" tells me
what I can do (signals and methods) in this office. Am I right here?
If so: Where are all the Interface definitions stored? I only found
DBus.Property and two other in the DBus specification. But if I want
to support a certain interface I have to know how it s defined,
haven't I?
4. How should I name my services if I didn't own a domain or any other
unique network name?
5. Why is the DBus API so complicated? Would have a simple OpenMsgPort(),
SendMsg(), ReceiveMsg() and CloseMsgPort() have done it too? Why has
everybody fear to use or at least explain the usage of the native
DBus API? Actually I won't use any binding to anything I don't need.
In other words: Why should I use libdbus-glib if my program doesn't
use glib (or any other lib a binding exists for)?
It might be correct that most of the native DBus API is only usefull
for bindings, but which functions are this? I really missed a
separation of binding-only functions and message bus functions in the
docs.
That's it for now. I hope the answers will bring me a little bit further.
Otherwise I will be back soon :-) That's a promise and no thread :-)
Best Regards
Matthias
More information about the dbus
mailing list