[libvirt] [dbus PATCH 4/4] Annotate properties that will never change during the object lifecycle

Pavel Hrdina posted 4 patches 7 years ago
[libvirt] [dbus PATCH 4/4] Annotate properties that will never change during the object lifecycle
Posted by Pavel Hrdina 7 years ago
These can be annotated as 'const' properties because they will never
change.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
---
 data/org.libvirt.Connect.xml | 2 ++
 data/org.libvirt.Domain.xml  | 1 +
 data/org.libvirt.Network.xml | 2 ++
 3 files changed, 5 insertions(+)

diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml
index 3bddb89..f4d17e9 100644
--- a/data/org.libvirt.Connect.xml
+++ b/data/org.libvirt.Connect.xml
@@ -7,6 +7,7 @@
       <annotation name="org.gtk.GDBus.DocString"
         value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectIsEncrypted
                Note that monitoring of traffic on the D-Bus message bus is out of the scope of this property"/>
+      <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
     </property>
     <property name="Hostname" type="s" access="read">
       <annotation name="org.gtk.GDBus.DocString"
@@ -22,6 +23,7 @@
       <annotation name="org.gtk.GDBus.DocString"
         value="See https://libvirt.org/html/libvirt-libvirt-host.html#virConnectIsSecure
                Note that monitoring of traffic on the D-Bus message bus is out of the scope of this property"/>
+      <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
     </property>
     <property name="Version" type="t" access="read">
       <annotation name="org.gtk.GDBus.DocString"
diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml
index fcd3221..224f5aa 100644
--- a/data/org.libvirt.Domain.xml
+++ b/data/org.libvirt.Domain.xml
@@ -52,6 +52,7 @@
     <property name="UUID" type="s" access="read">
       <annotation name="org.gtk.GDBus.DocString"
         value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainGetUUIDString"/>
+      <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
     </property>
     <method name="AbortJob">
       <annotation name="org.gtk.GDBus.DocString"
diff --git a/data/org.libvirt.Network.xml b/data/org.libvirt.Network.xml
index e31417c..d939f4a 100644
--- a/data/org.libvirt.Network.xml
+++ b/data/org.libvirt.Network.xml
@@ -17,6 +17,7 @@
     <property name="Name" type="s" access="read">
       <annotation name="org.gtk.GDBus.DocString"
         value="See https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkGetName"/>
+      <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
     </property>
     <property name="Persistent" type="b" access="read">
       <annotation name="org.gtk.GDBus.DocString"
@@ -26,6 +27,7 @@
     <property name="UUID" type="s" access="read">
       <annotation name="org.gtk.GDBus.DocString"
         value="See https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkGetUUIDString"/>
+      <annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
     </property>
     <method name="Create">
       <annotation name="org.gtk.GDBus.DocString"
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [dbus PATCH 4/4] Annotate properties that will never change during the object lifecycle
Posted by Katerina Koukiou 7 years ago
On Thu, 2018-05-03 at 14:46 +0200, Pavel Hrdina wrote:
> These can be annotated as 'const' properties because they will never
> change.
> 
> Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
> ---
> 
>  data/org.libvirt.Connect.xml | 2 ++
>  data/org.libvirt.Domain.xml  | 1 +
>  data/org.libvirt.Network.xml | 2 ++
>  3 files changed, 5 insertions(+)
> 
Reviewed-by: Katerina Koukiou <kkoukiou@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list