Skip to content

Commit 22f11bc

Browse files
stefwalterdperpeet
authored andcommitted
doc: Add documentation about dbus onmeta event
Closes cockpit-project#4432 Reviewed-by: Dominik Perpeet <[email protected]>
1 parent afbaf43 commit 22f11bc

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

doc/guide/cockpit-dbus.xml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ $(client).on("notify", function(data) { ... })
811811
</refsection>
812812

813813
<refsection id="cockpit-dbus-notify">
814-
<title>client.notify</title>
814+
<title>client.notify()</title>
815815
<programlisting>
816816
client.notify(data)
817817
</programlisting>
@@ -821,6 +821,41 @@ client.notify(data)
821821
described for the <code>notify</code> event.</para>
822822
</refsection>
823823

824+
<refsection id="cockpit-dbus-onmeta">
825+
<title>client.onmeta</title>
826+
<programlisting>
827+
client.onmeta = function(ev, data) { ... }
828+
</programlisting>
829+
<para>An event triggered when the meta data about
830+
<link linkend="cockpit-dbus-watch">watched</link> interfaces is loaded.</para>
831+
832+
<para>The <link linkend="cockpit-dbus-proxy"><code>client.proxy()</code></link> and
833+
<link linkend="cockpit-dbus-proxies"><code>client.proxies()</code></link> functions and
834+
the objects they return are high level wrappers around the <code>data</code> provided
835+
by this event.</para>
836+
837+
<para>The <code>data</code> has the following form:</para>
838+
839+
<programlisting>
840+
{
841+
"org.Interface": {
842+
"methods": {
843+
"Method1": { },
844+
"Method2": { }
845+
},
846+
"properties": {
847+
"Prop1": { "flags": "rw" },
848+
"Prop2": { "flags": "r" }
849+
}
850+
}
851+
}
852+
</programlisting>
853+
854+
<para>Multiple interfaces may be present, each of which may have methods and properties.
855+
This is emitted before the first <link linkend="cockpit-dbus-proxy"><code>client.onnotify</code></link>
856+
event for the relevant interface.</para>
857+
</refsection>
858+
824859
<refsection id="cockpit-dbus-variant">
825860
<title>cockpit.variant()</title>
826861
<programlisting>

0 commit comments

Comments
 (0)