mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 15:33:39 +02:00
GDBus: add 'monitor' verb to gdbus(1)
This uncovered a bug in name watching if the name wasn't activatable. Also provoked the need for on_connection variants of g_bus_watch_name (added g_bus_watch_proxy's variant as well).
This commit is contained in:
@@ -23,6 +23,19 @@
|
||||
<arg choice="plain">--dest <replaceable>bus_name</replaceable></arg>
|
||||
<arg choice="plain">--object-path <replaceable>/path/to/object</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gdbus</command>
|
||||
<arg choice="plain">monitor</arg>
|
||||
<group>
|
||||
<arg choice="plain">--system</arg>
|
||||
<arg choice="plain">--session</arg>
|
||||
<arg choice="plain">--address <replaceable>address</replaceable></arg>
|
||||
</group>
|
||||
<arg choice="plain">--dest <replaceable>bus_name</replaceable></arg>
|
||||
<group>
|
||||
<arg choice="plain">--object-path <replaceable>/path/to/object</replaceable></arg>
|
||||
</group>
|
||||
</cmdsynopsis>
|
||||
<cmdsynopsis>
|
||||
<command>gdbus</command>
|
||||
<arg choice="plain">call</arg>
|
||||
@@ -60,6 +73,13 @@
|
||||
<literal>org.freedesktop.DBus.Introspectable</literal> interface.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>monitor</option></term>
|
||||
<listitem><para>
|
||||
Monitors one or all objects owned by the owned of
|
||||
<replaceable>bus_name</replaceable>.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><option>call</option></term>
|
||||
<listitem><para>
|
||||
@@ -189,6 +209,29 @@ $ gdbus call --session \
|
||||
5000
|
||||
(uint32 12,)
|
||||
</programlisting>
|
||||
<para>
|
||||
Monitoring all objects on a service:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus monitor --system --dest org.freedesktop.ConsoleKit
|
||||
Monitoring signals from all objects owned by org.freedesktop.ConsoleKit
|
||||
The name org.freedesktop.ConsoleKit is owned by :1.15
|
||||
/org/freedesktop/ConsoleKit/Session2: org.freedesktop.ConsoleKit.Session.ActiveChanged (false,)
|
||||
/org/freedesktop/ConsoleKit/Seat1: org.freedesktop.ConsoleKit.Seat.ActiveSessionChanged ('',)
|
||||
/org/freedesktop/ConsoleKit/Session2: org.freedesktop.ConsoleKit.Session.ActiveChanged (true,)
|
||||
/org/freedesktop/ConsoleKit/Seat1: org.freedesktop.ConsoleKit.Seat.ActiveSessionChanged ('/org/freedesktop/ConsoleKit/Session2',)
|
||||
</programlisting>
|
||||
<para>
|
||||
Monitoring a single object on a service:
|
||||
</para>
|
||||
<programlisting>
|
||||
$ gdbus monitor --system --dest org.freedesktop.ConsoleKit --object-path /org/freedesktop/ConsoleKit/Session2
|
||||
Monitoring signals on object /org/freedesktop/ConsoleKit/Session2 owned by org.freedesktop.ConsoleKit
|
||||
The name org.freedesktop.ConsoleKit is owned by :1.15
|
||||
/org/freedesktop/ConsoleKit/Session2: org.freedesktop.ConsoleKit.Session.ActiveChanged (false,)
|
||||
/org/freedesktop/ConsoleKit/Session2: org.freedesktop.ConsoleKit.Session.ActiveChanged (true,)
|
||||
</programlisting>
|
||||
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
@@ -2446,6 +2446,7 @@ GBusNameAppearedCallback
|
||||
GBusNameVanishedCallback
|
||||
GBusNameWatcherFlags
|
||||
g_bus_watch_name
|
||||
g_bus_watch_name_on_connection
|
||||
g_bus_unwatch_name
|
||||
</SECTION>
|
||||
|
||||
@@ -2454,6 +2455,7 @@ g_bus_unwatch_name
|
||||
GBusProxyAppearedCallback
|
||||
GBusProxyVanishedCallback
|
||||
g_bus_watch_proxy
|
||||
g_bus_watch_proxy_on_connection
|
||||
g_bus_unwatch_proxy
|
||||
</SECTION>
|
||||
|
||||
|
Reference in New Issue
Block a user