<font size=2 face="sans-serif">Dear all,</font>
<br>
<br><font size=2 face="sans-serif">I'm currently working on a project where
I need to provide information over D-Bus. Because it is not recommended
to use the dbus-glib</font>
<br><font size=2 face="sans-serif">for new projects, I started developing
with GDBus. I hope that you can help me with some questions regarding my
D-Bus connection.</font>
<br>
<br><font size=2 face="sans-serif">At first I want to give you a very short
overview about the project. I have to offer five types of information on
the D-Bus:</font>
<br><font size=2 face="sans-serif">SystemState, SessionStates, WakeupReason,
ShutdownReason and ResetReason.</font>
<br><font size=2 face="sans-serif">I expect that the SystemState and SessionStates
change often, while the remaining information is rarely touched.</font>
<br><font size=2 face="sans-serif">All informations fit into basic data
types, accept for the SessionStates, which are an array of booleans, where
every session can be marked as active/inactive. Because there seem to be
many clients interested, I want to emit a signal if the SessionState or
SystemStates changes.</font>
<br>
<br><font size=2 face="sans-serif">Now my questions are:</font>
<br>
<br><font size=2 face="sans-serif">1. When I use a 'D-Bus property', I
noticed that a signal is send everytime I change its value. The D.-Bus
specification says that</font>
<br><font size=2 face="sans-serif">I can omit this sending using the annotation
'org.freedesktop.DBus.Property.EmitsChangedSignal'. Unfortunately GLib
doesn't seem</font>
<br><font size=2 face="sans-serif">to support this annotation or did I
miss something?</font>
<br>
<br><font size=2 face="sans-serif">2. The clients waiting for the signals
are not interested in every System- or SessionState. Therefore I want send
the signal with the first</font>
<br><font size=2 face="sans-serif">the Session- or StateName (string) as
first argument and apply a match rule. Is this a good programming praxis?</font>
<br>
<br><font size=2 face="sans-serif">3. This is not a D-Bus topic, but maybe
you can help me: Do you know a good place to learn the insights of the
GMainloop? For example I still wonder how g_mainloop_new, g_signal_connect
and g_mainloop_run are working. From the passed parameters I can see no
connection between the D-Bus object and the loop. Furthermore I noticed
that the signals seem to be queued (I fired multiple of them on the main
loop, while another one was processd.). Is this queue limited?</font>
<br>
<br><font size=2 face="sans-serif">It would be nice if you can help me
with these questions.</font>
<br>
<br><font size=2 face="sans-serif">Best regards,<br>
Jean-Pierre Bogler</font>